Solar decompiled, some cleanup (#102)

* stuff

* stuff

* temps

* matched

* so complete

* merge and clean

* format

* graphics macros
This commit is contained in:
petrie911
2024-01-21 21:28:02 -06:00
committed by GitHub
parent 61b55d90ce
commit 119dfa9354
19 changed files with 3804 additions and 1380 deletions
+12 -1
View File
@@ -543,7 +543,8 @@ extern Gfx D_6011EE0[];
extern Gfx D_60120F0[];
extern u8 D_6012310[];
extern u8 D_60123F0[];
extern Gfx D_6012C00[];
extern Gfx D_6012C00_Gfx[];
extern AnimationHeader D_6012C00_Anim;
extern u8 D_60131A0[];
extern Gfx D_60132B0[];
extern u8 D_6013470[];
@@ -942,6 +943,16 @@ extern f32 D_603E030[];
extern f32 D_603E09C[];
extern f32 D_603E0EC[];
extern Gfx D_60084C0[];
extern Gfx D_6008D40[];
extern Gfx D_6007C40[];
extern Gfx D_601B790[];
extern Gfx D_601B790[];
extern Gfx D_601A700[];
extern Gfx D_6019670[];
extern Gfx D_60185E0[];
extern Gfx D_6017550[];
// ast_9DD390, ast_A0E340, ast_BFA740, ast_CBFE70, ast_D27600
extern Gfx D_7000000[];
extern u8 D_7000F10[];
+8 -2
View File
@@ -42,7 +42,7 @@ void func_8001CE28(u8, f32 *);
void func_8001D034(f32*, s32, u8);
void func_8001D10C(f32*, u32);
void func_8001D15C(u8);
void func_8001D1C8(u8, s32);
void func_8001D1C8(u8, u32);
void func_8001D2FC(f32 *, u16);
void func_8001D3A0(f32 *, u16);
void func_8001D400(s8);
@@ -116,6 +116,9 @@ void func_800319AC(Actor* this);
void func_80035448(Actor* actor);
//fox_beam
void func_80038140(PlayerShot* shot);
void func_80036318(PlayerShot* shot);
void func_80035DEC(f32 xPos, f32 yPos, f32 zPos);
void PlayerShot_Initialize(PlayerShot *);
void func_800365E4(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32);
void func_8003D9B8(void);
@@ -152,7 +155,7 @@ void func_80045E7C(Player*);
void func_80047504(Player * player);
void func_80046358(Player*);
// sf_496E0
// fox_demo
void func_80048AC0(s32 teamId);
void func_80049C0C(Player *);
void func_8004A52C(Player *);
@@ -160,6 +163,7 @@ void func_8004AA84(void);
void func_8004AAF4(Player *);
void func_8004C930(Player *);
void func_8004CCC0(Player *);
void func_8004D440(Player* player);
void func_8004E3D8(Player *);
void func_8004F8AC(Actor*);
void func_8004FEC0(Actor*);
@@ -315,6 +319,7 @@ void func_800771CC(Actor*);
void func_80077218(Actor*);
// fox_effect
s32 func_80081B24(f32 posX, f32 posY, f32 posZ, f32 scale2);
void func_80077240(f32 posX, f32 posY, f32 posZ, s32 hits);
void func_8007729C(void);
void func_80077790(void);
@@ -531,6 +536,7 @@ void func_800A3CA0(void);
s32 Play_CheckMedalStatus(u16);
s32 Play_GetMaxShields(void);
void func_800A6028(f32*, u32);
void func_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5);
void func_800A5844(void);
void func_800A594C(void);
void func_800A5D6C(void);
+2 -2
View File
@@ -10,7 +10,7 @@
// extern f32 D_i3_801C4188; Currently externed in relevant files for bss ordering
void func_i3_801BE034(Actor*, Player*);
void func_i3_801BE034(Actor*);
void func_i3_8018DA58(Actor*);
void func_i3_8019E5F0(Actor*);
@@ -97,7 +97,7 @@ void func_i3_801ABA40(PlayerShot*);
void func_i3_801AC274(Player*);
void func_i3_801AC8A8(f32, f32, f32, f32, s32);
void func_i3_801AC918(Effect*);
void func_i3_801ACBB4(void);
void func_i3_801ACBB4(Player*);
void func_i3_801ACE50(Player*);
void func_i3_801AD328(Player*);
void func_i3_801AD688(Actor *);
+2 -2
View File
@@ -12,8 +12,8 @@
#define SHT_MAX 32767.0f
#define SHT_MINV (1.0f / SHT_MAX)
#define RAD_TO_DEG(radians) ((radians * 180.0f) / M_PI)
#define DEG_TO_RAD(degrees) ((degrees * M_PI) / 180.0f)
#define RAD_TO_DEG(radians) (((radians) * 180.0f) / M_PI)
#define DEG_TO_RAD(degrees) (((degrees) * M_PI) / 180.0f)
typedef union {
struct {
+11
View File
@@ -457,6 +457,8 @@ D_6011C48 = 0x06011C48;
D_6011C80 = 0x06011C80;
D_6011EE0 = 0x06011EE0;
D_60120F0 = 0x060120F0;
D_6012C00_Gfx = 0x06012C00;
D_6012C00_Anim = 0x06012C00;
D_60132B0 = 0x060132B0;
D_60137B0 = 0x060137B0;
D_6013960 = 0x06013960;
@@ -752,6 +754,15 @@ D_6011000 = 0x06011000;
D_600FF30_Env = 0x0600FF30;
D_6006E70 = 0x06006E70;
D_6014D50 = 0x06014D50;
D_60084C0 = 0x060084C0;
D_6008D40 = 0x06008D40;
D_6007C40 = 0x06007C40;
D_601B790 = 0x0601B790;
D_601B790 = 0x0601B790;
D_601A700 = 0x0601A700;
D_6019670 = 0x06019670;
D_60185E0 = 0x060185E0;
D_6017550 = 0x06017550;
D_700AB70 = 0x0700AB70;
D_700BE00 = 0x0700BE00;
+1 -1
View File
@@ -2165,7 +2165,7 @@ void func_80035448(Actor* actor) {
f32 sp38;
s32 pad[3];
Vec3f sp1E4 = { 0.0f, 0.0f, 0.0f };
Vec3f sp7C[30]; // larger than expected
Vec3f sp7C[30];
f32 pad2;
if (actor->unk_0E4 != 1000) {
+1 -1
View File
@@ -690,7 +690,7 @@ void func_80054280(Player* player, s32 arg1) {
func_80052884(player);
return;
case FORM_BLUE_MARINE:
func_i3_801ACBB4();
func_i3_801ACBB4(player);
return;
case FORM_ON_FOOT:
func_800526B8(player);
+4 -4
View File
@@ -409,7 +409,7 @@ void func_8005A094(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_i1_8019A008[actor->unk_048]);
break;
default:
if (actor->unk_0B8 > 9) { // part of switch tree somehow?
if (actor->unk_0B8 > 9) {
if (actor->unk_0B8 == 0x24) {
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
@@ -856,7 +856,7 @@ void func_8005CDA8(Item* item) {
} else {
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING); // wrong order?
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);
@@ -1384,7 +1384,7 @@ void func_8005F0E8(f32* sfxSrc, Vec3f* pos) {
}
func_8005F030(sfxSrc);
}
// check
void func_8005F1EC(f32* sfxSrc) {
Vec3f sp2C = { 0.0f, 0.0f, 0.0f };
Vec3f sp20;
@@ -1798,7 +1798,7 @@ void func_80060968(void) {
} else {
Matrix_SetGfxMtx(&gMasterDisp);
if (gCurrentLevel == LEVEL_MACBETH) {
gSPDisplayList(gMasterDisp++, D_6012C00);
gSPDisplayList(gMasterDisp++, D_6012C00_Gfx);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, ent30->unk_2C, ent30->unk_2D, ent30->unk_2E,
ent30->unk_2F);
+1 -2
View File
@@ -3496,7 +3496,6 @@ void func_80081C5C(Effect* effect) {
s32 unusedOut;
Vec3f velocity;
Vec3f velocityDest;
// f32 pad;
velocity.x = effect->vel.x;
velocity.y = effect->vel.y;
@@ -3659,7 +3658,7 @@ void func_80081C5C(Effect* effect) {
case LEVEL_ZONESS:
if (!(gGameFrameCount & 3)) {
// clang-format off
func_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2 * 3.0f, 6);
func_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2 * 3.0f, 6);
// clang-format on
}
+1 -7
View File
@@ -1427,8 +1427,6 @@ void func_80088784(s32 arg0) {
}
}
// #if defined(IMPORT_BSS) || defined(NON_MATCHING)
// needs D_80161838 to be static
void func_80088970(void) {
s32 i;
s32 j;
@@ -1751,10 +1749,6 @@ void func_80088970(void) {
}
}
}
// #else
// void func_80088970(void);
// #pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_hud/func_80088970.s")
// #endif
void func_80089670(void) {
RCP_SetupDL(&gMasterDisp, 0x3E);
@@ -4851,7 +4845,7 @@ void func_80093164(Actor* actor) {
break;
case 41:
func_i3_801BE034(actor, player);
func_i3_801BE034(actor);
break;
case 44:
+1 -1
View File
@@ -384,7 +384,7 @@ void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, AnimationHeader* a
boundBox[2].y = boundBox[3].y = boundBox[6].y = boundBox[7].y = min->y;
boundBox[4].z = boundBox[5].z = boundBox[6].z = boundBox[7].z = min->z;
for (i = 0; i < 8; i++) {
// Matrix_MultVec3f(gGfxMatrix, spC0[i], sp60[i]); should logically go here
// Matrix_MultVec3f(gGfxMatrix, boundBox[i], boundBoxRot[i]); should logically go here
}
*min = *max = boundBoxRot[0];
for (i = 1; i < 8; i++) {
+4 -4
View File
@@ -11,9 +11,9 @@ extern Gfx D_60199D0[];
void func_i1_8018753C(Object_80* obj80) {
GCGM_BACK();
GDL(&D_60199D0);
GSGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_60199D0);
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
}
void func_i1_801875A4(Object_4C* obj4C) {
@@ -1009,7 +1009,7 @@ s32 func_i1_8018A434(s32 arg0, Gfx** arg1, Vec3f* arg2, Vec3f* arg3, void* arg4)
}
if ((boss->swork[arg0] & 1) || (boss->timer_05C & 1)) {
RCP_SetupDL_64();
GPC(64, 64, 255, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
}
return false;
}
+3 -3
View File
@@ -1696,14 +1696,14 @@ void func_i3_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f3
Matrix_Scale(gCalcMatrix, 1.5f, 1.5f, 1.5f, 1);
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GSGM_BACK();
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_600F1F0);
Matrix_MultVec3f(gCalcMatrix, &sp90, arg3);
} else {
Matrix_Scale(gCalcMatrix, 2.0f, 2.0f, 2.0f, 1);
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GCGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_6015EE0);
if (arg6 != 12) {
Matrix_MultVec3f(gCalcMatrix, &sp90, arg3);
@@ -1734,7 +1734,7 @@ void func_i3_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) {
Matrix_Push(&gGfxMatrix);
Matrix_Push(&gCalcMatrix);
Matrix_Copy(gCalcMatrix, &gIdentityMatrix);
GCGM_BACK();
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);
File diff suppressed because it is too large Load Diff
+38 -39
View File
@@ -605,9 +605,9 @@ void func_i3_801900FC(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32
}
s32 func_i3_8019019C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) {
GSGM_BACK();
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
if ((limbIndex >= 4) && (limbIndex < 10)) {
GCGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
return false;
}
@@ -810,9 +810,9 @@ void func_i3_80190B4C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
if (arg7 != 0) {
RCP_SetupDL_64();
GPC(40, 40, 255, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 40, 40, 255, 255);
}
GDL(D_i3_801BF5A8[arg6]);
gSPDisplayList(gMasterDisp++, D_i3_801BF5A8[arg6]);
Matrix_Pop(&gGfxMatrix);
}
@@ -962,10 +962,10 @@ void func_i3_801914C4(Actor* actor) {
Vec3f sp38[20];
Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1);
GCGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
Animation_GetFrameData(&D_601AA48, actor->unk_0B6, sp38);
Animation_DrawSkeleton(3, D_601AB14, sp38, NULL, func_i3_80190F28, actor, gCalcMatrix);
GSGM_BACK();
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
}
void func_i3_801915A4(Actor* actor) {
@@ -1114,11 +1114,11 @@ void func_i3_80191BC4(Actor* actor) {
void func_i3_80191DB0(Actor* actor) {
RCP_SetupDL_40();
GDL(D_6019EB0);
gSPDisplayList(gMasterDisp++, D_6019EB0);
Matrix_RotateY(gGfxMatrix, actor->fwork[0] * 0.7f * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, actor->fwork[0] * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_6023D50);
gSPDisplayList(gMasterDisp++, D_6023D50);
}
void func_i3_80191E94(s32 limbIndex, Vec3f* rot, void* thisx) {
@@ -1745,15 +1745,15 @@ s32 func_i3_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t
if (sZoLimbTimers[limbIndex] == LIMB_DESTROYED) {
*dList = NULL;
}
GSGM_BACK();
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
if (sZoSwork[ZO_BSS_37] != 255) {
RCP_SetupDL_46();
GPC(255, 255, sZoSwork[ZO_BSS_37], sZoSwork[ZO_BSS_37]);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, sZoSwork[ZO_BSS_37], sZoSwork[ZO_BSS_37]);
} else if (!(sZoLimbTimers[limbIndex] & 1)) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
RCP_SetupDL_27();
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
switch (limbIndex) {
case ZO_LIMB_1:
@@ -1766,7 +1766,7 @@ s32 func_i3_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t
}
/* fallthrough */
case ZO_LIMB_12:
GCGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
break;
case ZO_LIMB_2:
@@ -3516,7 +3516,7 @@ void func_i3_80199A28(Actor* actor) {
void func_i3_80199E24(Actor* actor) {
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_6025E60);
gSPDisplayList(gMasterDisp++, D_6025E60);
}
void func_i3_80199E9C(Actor* actor, f32 arg1, f32 arg2) {
@@ -3597,13 +3597,12 @@ void func_i3_8019A1FC(Actor* actor) {
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
GDL(D_601C590);
gSPDisplayList(gMasterDisp++, D_601C590);
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
GCGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
if (((actor->unk_0B8 == 1) && (gBosses[0].timer_052 != 0)) || (actor->unk_0B8 == 0)) {
Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, 1);
}
// var_s1 = 1;
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++) {
@@ -3621,7 +3620,7 @@ void func_i3_8019A1FC(Actor* actor) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_6018660);
gSPDisplayList(gMasterDisp++, D_6018660);
Matrix_Pop(&gGfxMatrix);
}
}
@@ -3779,10 +3778,10 @@ void func_i3_8019ACCC(Actor* actor) {
var_fs5 = 90.0f;
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
GSGM_BACK();
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
if ((gBosses[0].actionState != 6) && (gBosses[0].actionState != 7)) {
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
GCGM_BACK();
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;
@@ -3814,7 +3813,7 @@ void func_i3_8019ACCC(Actor* actor) {
Matrix_RotateX(gGfxMatrix, 1.5707964f, 1);
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_6018660);
gSPDisplayList(gMasterDisp++, D_6018660);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gGfxMatrix);
var_fs5 += 90.0f;
@@ -3828,14 +3827,14 @@ void func_i3_8019ACCC(Actor* actor) {
Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL(&gMasterDisp, 70);
GPC(255, 255, 255, 255);
GDL(D_6004380);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
gSPDisplayList(gMasterDisp++, D_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_SetGfxMtx(&gMasterDisp);
RCP_SetupDL_55();
GDL(D_601BCC0);
gSPDisplayList(gMasterDisp++, D_601BCC0);
}
Vec3f D_i3_801BF744[3] = {
@@ -3962,7 +3961,7 @@ void func_i3_8019B548(Actor* actor) {
}
void func_i3_8019B7DC(Actor* actor) {
GDL(D_6006360);
gSPDisplayList(gMasterDisp++, D_6006360);
}
void func_i3_8019B810(Actor* actor) {
@@ -4161,7 +4160,7 @@ void func_i3_8019BE48(Actor* actor) {
}
void func_i3_8019C1CC(Actor* actor) {
GDL(D_6002E10);
gSPDisplayList(gMasterDisp++, D_6002E10);
}
Vec3f D_i3_801BF8AC = { 230.0f, -50.0f, 0.0f };
@@ -4293,25 +4292,25 @@ void func_i3_8019C83C(Actor* actor) {
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, actor->fwork[0] * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_601A340);
gSPDisplayList(gMasterDisp++, D_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_SetGfxMtx(&gMasterDisp);
GDL(D_6013330);
gSPDisplayList(gMasterDisp++, D_6013330);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, 1.5707964f, 1);
Matrix_Translate(gGfxMatrix, -110.0f, 0.0f, 0.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_601D680);
gSPDisplayList(gMasterDisp++, D_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_SetGfxMtx(&gMasterDisp);
GDL(D_601C590);
gSPDisplayList(gMasterDisp++, D_601C590);
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, 1);
@@ -4332,7 +4331,7 @@ void func_i3_8019C83C(Actor* actor) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_6018660);
gSPDisplayList(gMasterDisp++, D_6018660);
Matrix_Pop(&gGfxMatrix);
}
}
@@ -4407,20 +4406,20 @@ void func_i3_8019CE58(Actor* actor) {
Matrix_Scale(gGfxMatrix, actor->fwork[1], actor->fwork[2], actor->fwork[3], 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (D_80161684 != 0) {
GPC(255, 191, 43, 255);
GEC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 255);
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
} else {
GPC(255, 255, 255, 255);
GEC(255, 255, 127, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
gDPSetEnvColor(gMasterDisp++, 255, 255, 127, 255);
}
} else if (D_80161684 != 0) {
GPC(255, 191, 43, 50);
GEC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 50);
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
} else {
GPC(255, 255, 255, 50);
GEC(255, 255, 127, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 50);
gDPSetEnvColor(gMasterDisp++, 255, 255, 127, 255);
}
GDL(D_60181E0);
gSPDisplayList(gMasterDisp++, D_60181E0);
}
#ifdef NON_MATCHING
+477 -19
View File
@@ -373,10 +373,6 @@ f32 D_i3_801C0828[51] = {
};
Vec3f D_i3_801C08F4 = { 0.0f, 0.0f, 0.0f };
typedef struct {
char unk_00[0x148];
} UnkStruct_1C4308;
PosRot* D_i3_801C27C0;
PosRot D_i3_801C27C8[4][50];
Vtx D_i3_801C3A88[2][2][28];
@@ -385,39 +381,501 @@ s32 D_i3_801C4190[10];
f32 D_i3_801C41B8[30];
s32 D_i3_801C4230[28];
s32 D_i3_801C42A0[25];
UnkStruct_1C4308 D_i3_801C4308;
f32 D_i3_801C4308[82];
s32 D_i3_801C4450;
s32 D_i3_801C4454;
f32 D_i3_801C4458;
f32 D_i3_801C445C;
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A8E30.s")
extern Gfx D_3000130[];
extern Gfx D_3000470[];
extern Gfx D_3000AF0[];
extern Gfx D_3000C70[];
extern Gfx D_3006AF0[];
extern Gfx D_3006C70[];
extern Gfx D_3006DE0[];
extern AnimationHeader D_6000AE4;
extern Limb* D_6000DB0[];
extern AnimationHeader D_6002628;
extern Limb* D_6002874[];
extern Gfx D_6002C10[];
extern AnimationHeader D_6005954;
extern Limb* D_6005A80[];
extern u8 D_6008EC8[];
extern u8 D_6008FC8[];
extern Vtx D_6011A78[];
extern AnimationHeader D_60135E0;
extern Limb* D_60136CC;
extern Limb* D_60137CC;
extern Gfx D_60137F0[];
extern Gfx D_6014030[];
extern AnimationHeader D_6014438;
extern Limb* D_6014504[];
extern Gfx D_6014520[];
extern Gfx D_6014FD0[];
extern Vtx D_6018878[];
extern Vtx D_6018C78[];
extern Vtx D_6019078[];
extern u8 D_6019238[];
extern u8 D_6019338[];
extern Gfx D_60194D0[];
extern Gfx D_6019880[];
extern Gfx D_6019E80[];
extern AnimationHeader D_601DE50;
extern AnimationHeader D_601EC68;
extern Limb* D_601EDB4[];
extern AnimationHeader D_6020A40;
extern Limb* D_6020C6C[];
extern AnimationHeader D_6023780;
extern Limb* D_602390C[];
extern Gfx D_6024A50[];
extern AnimationHeader D_6024F80;
extern Limb* D_602512C;
extern AnimationHeader D_60260EC;
extern Limb* D_60263F8[];
extern AnimationHeader D_602AC28;
extern Limb* D_602BD60[];
extern f32 D_6030D3C[];
extern f32 D_6030D58[];
extern f32 D_60314AC[];
extern f32 D_60314E4[];
extern f32 D_603151C[];
extern Vtx D_6031D90[];
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A92EC.s")
void func_i3_801A8E30(void);
void func_i3_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 mode);
void func_i3_801A9374(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 unkB8, f32 scale,
s32 timerBC, s32 unk48);
void func_i3_801A9448(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 unkB8, f32 scale, s32 timerBC,
s32 unk48);
void func_i3_801A94EC(Vec3f* pos, ObjectId objId);
f32 func_i3_801A958C(s32 arg0, f32 arg1);
void func_i3_801A95C8(void);
void func_i3_801A96DC(Actor* actor);
void func_i3_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread);
void func_i3_801A9824(void);
void func_i3_801A99D4(Player* player);
void func_i3_801A9C98(Player* player);
void func_i3_801A9DE4(Player* player);
void func_i3_801A9ED0(Player* player);
void func_i3_801AA20C(void);
void func_i3_801AA4BC(Player* player);
void func_i3_801AA8E8(Player* player);
void func_i3_801AACF8(Player* player);
void func_i3_801AB9B0(Player* player);
void func_i3_801ABA40(PlayerShot* shot);
void func_i3_801AC09C(Player* player);
void func_i3_801AC18C(Player* player);
void func_i3_801AC274(Player* player);
void func_i3_801AC7C8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E);
void func_i3_801AC8A8(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E);
void func_i3_801AC918(Effect* effect);
void func_i3_801ACBB4(Player* player);
void func_i3_801ACE50(Player* player);
void func_i3_801AD328(Player* player);
void func_i3_801AD598(Actor* actor);
void func_i3_801AD688(Actor* actor);
void func_i3_801AD6C0(Actor* actor);
void func_i3_801AE168(Actor* actor);
void func_i3_801AE3AC(Actor* actor);
void func_i3_801AE3D8(Actor* actor);
void func_i3_801AEB44(Actor* actor);
void func_i3_801AF9FC(Actor* actor);
void func_i3_801AFA5C(Actor* actor);
void func_i3_801B099C(Actor* actor);
void func_i3_801B0B60(Actor* actor);
void func_i3_801B0EC0(Actor* actor);
void func_i3_801B0F88(Boss* bossAQ);
void func_i3_801B0FCC(Boss* bossAQ);
void func_i3_801B1008(Boss* bossAQ, s16 timer);
void func_i3_801B10F8(Boss* bossAQ);
void func_i3_801B134C(Boss* bossAQ);
bool func_i3_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801B4D84(Boss* bossAQ);
bool func_i3_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801B504C(Actor* actor);
void func_i3_801B50E8(Actor* actor);
bool func_i3_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801B619C(Actor* actor);
void func_i3_801B6344(Actor* actor);
void func_i3_801B638C(Actor* actor);
void func_i3_801B6E54(Actor* actor);
void func_i3_801B6FF8(Actor* actor);
bool func_i3_801B76EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801B7754(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801B7A24(Actor* actor);
void func_i3_801B7AF0(Actor* actor);
void func_i3_801B7C78(Actor* actor);
bool func_i3_801B8C50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801B90DC(Actor* actor);
void func_i3_801B91A4(Actor* actor);
void func_i3_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801BA108(Actor* actor);
void func_i3_801BA26C(Actor* actor);
void func_i3_801BA4E4(Actor* actor);
void func_i3_801BA57C(Actor* actor);
void func_i3_801BA6A4(Actor* actor);
void func_i3_801BAD7C(Actor* actor);
void func_i3_801BADF8(Actor* actor);
void func_i3_801BB0C4(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801BB204(Actor* actor);
void func_i3_801BB26C(Actor* actor);
void func_i3_801BB79C(Actor* actor);
bool func_i3_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801BC91C(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801BC930(Actor* actor);
void func_i3_801BC9A0(Actor* actor);
void func_i3_801BD17C(s32 limbIndex, Vec3f* rot, void* thisx);
void func_i3_801BD264(Actor* actor);
void func_i3_801BD3B0(Actor* actor, f32 x, f32 y, f32 z);
void func_i3_801BD54C(Actor* actor);
bool func_i3_801BDDFC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx);
void func_i3_801BDE6C(Actor* actor);
void func_i3_801BDF14(void);
void func_i3_801BE034(Actor* actor);
void func_i3_801BE0F0(Actor* actor);
void func_i3_801BE1FC(Object_80* obj80);
void func_i3_801BE274(Actor* actor, f32 yRot, f32 xRot);
void func_i3_801BE3F8(Actor* actor);
void func_i3_801BEB1C(Actor* actor);
void func_i3_801BEC68(Actor* actor);
void func_i3_801BEC74(Actor* actor);
void func_i3_801BEC80(Player* player);
void func_i3_801BEC8C(UNK_TYPE arg0);
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9374.s")
void func_i3_801A8E30(void) {
s32 i;
f32 spA8[17];
f32 sp64[17];
s32 j;
Vtx* sp5C = SEGMENTED_TO_VIRTUAL(D_6031D90);
Vtx* sp58 = SEGMENTED_TO_VIRTUAL(D_6011A78);
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9448.s")
for (i = 0; i < 17; i++) {
if ((i == 0) || (i == 16)) {
spA8[i] = 0.0f;
sp64[i] = 0.0f;
} else {
spA8[i] = (Rand_ZeroOne() - 0.5f) * 70.0f;
sp64[i] = (Rand_ZeroOne() - 0.5f) * 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];
sp58[i].v.ob[1] = sp5C[i].v.ob[1] + sp64[j];
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A94EC.s")
void func_i3_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 mode) {
gUnkEntities30[index].mode = mode;
gUnkEntities30[index].unk_28 = 10.0f;
gUnkEntities30[index].unk_04.x = actor->obj.pos.x;
gUnkEntities30[index].unk_04.y = actor->obj.pos.y;
gUnkEntities30[index].unk_04.z = actor->obj.pos.z;
gUnkEntities30[index].unk_10.x = xUnk;
gUnkEntities30[index].unk_10.y = yUnk;
gUnkEntities30[index].unk_10.z = zUnk;
gUnkEntities30[index].unk_2C = gUnkEntities30[index].unk_2D = gUnkEntities30[index].unk_2E =
gUnkEntities30[index].unk_2F = 255;
gUnkEntities30[index].timer = 3;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A958C.s")
void func_i3_801A9374(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 unkB8, f32 scale,
s32 timerBC, s32 unk48) {
Actor_Initialize(actor);
actor->obj.status = 2;
actor->obj.id = 189;
actor->unk_0B8 = unkB8;
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);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A95C8.s")
void func_i3_801A9448(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 unkB8, f32 scale, s32 timerBC,
s32 unk48) {
s32 i;
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A96DC.s")
for (i = 59; i >= 0; i--) {
if (gActors[i].obj.status == 0) {
func_i3_801A9374(&gActors[i], pos, rot, xVel, yVel, zVel, unkB8, scale, timerBC, unk48);
break;
}
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9728.s")
void func_i3_801A94EC(Vec3f* pos, ObjectId objId) {
Item* sp18;
Item* item;
s32 i;
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9824.s")
for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) {
if (item->obj.status == 0) {
Item_Initialize(item);
item->obj.status = 1;
item->obj.id = objId;
item->obj.pos.x = pos->x;
item->obj.pos.y = pos->y;
item->obj.pos.z = pos->z;
item->timer_4A = 2;
Object_SetInfo(&item->info, item->obj.id);
break;
}
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A99D4.s")
f32 func_i3_801A958C(s32 arg0, f32 arg1) {
f32 var_fv1 = arg0 / 2.0f;
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9C98.s")
var_fv1 = MIN(arg1, var_fv1);
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9DE4.s")
return var_fv1;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9ED0.s")
void func_i3_801A95C8(void) {
Math_SmoothStepToF(&gPlayer[0].camEye.x, D_80177978, 0.1f, 50.0f, 0.0001f);
Math_SmoothStepToF(&gPlayer[0].camEye.y, D_80177980, 0.1f, 50.0f, 0.0001f);
Math_SmoothStepToF(&gPlayer[0].camEye.z, D_80177988, 0.1f, 50.0f, 0.0001f);
Math_SmoothStepToF(&gPlayer[0].camAt.x, D_801779A0, 0.1f, 50.0f, 0.0001f);
Math_SmoothStepToF(&gPlayer[0].camAt.y, D_801779B8, 0.1f, 50.0f, 0.0001f);
Math_SmoothStepToF(&gPlayer[0].camAt.z, D_801779C0, 0.1f, 50.0f, 0.0001f);
}
void func_i3_801A96DC(Actor* actor) {
actor->obj.rot.y = RAD_TO_DEG(-gPlayer->unk_058);
actor->obj.rot.x = RAD_TO_DEG(gPlayer->unk_05C);
}
void func_i3_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread) {
f32 temp_fs0;
f32 temp_fs1;
f32 temp;
s32 i;
for (i = 0; i < 36; i += spread) {
temp_fs1 = __sinf(i * 10.0f * M_DTOR) * radius;
temp_fs0 = __cosf(i * 10.0f * M_DTOR) * radius;
temp = gGroundLevel + 30.0f;
func_8007B8F8(actor->obj.pos.x + temp_fs1, temp, actor->obj.pos.z + temp_fs0, scale);
}
}
void func_i3_801A9824(void) {
s32 i;
f32* var_v0;
f32* var_v0_4;
s32* var_a0;
s32* var_v0_2;
s32* var_v0_3;
gTeamShields[1] = gTeamShields[2] = gTeamShields[3] = 0xFF;
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 < ARRAY_COUNT(D_i3_801C4230); i++) {
D_i3_801C4230[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;
}
D_i3_801C4458 = D_i3_801C445C = 0.0f;
D_i3_801C4450 = D_i3_801C4454 = 0;
D_i3_801C41B8[12] = 40.0f;
D_i3_801C41B8[13] = 100.0f;
D_i3_801C41B8[14] = 120.0f;
D_i3_801C41B8[15] = 20.0f;
D_i3_801C41B8[16] = 30.0f;
D_i3_801C41B8[17] = 50.0f;
if (D_80177CA0 != 0) {
D_i3_801C41B8[12] = 0.0f;
D_i3_801C41B8[13] = 3.0f;
D_i3_801C41B8[14] = 5.0f;
D_i3_801C41B8[15] = 0.0f;
D_i3_801C41B8[16] = 0.0f;
D_i3_801C41B8[17] = 0.0f;
}
D_i3_801C4190[5] = 0;
D_i3_801C41B8[25] = D_8015F970;
D_i3_801C41B8[26] = 128.0f;
}
void func_i3_801A99D4(Player* player) {
s32 sp24 = fabsf(player->unk_138 / 1000.0f);
Math_SmoothStepToF(&D_8015F970, D_i3_801C41B8[25], 1.0f, 10.0f, 0.00001f);
Math_SmoothStepToF(&D_i3_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_i3_801C4188 - 6.0f;
if (D_i3_801C41B8[26] < 0.0f) {
D_i3_801C41B8[26] = 0.0f;
}
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;
}
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];
}
}
void func_i3_801A9C98(Player* player) {
Actor* actor;
s32 i;
s32 var_v0;
if ((D_i3_801C4190[0] != 777) && (D_i3_801C4190[0] > 0)) {
i = D_i3_801C4190[0] - 1;
actor = &gActors[i];
if ((actor->obj.status != 2) || ((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[1] = 0;
D_i3_801C4190[5] = 0;
D_i3_801C4190[3] = 0;
D_i3_801C4190[0] = 0;
} else {
var_v0 = 1;
if (actor->info.hitbox[1] == 200000.0f) {
var_v0 = 5;
}
D_i3_801C41B8[2] = actor->obj.pos.z + actor->info.hitbox[var_v0 + 0] + actor->info.hitbox[var_v0 + 1];
D_i3_801C41B8[1] = actor->obj.pos.y + actor->info.hitbox[var_v0 + 2];
D_i3_801C41B8[0] = actor->obj.pos.x + actor->info.hitbox[var_v0 + 4];
}
}
}
void func_i3_801A9DE4(Player* player) {
s32 i;
if (D_i3_801C4190[0] == 777) {
if ((gBosses[0].obj.status != OBJ_ACTIVE) || (gBosses[0].health == 0) || (fabsf(D_i3_801C4308[10]) <= 6.0f) ||
((D_i3_801C4190[4] == 0x79) && (gBosses[0].swork[0xC] == 0))) {
D_i3_801C4190[1] = 0;
D_i3_801C4190[5] = 0;
D_i3_801C4190[3] = 0;
D_i3_801C4190[4] = 0;
D_i3_801C4190[0] = 0;
} else {
i = D_i3_801C4190[4] - 2;
D_i3_801C41B8[2] = gBosses[0].obj.pos.z + gBosses[0].info.hitbox[i + 0] + gBosses[0].info.hitbox[i + 1];
D_i3_801C41B8[1] = gBosses[0].obj.pos.y + gBosses[0].info.hitbox[i + 2];
D_i3_801C41B8[0] = gBosses[0].obj.pos.x + gBosses[0].info.hitbox[i + 4];
}
}
}
// Loop looks really fake. optimized out index?
void func_i3_801A9ED0(Player* player) {
s32 j;
s32 i;
s32 sp8C;
f32 temp_fa0;
f32 temp_fa1;
f32 temp_fv0;
f32 temp_fv1;
Vec3f sp70;
Vec3f sp64;
f32* tempx;
f32* tempy;
f32* tempz;
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];
if ((fabsf(D_i3_801C4308[10]) >= 6.0f) && (gBosses[0].actionState >= 10) && (gBosses[0].obj.status == 2) &&
(gBosses[0].health != 0)) {
for (j = 119, i = 121; j < 199; j += 10, i += 10) {
if ((j == 119) || (j == 129) || (j == 139) || (j == 169)) {
tempy = &gBosses[0].info.hitbox[i];
temp_fv0 = gBosses[0].obj.pos.y + tempy[0] + tempy[1] + 200.0f;
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].actionState >= 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))) {
if (D_i3_801C41B8[11] >=
fabsf(player->unk_138 - 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]);
D_i3_801C4190[0] = 777;
D_i3_801C4190[4] = i;
D_i3_801C4190[1] = 318;
}
if (((j == 129) && (gBosses[0].swork[8] == 0)) || ((j == 139) && (gBosses[0].swork[9] == 0)) ||
((j == 119) && (gBosses[0].swork[0xC] == 0))) {
D_i3_801C4190[1] = 0;
D_i3_801C4190[5] = 0;
D_i3_801C4190[3] = 0;
D_i3_801C4190[4] = 0;
D_i3_801C4190[0] = 0;
}
}
}
}
if ((sp8C != D_i3_801C4190[4]) && (D_i3_801C41B8[5] == 3.0f)) {
Audio_PlaySfx(0x4900001B, D_800C5D28, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
D_i3_801C41B8[5] = 20.0f;
}
}
}
func_i3_801A9DE4(player);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AA20C.s")
File diff suppressed because it is too large Load Diff
+45 -45
View File
@@ -348,14 +348,14 @@ extern Gfx* D_6009300;
void func_i6_80188660(Actor* actor) {
RCP_SetupDL(&gMasterDisp, 0x3D);
GPC(255, 255, 255, 255);
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_SetGfxMtx(&gMasterDisp);
GDL(&D_6009300);
gSPDisplayList(gMasterDisp++, &D_6009300);
}
void func_i6_801887B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) {
@@ -1169,13 +1169,13 @@ s32 func_i6_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
if (boss->fwork[21] >= 254.0f) {
if (limbIndex == 2) {
RCP_SetupDL(&gMasterDisp, 0x16);
GPC((s32) boss->fwork[25], 255, 255, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) boss->fwork[25], 255, 255, 255);
} else {
RCP_SetupDL(&gMasterDisp, 0x17);
}
} else {
RCP_SetupDL(&gMasterDisp, 0x33);
GPC(255, 255, 255, (s32) boss->fwork[21]);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) boss->fwork[21]);
}
if ((limbIndex == 2) && (boss->swork[6] != 0)) {
*dList = NULL;
@@ -1202,10 +1202,10 @@ s32 func_i6_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
Matrix_SetGfxMtx(&gMasterDisp);
if ((boss->swork[3] & 1) && (boss->fwork[21] >= 254.0f)) {
RCP_SetupDL(&gMasterDisp, 0x1B);
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
GDL(*dList);
gSPDisplayList(gMasterDisp++, *dList);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gCalcMatrix);
}
@@ -1235,12 +1235,12 @@ void func_i6_8018B8C0(Boss* boss) {
Animation_DrawSkeleton(0, D_600C0A4, boss->vwork, func_i6_8018B47C, NULL, boss, &gIdentityMatrix);
if (boss->fwork[21] >= 254) {
RCP_SetupDL(&gMasterDisp, 0x36);
GPC(255, 64, 64, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, 255);
} else {
RCP_SetupDL(&gMasterDisp, 0x46);
GPC(255, 64, 64, (s32) boss->fwork[21]);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, (s32) boss->fwork[21]);
}
GCGM_BACK();
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);
@@ -1263,9 +1263,9 @@ void func_i6_8018B8C0(Boss* boss) {
Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (j == 9) {
GDL(&D_600C2D0);
gSPDisplayList(gMasterDisp++, &D_600C2D0);
} else {
GDL(&D_600C560);
gSPDisplayList(gMasterDisp++, &D_600C560);
}
Matrix_Pop(&gGfxMatrix);
}
@@ -1563,17 +1563,17 @@ static Gfx* D_i6_801A6790[10] = {
void func_i6_8018CF98(Effect* effect) {
if (effect->unk_4E == 10) {
GPC(255, 255, 255, effect->unk_44);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44);
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(&D_2010A30);
gSPDisplayList(gMasterDisp++, &D_2010A30);
} else {
RCP_SetupDL(&gMasterDisp, 0x1D);
if (effect->unk_4C < 8) {
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
Matrix_SetGfxMtx(&gMasterDisp);
}
GDL(D_i6_801A6790[effect->unk_4C]);
gSPDisplayList(gMasterDisp++, D_i6_801A6790[effect->unk_4C]);
RCP_SetupDL(&gMasterDisp, 0x40);
}
}
@@ -2884,20 +2884,20 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
*dList = NULL;
} else if (boss->swork[3] & 1) {
RCP_SetupDL(&gMasterDisp, 0x1B);
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
} else if (boss->swork[4] < 0) {
*dList = NULL;
} else if (boss->swork[2] & 1) {
RCP_SetupDL(&gMasterDisp, 0x1B);
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
}
} else if (!(boss->timer_05C & 1)) {
RCP_SetupDL(&gMasterDisp, 0x1D);
} else {
RCP_SetupDL(&gMasterDisp, 0x1B);
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
switch (limbIndex) {
@@ -2914,7 +2914,7 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
rot->y -= boss->vwork[4].y;
if (boss->swork[0] & 1) {
RCP_SetupDL(&gMasterDisp, 0x1B);
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
if (boss->swork[11] != 0) {
*dList = D_C0043D0;
@@ -2927,7 +2927,7 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
rot->y -= boss->vwork[5].y;
if (boss->swork[1] & 1) {
RCP_SetupDL(&gMasterDisp, 0x1B);
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
if (boss->swork[12] != 0) {
*dList = D_C015740;
@@ -3010,20 +3010,20 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
Matrix_Push(&gCalcMatrix);
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(*dList);
gSPDisplayList(gMasterDisp++, *dList);
RCP_SetupDL(&gMasterDisp, 0x29);
switch (gGameFrameCount & 3) {
case 0:
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
break;
case 1:
GPC(0, 255, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255);
break;
case 2:
GPC(0, 0, 255, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 255, 255);
break;
case 3:
GPC(255, 255, 255, 255);
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);
@@ -3031,7 +3031,7 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
Matrix_RotateY(gGfxMatrix, D_i6_801A67EC * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, D_i6_801A67E8 * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_C022520);
gSPDisplayList(gMasterDisp++, D_C022520);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gCalcMatrix);
}
@@ -3049,20 +3049,20 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
Matrix_Push(&gCalcMatrix);
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(*dList);
gSPDisplayList(gMasterDisp++, *dList);
RCP_SetupDL(&gMasterDisp, 0x29);
switch (gGameFrameCount & 3) {
case 0:
GPC(255, 0, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
break;
case 1:
GPC(0, 255, 0, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255);
break;
case 2:
GPC(0, 0, 255, 255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 255, 255);
break;
case 3:
GPC(255, 255, 255, 255);
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);
@@ -3070,7 +3070,7 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
Matrix_RotateY(gGfxMatrix, D_i6_801A67D4 * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, D_i6_801A67D0 * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_C022520);
gSPDisplayList(gMasterDisp++, D_C022520);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gCalcMatrix);
}
@@ -3090,7 +3090,7 @@ s32 func_i6_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
func_8005F670(&sp88);
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(*dList);
gSPDisplayList(gMasterDisp++, *dList);
}
Matrix_Pop(&gCalcMatrix);
return true;
@@ -3199,23 +3199,23 @@ void func_i6_801928C8(Boss* boss) {
if (boss->fwork[21] > 0.05f) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, 0x43);
GPC(255, 255, 255, 192);
GEC(255, 0, 128, 192);
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) {
Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, 1);
}
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_1024AC0);
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);
RCP_SetupDL(&gMasterDisp, 0x40);
if (gGameFrameCount & 1) {
GPC(255, 255, 255, 128);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
} else {
GPC(255, 255, 255, 30);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 30);
}
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, 0.0f, 1);
@@ -3223,7 +3223,7 @@ void func_i6_801928C8(Boss* boss) {
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_C017440);
gSPDisplayList(gMasterDisp++, D_C017440);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, 2.0943952f, 1);
@@ -3231,7 +3231,7 @@ void func_i6_801928C8(Boss* boss) {
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_C017440);
gSPDisplayList(gMasterDisp++, D_C017440);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, 4.1887903f, 1);
@@ -3239,7 +3239,7 @@ void func_i6_801928C8(Boss* boss) {
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
GDL(D_C017440);
gSPDisplayList(gMasterDisp++, D_C017440);
Matrix_Pop(&gGfxMatrix);
}
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
@@ -3314,7 +3314,7 @@ extern Gfx* D_6007E20;
void func_i6_80193244(Actor* actor) {
GDL(&D_6007E20);
gSPDisplayList(gMasterDisp++, &D_6007E20);
if (actor->timer_0BC != 0) {
f32 scale;
u8 alpha;
@@ -3329,9 +3329,9 @@ void func_i6_80193244(Actor* actor) {
Matrix_RotateX(gGfxMatrix, 1.5707964f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL(&gMasterDisp, 0x43);
GPC(255, 255, 255, alpha);
GEC(255, 128, 128, alpha);
GDL(D_1024AC0);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha);
gDPSetEnvColor(gMasterDisp++, 255, 128, 128, alpha);
gSPDisplayList(gMasterDisp++, D_1024AC0);
}
}
@@ -3393,7 +3393,7 @@ void func_i6_801935D4(Object_80* obj80) {
Animation_GetFrameData(&D_6014658, obj80->unk_44, frameTable);
if (gLevelMode == LEVELMODE_ALL_RANGE) {
GCGM_BACK();
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
Animation_DrawSkeleton(1, D_6014844, frameTable, func_i6_801935B4, NULL, NULL, &gIdentityMatrix);
}
+4 -4
View File
@@ -56,21 +56,21 @@
- [0xE16C50, c, fox_i3]
- [0xE16C60, c, fox_a6]
- [0xE1F680, c, fox_zo]
- [0xE2DF20, c, sf_so]
- [0xE2DF20, c, fox_so]
- [0xE38560, c, sf_aq]
- [0xE4E3D0, .data, fox_i3]
- [0xE4E3E0, .data, fox_a6]
- [0xE4EC90, .data, fox_zo]
- [0xE4F010, .data, sf_so]
- [0xE4F010, .data, fox_so]
- [0xE4F290, .data, sf_aq]
- [0xE50030, .rodata, fox_a6]
- [0xE504E0, .rodata, fox_zo]
- [0xE50C00, .rodata, sf_so]
- [0xE50C00, .rodata, fox_so]
- [0xE51160, .rodata, sf_aq]
- { start: 0xE51970, 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: sf_so }
- { type: .bss, vram: 0x801C2740, name: fox_so }
- { type: .bss, vram: 0x801C27C0, name: sf_aq }
- name: ovl_i4