diff --git a/include/fox_map.h b/include/fox_map.h index 77f36a40..4a422424 100644 --- a/include/fox_map.h +++ b/include/fox_map.h @@ -1,24 +1,7 @@ #ifndef FOX_MAP_H #define FOX_MAP_H -typedef enum PlanetId { - /* 0 */ PLANET_METEO, - /* 1 */ PLANET_AREA_6, - /* 2 */ PLANET_BOLSE, - /* 3 */ PLANET_SECTOR_Z, - /* 4 */ PLANET_SECTOR_X, - /* 5 */ PLANET_SECTOR_Y, - /* 6 */ PLANET_KATINA, - /* 7 */ PLANET_MACBETH, - /* 8 */ PLANET_ZONESS, - /* 9 */ PLANET_CORNERIA, - /* 10 */ PLANET_TITANIA, - /* 11 */ PLANET_AQUAS, - /* 12 */ PLANET_FORTUNA, - /* 13 */ PLANET_VENOM, - /* 14 */ PLANET_SOLAR, - /* 15 */ PLANET_MAX, -} PlanetId; +#include "PR/ultratypes.h" typedef struct { /* 0x0 */ f32 angle; diff --git a/include/functions.h b/include/functions.h index d487781b..8831b110 100644 --- a/include/functions.h +++ b/include/functions.h @@ -233,6 +233,7 @@ void Object_Load(ObjectInit* , f32 , f32 , f32 , f32 ); void func_80062568(void); void func_80062B60(f32 xPos, f32 zPos, s32 arg2, f32 arg3); void func_80062C38(f32, f32); +bool func_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot); s32 func_800631A8(Vec3f*, f32*, Vec3f*); s32 func_8006326C(Vec3f* , Vec3f* , ObjectId , Object* ); s32 func_8006351C(s32 , Vec3f* , Vec3f* , s32 ); @@ -608,138 +609,138 @@ void func_E08400_80187B08(Actor *); void func_E08400_80188A40(Boss *); void func_E08400_8018CCF8(Actor *); -void func_E16C50_80187520(s32, void*); -void func_E16C50_80187754(Boss *); -void func_E16C50_80187944(Boss*); -void func_E16C50_8018C54C(Boss*); -void func_E16C50_8018DF74(Player *player); -void func_E16C50_8018ED78(Player*); +void func_i3_80187520(s32, void*); +void func_i3_80187754(Boss *); +void func_i3_80187944(Boss*); +void func_i3_8018C54C(Boss*); +void func_i3_8018DF74(Player *player); +void func_i3_8018ED78(Player*); -void func_E16C50_801900FC(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); -void func_E16C50_80190430(Actor *); -void func_E16C50_801904CC(Actor*); -void func_E16C50_80190A00(Actor*); -void func_E16C50_80190F08(Actor *); -void func_E16C50_80191010(Actor*); -void func_E16C50_801914C4(Actor*); -void func_E16C50_801915A4(Actor *); -void func_E16C50_80191680(Actor*); -void func_E16C50_80191B4C(Actor*); -void func_E16C50_80191BB8(Actor *); -void func_E16C50_80191BC4(Actor*); -void func_E16C50_80191DB0(Actor*); -void func_E16C50_80191DB0(Actor*); -void func_E16C50_80191FFC(Actor*); -void func_E16C50_80192094(Actor*); -void func_E16C50_80192834(Actor*); -void func_E16C50_80192C18(Actor*); -void func_E16C50_80192E64(Actor*); -void func_E16C50_80193240(Actor*); -void func_E16C50_801932AC(Boss*); -void func_E16C50_801949DC(Boss*); -void func_E16C50_80194A84(Boss*); -void func_E16C50_8019969C(Actor*); -void func_E16C50_8019983C(Actor*); -void func_E16C50_80199A28(Actor*); -void func_E16C50_80199E24(Actor*); -void func_E16C50_80199F10(Actor*); -void func_E16C50_8019A1FC(Actor*); -void func_E16C50_8019A5D4(Actor*); -void func_E16C50_8019ACCC(Actor*); -void func_E16C50_8019B1F0(Actor *); -void func_E16C50_8019B548(Actor*); -void func_E16C50_8019B7DC(Actor*); -void func_E16C50_8019B810(Actor *); -void func_E16C50_8019B854(Actor*); -void func_E16C50_8019BDE0(Actor*); -void func_E16C50_8019BE48(Actor*); -void func_E16C50_8019C1CC(Actor*); -void func_E16C50_8019C200(Actor *); -void func_E16C50_8019C454(Actor*); -void func_E16C50_8019C83C(Actor*); -void func_E16C50_8019CBEC(Actor*); -void func_E16C50_8019CE58(Actor*); -void func_E16C50_8019D060(Actor *); -void func_E16C50_8019D15C(Actor*); -void func_E16C50_8019D3C4(Actor*); -void func_E16C50_8019D428(Player* player); -void func_E16C50_8019D76C(Player* player); +void func_i3_801900FC(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); +void func_i3_80190430(Actor* actor); +void func_i3_801904CC(Actor* actor); +void func_i3_80190A00(Actor* actor); +void func_i3_80190F08(Actor* actor); +void func_i3_80191010(Actor* actor); +void func_i3_801914C4(Actor* actor); +void func_i3_801915A4(Actor* actor); +void func_i3_80191680(Actor* actor); +void func_i3_80191B4C(Actor* actor); +void func_i3_80191BB8(Actor* actor); +void func_i3_80191BC4(Actor* actor); +void func_i3_80191DB0(Actor* actor); +void func_i3_80191DB0(Actor* actor); +void func_i3_80191FFC(Actor* actor); +void func_i3_80192094(Actor* actor); +void func_i3_80192834(Actor* actor); +void func_i3_80192C18(Actor* actor); +void func_i3_80192E64(Actor* actor); +void func_i3_80193240(Actor* actor); +void func_i3_801932AC(Boss* bossZO); +void func_i3_801949DC(Boss* bossZO); +void func_i3_80194A84(Boss* bossZO); +void func_i3_8019969C(Actor* actor); +void func_i3_8019983C(Actor* actor); +void func_i3_80199A28(Actor* actor); +void func_i3_80199E24(Actor* actor); +void func_i3_80199F10(Actor* actor); +void func_i3_8019A1FC(Actor* actor); +void func_i3_8019A5D4(Actor* actor); +void func_i3_8019ACCC(Actor* actor); +void func_i3_8019B1F0(Actor* actor); +void func_i3_8019B548(Actor* actor); +void func_i3_8019B7DC(Actor* actor); +void func_i3_8019B810(Actor* actor); +void func_i3_8019B854(Actor* actor); +void func_i3_8019BDE0(Actor* actor); +void func_i3_8019BE48(Actor* actor); +void func_i3_8019C1CC(Actor* actor); +void func_i3_8019C200(Actor* actor); +void func_i3_8019C454(Actor* actor); +void func_i3_8019C83C(Actor* actor); +void func_i3_8019CBEC(Actor* actor); +void func_i3_8019CE58(Actor* actor); +void func_i3_8019D060(Actor* actor); +void func_i3_8019D15C(Actor* actor); +void func_i3_8019D3C4(Actor* actor); +void func_i3_8019D428(Player* player); +void func_i3_8019D76C(Player* player); -void func_E16C50_8019E8B8(f32, f32, f32, f32); -void func_E16C50_8019E9F4(f32, f32, f32, f32, f32, f32, f32, s32); -void func_E16C50_8019EA7C(Actor*); -void func_E16C50_8019F20C(Actor*); -void func_E16C50_8019F7AC(Actor*); -void func_E16C50_801A003C(Actor*); -void func_E16C50_801A0120(Effect*); -void func_E16C50_801A0AF0(Effect*); -void func_E16C50_801A10F4(Player* player); -void func_E16C50_801A5B3C(Boss*); -void func_E16C50_801A71B8(Boss*); -void func_E16C50_801A8BE8(Player* player); -void func_E16C50_801A7930(Player* player); +void func_i3_8019E8B8(f32, f32, f32, f32); +void func_i3_8019E9F4(f32, f32, f32, f32, f32, f32, f32, s32); +void func_i3_8019EA7C(Actor*); +void func_i3_8019F20C(Actor*); +void func_i3_8019F7AC(Actor*); +void func_i3_801A003C(Actor*); +void func_i3_801A0120(Effect*); +void func_i3_801A0AF0(Effect*); +void func_i3_801A10F4(Player* player); +void func_i3_801A5B3C(Boss*); +void func_i3_801A71B8(Boss*); +void func_i3_801A8BE8(Actor*); +void func_i3_801A7930(Player* player); -void func_E16C50_801A9824(void); -void func_E16C50_801AA20C(void); -void func_E16C50_801AA8E8(Player*); -void func_E16C50_801AACF8(Player*); -void func_E16C50_801ABA40(PlayerShot*); -void func_E16C50_801AC274(Player*); -void func_E16C50_801AC8A8(f32, f32, f32, f32, s32); -void func_E16C50_801AC8A8(f32, f32, f32, f32, s32); -void func_E16C50_801AC918(Effect*); -void func_E16C50_801ACBB4(void); -void func_E16C50_801ACE50(Player*); -void func_E16C50_801AD328(Player*); -void func_E16C50_801AD688(Actor *); -void func_E16C50_801AD6C0(Actor*); -void func_E16C50_801AE168(Actor*); -void func_E16C50_801AE3AC(Actor *); -void func_E16C50_801AE3D8(Actor*); -void func_E16C50_801AEB44(Actor*); -void func_E16C50_801AF9FC(Actor *); -void func_E16C50_801AFA5C(Actor*); -void func_E16C50_801B099C(Actor*); -void func_E16C50_801B0B60(Actor*); -void func_E16C50_801B0EC0(Actor*); -void func_E16C50_801B10F8(Boss*); -void func_E16C50_801B134C(Boss*); -void func_E16C50_801B4D84(Boss*); -void func_E16C50_801B504C(Actor*); -void func_E16C50_801B50E8(Actor*); -void func_E16C50_801B619C(Actor*); -void func_E16C50_801B6344(Actor *); -void func_E16C50_801B638C(Actor*); -void func_E16C50_801B6E54(Actor *); -void func_E16C50_801B6FF8(Actor*); -void func_E16C50_801B7A24(Actor*); -void func_E16C50_801B7AF0(Actor *); -void func_E16C50_801B7C78(Actor*); -void func_E16C50_801B90DC(Actor*); -void func_E16C50_801B91A4(Actor*); -void func_E16C50_801BA108(Actor*); -void func_E16C50_801BA26C(Actor*); -void func_E16C50_801BA4E4(Actor*); -void func_E16C50_801BA57C(Actor *); -void func_E16C50_801BA6A4(Actor*); -void func_E16C50_801BAD7C(Actor*); -void func_E16C50_801BADF8(Actor*); -void func_E16C50_801BB204(Actor*); -void func_E16C50_801BB26C(Actor *); -void func_E16C50_801BB79C(Actor*); -void func_E16C50_801BC930(Actor*); -void func_E16C50_801BC9A0(Actor*); -void func_E16C50_801BD264(Actor*); -void func_E16C50_801BD54C(Actor*); -void func_E16C50_801BDE6C(Actor*); -void func_E16C50_801BE1FC(Object_80*); -void func_E16C50_801BE3F8(Actor*); -void func_E16C50_801BEB1C(Actor*); -void func_E16C50_801BEC50(Boss*); -void func_E16C50_801BEC5C(Boss*); -void func_E16C50_801BEC68(Actor*); -void func_E16C50_801BEC74(Actor*); -void func_E16C50_801BEC80(Player*); +void func_i3_801A9824(void); +void func_i3_801AA20C(void); +void func_i3_801AA8E8(Player*); +void func_i3_801AACF8(Player*); +void func_i3_801ABA40(PlayerShot*); +void func_i3_801AC274(Player*); +void func_i3_801AC8A8(f32, f32, f32, f32, s32); +void func_i3_801AC8A8(f32, f32, f32, f32, s32); +void func_i3_801AC918(Effect*); +void func_i3_801ACBB4(void); +void func_i3_801ACE50(Player*); +void func_i3_801AD328(Player*); +void func_i3_801AD688(Actor *); +void func_i3_801AD6C0(Actor*); +void func_i3_801AE168(Actor*); +void func_i3_801AE3AC(Actor *); +void func_i3_801AE3D8(Actor*); +void func_i3_801AEB44(Actor*); +void func_i3_801AF9FC(Actor *); +void func_i3_801AFA5C(Actor*); +void func_i3_801B099C(Actor*); +void func_i3_801B0B60(Actor*); +void func_i3_801B0EC0(Actor*); +void func_i3_801B10F8(Boss*); +void func_i3_801B134C(Boss*); +void func_i3_801B4D84(Boss*); +void func_i3_801B504C(Actor*); +void func_i3_801B50E8(Actor*); +void func_i3_801B619C(Actor*); +void func_i3_801B6344(Actor *); +void func_i3_801B638C(Actor*); +void func_i3_801B6E54(Actor *); +void func_i3_801B6FF8(Actor*); +void func_i3_801B7A24(Actor*); +void func_i3_801B7AF0(Actor *); +void func_i3_801B7C78(Actor*); +void func_i3_801B90DC(Actor*); +void func_i3_801B91A4(Actor*); +void func_i3_801BA108(Actor*); +void func_i3_801BA26C(Actor*); +void func_i3_801BA4E4(Actor*); +void func_i3_801BA57C(Actor *); +void func_i3_801BA6A4(Actor*); +void func_i3_801BAD7C(Actor*); +void func_i3_801BADF8(Actor*); +void func_i3_801BB204(Actor*); +void func_i3_801BB26C(Actor *); +void func_i3_801BB79C(Actor*); +void func_i3_801BC930(Actor*); +void func_i3_801BC9A0(Actor*); +void func_i3_801BD264(Actor*); +void func_i3_801BD54C(Actor*); +void func_i3_801BDE6C(Actor*); +void func_i3_801BE1FC(Object_80*); +void func_i3_801BE3F8(Actor*); +void func_i3_801BEB1C(Actor*); +void func_i3_801BEC50(Boss*); +void func_i3_801BEC5C(Boss*); +void func_i3_801BEC68(Actor*); +void func_i3_801BEC74(Actor*); +void func_i3_801BEC80(Player*); void func_E51970_80187520(s32, void*); diff --git a/include/sf64dma.h b/include/sf64dma.h index 2655d9f6..f92217ad 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -103,13 +103,13 @@ extern OverlayInit sOvlE08400_Meteo[2]; // E08400 extern OverlayInit sOvlE6A810_Titania[6]; // E6A810 extern OverlayInit sOvlE08400_SectorX[2]; // E08400 extern OverlayInit sOvlE51970_SectorZ[1]; // E51970 -extern OverlayInit sOvlE16C50_Aquas[1]; // E16C50 -extern OverlayInit sOvlE16C50_Area6[1]; // E16C50 +extern OverlayInit sOvli3_Aquas[1]; // i3 +extern OverlayInit sOvli3_Area6[1]; // i3 extern OverlayInit sOvlE51970_Fortuna[2]; // E51970 -extern OverlayInit sOvlE16C50_Unk4[1]; // E16C50 +extern OverlayInit sOvli3_Unk4[1]; // i3 extern OverlayInit sOvlE9F1D0_SectorY[1]; // E9F1D0 -extern OverlayInit sOvlE16C50_Solar[1]; // E16C50 -extern OverlayInit sOvlE16C50_Zoness[1]; // E16C50 +extern OverlayInit sOvli3_Solar[1]; // i3 +extern OverlayInit sOvli3_Zoness[1]; // i3 extern OverlayInit sOvlDF4260_Venom1[1]; // DF4260 extern OverlayInit sOvlE9F1D0_Venom2[1]; // E9F1D0 extern OverlayInit sOvlE9F1D0_VenomSW[2]; // E9F1D0 @@ -178,7 +178,7 @@ DECLARE_SEGMENT(ast_DDC010); DECLARE_SEGMENT(ast_DE5D50); DECLARE_SEGMENT(ovl_DF4260); DECLARE_SEGMENT(ovl_E08400); -DECLARE_SEGMENT(ovl_E16C50); +DECLARE_SEGMENT(ovl_i3); DECLARE_SEGMENT(ovl_E51970); DECLARE_SEGMENT(ovl_E6A810); DECLARE_SEGMENT(ovl_E9F1D0); diff --git a/include/sf64level.h b/include/sf64level.h index 186f606c..69078b02 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -88,6 +88,25 @@ typedef enum LevelId { /* 77 */ LEVEL_WARP_ZONE = 77, } LevelId; +typedef enum PlanetId { + /* 0 */ PLANET_METEO, + /* 1 */ PLANET_AREA_6, + /* 2 */ PLANET_BOLSE, + /* 3 */ PLANET_SECTOR_Z, + /* 4 */ PLANET_SECTOR_X, + /* 5 */ PLANET_SECTOR_Y, + /* 6 */ PLANET_KATINA, + /* 7 */ PLANET_MACBETH, + /* 8 */ PLANET_ZONESS, + /* 9 */ PLANET_CORNERIA, + /* 10 */ PLANET_TITANIA, + /* 11 */ PLANET_AQUAS, + /* 12 */ PLANET_FORTUNA, + /* 13 */ PLANET_VENOM, + /* 14 */ PLANET_SOLAR, + /* 15 */ PLANET_MAX, +} PlanetId; + typedef enum VsStage { /* 0 */ VS_STAGE_CORNERIA, /* 1 */ VS_STAGE_KATINA, diff --git a/include/sf64object.h b/include/sf64object.h index 64cee6df..5f50a04f 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -208,9 +208,9 @@ typedef struct { /* 0x01C */ ObjectInfo info; /* 0x040 */ s32 index; /* 0x044 */ s16 unk_044; - /* 0x046 */ char unk_46[0x6]; + /* 0x046 */ char unk_46[6]; /* 0x04C */ s16 unk_04C; - /* 0x04E */ s16 unk_04E; + /* 0x04E */ s16 actionState; /* 0x050 */ s16 timer_050; /* 0x052 */ s16 timer_052; /* 0x054 */ s16 timer_054; @@ -219,15 +219,13 @@ typedef struct { /* 0x05A */ s16 timer_05A; /* 0x05C */ s16 timer_05C; /* 0x05E */ u8 unk_05E; - /* 0x060 */ s16 unk_060; - /* 0x062 */ s8 unk_062; - /* 0x064 */ s16 unk_064; - /* 0x066 */ s16 unk_066; + /* 0x060 */ s16 health; + /* 0x062 */ s8 dmgType; + /* 0x064 */ s16 damage; + /* 0x066 */ s16 dmgPart; /* 0x068 */ f32 unk_068; /* 0x06C */ Vec3f vel; - /* 0x078 */ f32 unk_078; - /* 0x07C */ f32 unk_07C; - /* 0x080 */ char pad80[4]; + /* 0x078 */ Vec3f unk_078; /* 0x084 */ f32 gravity; /* 0x088 */ s16 swork[40]; /* 0x0D8 */ f32 fwork[50]; @@ -236,6 +234,10 @@ typedef struct { /* 0x3FC */ Vec3f sfxPos; } Boss; // size = 0x408 +#define DMG_BEAM 1 +#define DMG_NONE 0 +#define DMG_BOMB -1 + typedef struct { /* 0x000 */ Object obj; /* 0x01C */ ObjectInfo info; @@ -262,7 +264,6 @@ typedef struct { /* 0x0CA */ u8 timer_0CA[4]; /* 0x0CE */ s16 unk_0CE; /* 0x0D0 */ s8 unk_0D0; - /* 0x0D1 */ char pad0D1[0x1]; /* 0x0D2 */ s16 unk_0D2; /* 0x0D4 */ s16 unk_0D4; /* 0x0D6 */ u16 unk_0D6; @@ -693,4 +694,158 @@ typedef enum{ #define OBJ_UNK_1000 1000 +// template enums for boss work buffers + +typedef enum { + /* 0 */ LN_SWK_0, + /* 1 */ LN_SWK_1, + /* 2 */ LN_SWK_2, + /* 3 */ LN_SWK_3, + /* 4 */ LN_SWK_4, + /* 5 */ LN_SWK_5, + /* 6 */ LN_SWK_6, + /* 7 */ LN_SWK_7, + /* 8 */ LN_SWK_8, + /* 9 */ LN_SWK_9, + /* 10 */ LN_SWK_10, + /* 11 */ LN_SWK_11, + /* 12 */ LN_SWK_12, + /* 13 */ LN_SWK_13, + /* 14 */ LN_SWK_14, + /* 15 */ LN_SWK_15, + /* 16 */ LN_SWK_16, + /* 17 */ LN_SWK_17, + /* 18 */ LN_SWK_18, + /* 19 */ LN_SWK_19, + /* 20 */ LN_SWK_20, + /* 21 */ LN_SWK_21, + /* 22 */ LN_SWK_22, + /* 23 */ LN_SWK_23, + /* 24 */ LN_SWK_24, + /* 25 */ LN_SWK_25, + /* 26 */ LN_SWK_26, + /* 27 */ LN_SWK_27, + /* 28 */ LN_SWK_28, + /* 29 */ LN_SWK_29, + /* 30 */ LN_SWK_30, + /* 31 */ LN_SWK_31, + /* 32 */ LN_SWK_32, + /* 33 */ LN_SWK_33, + /* 34 */ LN_SWK_34, + /* 35 */ LN_SWK_35, + /* 36 */ LN_SWK_36, + /* 37 */ LN_SWK_37, + /* 38 */ LN_SWK_38, + /* 39 */ LN_SWK_39, + /* 40 */ LN_SWK_MAX, +} BossLNswork; + +typedef enum { + /* 0 */ LN_FWK_0, + /* 1 */ LN_FWK_1, + /* 2 */ LN_FWK_2, + /* 3 */ LN_FWK_3, + /* 4 */ LN_FWK_4, + /* 5 */ LN_FWK_5, + /* 6 */ LN_FWK_6, + /* 7 */ LN_FWK_7, + /* 8 */ LN_FWK_8, + /* 9 */ LN_FWK_9, + /* 10 */ LN_FWK_10, + /* 11 */ LN_FWK_11, + /* 12 */ LN_FWK_12, + /* 13 */ LN_FWK_13, + /* 14 */ LN_FWK_14, + /* 15 */ LN_FWK_15, + /* 16 */ LN_FWK_16, + /* 17 */ LN_FWK_17, + /* 18 */ LN_FWK_18, + /* 19 */ LN_FWK_19, + /* 20 */ LN_FWK_20, + /* 21 */ LN_FWK_21, + /* 22 */ LN_FWK_22, + /* 23 */ LN_FWK_23, + /* 24 */ LN_FWK_24, + /* 25 */ LN_FWK_25, + /* 26 */ LN_FWK_26, + /* 27 */ LN_FWK_27, + /* 28 */ LN_FWK_28, + /* 29 */ LN_FWK_29, + /* 30 */ LN_FWK_30, + /* 31 */ LN_FWK_31, + /* 32 */ LN_FWK_32, + /* 33 */ LN_FWK_33, + /* 34 */ LN_FWK_34, + /* 35 */ LN_FWK_35, + /* 36 */ LN_FWK_36, + /* 37 */ LN_FWK_37, + /* 38 */ LN_FWK_38, + /* 39 */ LN_FWK_39, + /* 40 */ LN_FWK_40, + /* 41 */ LN_FWK_41, + /* 42 */ LN_FWK_42, + /* 43 */ LN_FWK_43, + /* 44 */ LN_FWK_44, + /* 45 */ LN_FWK_45, + /* 46 */ LN_FWK_46, + /* 47 */ LN_FWK_47, + /* 48 */ LN_FWK_48, + /* 49 */ LN_FWK_49, + /* 50 */ LN_FWK_MAX, +} BossLNfwork; + +typedef enum { + /* 0 */ LN_VWK_0, + /* 1 */ LN_VWK_1, + /* 2 */ LN_VWK_2, + /* 3 */ LN_VWK_3, + /* 4 */ LN_VWK_4, + /* 5 */ LN_VWK_5, + /* 6 */ LN_VWK_6, + /* 7 */ LN_VWK_7, + /* 8 */ LN_VWK_8, + /* 9 */ LN_VWK_9, + /* 10 */ LN_VWK_10, + /* 11 */ LN_VWK_11, + /* 12 */ LN_VWK_12, + /* 13 */ LN_VWK_13, + /* 14 */ LN_VWK_14, + /* 15 */ LN_VWK_15, + /* 16 */ LN_VWK_16, + /* 17 */ LN_VWK_17, + /* 18 */ LN_VWK_18, + /* 19 */ LN_VWK_19, + /* 20 */ LN_VWK_20, + /* 21 */ LN_VWK_21, + /* 22 */ LN_VWK_22, + /* 23 */ LN_VWK_23, + /* 24 */ LN_VWK_24, + /* 25 */ LN_VWK_25, + /* 26 */ LN_VWK_26, + /* 27 */ LN_VWK_27, + /* 28 */ LN_VWK_28, + /* 29 */ LN_VWK_29, + /* 30 */ LN_VWK_30, + /* 31 */ LN_VWK_31, + /* 32 */ LN_VWK_32, + /* 33 */ LN_VWK_33, + /* 34 */ LN_VWK_34, + /* 35 */ LN_VWK_35, + /* 36 */ LN_VWK_36, + /* 37 */ LN_VWK_37, + /* 38 */ LN_VWK_38, + /* 39 */ LN_VWK_39, + /* 40 */ LN_VWK_40, + /* 41 */ LN_VWK_41, + /* 42 */ LN_VWK_42, + /* 43 */ LN_VWK_43, + /* 44 */ LN_VWK_44, + /* 45 */ LN_VWK_45, + /* 46 */ LN_VWK_46, + /* 47 */ LN_VWK_47, + /* 48 */ LN_VWK_48, + /* 49 */ LN_VWK_49, + /* 50 */ LN_VWK_MAX, +} BossLNvwork; + #endif diff --git a/include/variables.h b/include/variables.h index fed1e4d2..da143366 100644 --- a/include/variables.h +++ b/include/variables.h @@ -135,7 +135,7 @@ extern s32 D_800C9B4C; // fox_bg extern u16 D_800C9C3C[16]; -// sf_43E80 +// fox_43E80 extern Vec3f D_800C9F2C; // fox_display @@ -241,7 +241,7 @@ extern u8 D_800D2F68; extern u8 D_800D3180[30]; // unknown, could be fox_rcp, fox_play, or a data-only file. -extern s32 D_800D31A0[4]; +extern UNK_TYPE D_800D31A0[4]; // fox_radio extern s32 gCurrentMsgPri; @@ -284,7 +284,7 @@ extern f32 D_8015F984; // extern f32 D_80161394; // fox_43AC0 -extern s32 D_801613A0; +extern s32 gBossFrameCount; // fox_display extern Vec3f D_801613B0[]; @@ -323,7 +323,7 @@ extern f32 D_80161724; extern f32 D_80161728; extern s32 D_8016172C; extern s32 D_80161730; -extern s32 D_80161734; +extern s32 gShowBossHealth; extern s32 D_80161788; extern s32 D_8016178C; extern s32 D_80161790; @@ -414,7 +414,7 @@ extern GameState gGameState; extern s32 D_80177838; extern s32 D_Timer_8017783C; extern s32 D_80177840; -extern s32 D_80177848; +extern s32 gBossHealthBar; extern s32 D_80177844; extern s32 D_8017784C; extern s32 D_80177850; @@ -445,7 +445,7 @@ extern u16 gBrakeButton[4]; extern u8 D_80177930; // extern u16 gShootButton[4]; -extern f32 D_80177940; +extern f32 gGroundLevel; // extern u16 gBombButton[4]; extern f32 D_80177950; @@ -844,8 +844,8 @@ extern f32 gDefaultPanVolume[]; extern Gfx* D_DF4260_8019A008[]; extern f32 D_DF4260_8019A9B8[]; -// ovl_E16C50 -// extern f32 D_E16C50_801C4188; Currently externed in relevant files for bss ordering +// ovl_i3 +// extern f32 D_i3_801C4188; Currently externed in relevant files for bss ordering // ovl_E51970 extern Matrix D_E51970_8019EE80; @@ -1091,9 +1091,9 @@ extern Gfx D_301F140[]; extern Gfx D_301FD20[]; extern Gfx D_302D240[]; extern Gfx D_302D4D0[]; -extern EnvSettings D_302DD70[]; -extern EnvSettings D_302DDB4[]; -extern EnvSettings D_302DDF8[]; +extern EnvSettings D_302DD70; +extern EnvSettings D_302DDB4; +extern EnvSettings D_302DDF8; extern ObjectInit D_302DE3C[]; extern ObjectInit D_302E0E4[]; extern ObjectInit D_302E170[]; @@ -1168,52 +1168,6 @@ extern Gfx D_500B600[]; * ast_B0AA00, ast_B1CA50, ast_B2CA50, ast_B612E0, ast_B84560, * ast_BB11D0, ast_BC23D0, ast_BFC510, ast_C48F40, ast_DDC010 */ -extern CollisionPoly D_602FA9C[]; -extern Vec3s D_60300C8[]; -extern CollisionPoly D_60305DC[]; -extern Vec3s D_603184C[]; -extern CollisionPoly D_6030208[]; -extern Vec3s D_6030550[]; -extern CollisionPoly D_6033070[]; -extern Vec3s D_6033E08[]; -extern CollisionPoly D_600F60C[]; -extern Vec3s D_600FD50[]; -extern CollisionPoly D_600F3F4[]; -extern Vec3s D_600F5AC[]; -extern CollisionPoly D_600F1DC[]; -extern Vec3s D_600F394[]; -extern CollisionPoly D_6010294[]; -extern Vec3s D_601170C[]; -extern CollisionPoly D_6007558[]; -extern Vec3s D_6008E08[]; -extern CollisionPoly D_6014FEC[]; -extern Vec3s D_6016374[]; -extern Triangle D_603F338[]; -extern Vec3f D_603F388[]; -extern Triangle D_603F40C[]; -extern Vec3f D_603F4E4[]; -extern Triangle D_602CACC[]; -extern Vec3f D_602CB80[]; -extern Triangle D_6030E74[]; -extern Vec3f D_6030E80[]; -extern Triangle D_6030EB0[]; -extern Vec3f D_6030EBC[]; -extern Triangle D_6030EEC[]; -extern Vec3f D_6030EF8[]; -extern Triangle D_6030F28[]; -extern Vec3f D_6030F34[]; -extern Triangle D_6030F64[]; -extern Vec3f D_6030F7C[]; -extern Triangle D_6030FC4[]; -extern Vec3f D_6030FD0[]; -extern Triangle D_60320B8[]; -extern Vec3f D_603216C[]; -extern Triangle D_6031FB0[]; -extern Vec3f D_6031FE0[]; -extern Triangle D_6031FB0[]; -extern Vec3f D_603204C[]; -extern Triangle D_6032388[]; -extern Vec3f D_6032430[]; extern u16 D_6000000[]; extern Gfx D_60005B0[]; extern u16 D_6000900[]; @@ -1230,14 +1184,17 @@ extern Gfx D_6001A60[]; extern u16 D_6001A80[]; extern u8 D_6001B80[]; extern Vtx D_6001C50[]; +extern u8 D_6001C80[]; extern Gfx D_6001DA0[]; extern u8 D_60020D0[]; +extern u8 D_6002160[]; extern Gfx D_60023B0[]; extern Gfx D_6002990[]; extern u16 D_60029A0[]; extern Gfx D_6002E60[]; extern Gfx D_6002F80[]; extern Gfx D_6003000[]; +extern u8 D_60030D0[]; extern Gfx D_60030F0[]; extern Gfx D_60034D0[]; extern Gfx D_6003610[]; @@ -1246,23 +1203,28 @@ extern Gfx D_6003760[]; extern u16 D_60038C0[]; extern Gfx D_60038E0[]; extern u16 D_60038F8[]; +extern u8 D_6003B50[]; extern Gfx D_6004170[]; extern Gfx D_6004330[]; extern Vtx D_6004500[]; extern Gfx D_6004570[]; extern Gfx D_60046F0[]; extern u16 D_60047E0[]; +extern Gfx D_6004900[]; extern u8 D_6004AC0[]; extern Gfx D_6004FE0[]; +extern EnvSettings D_6005000; extern Gfx D_6005360[]; extern u16 D_6005700[]; extern u16 D_6005710[]; +extern u8 D_6005740[]; extern Gfx D_6005780[]; extern Gfx D_6005880[]; extern Gfx D_60059F0[]; extern Gfx D_6006140[]; extern Gfx D_6006310[]; extern u16* D_600631C[]; +extern u8 D_6006320[]; extern AnimationHeader D_600636C; extern f32 D_60064AC[]; extern f32 D_60064C8[]; @@ -1299,15 +1261,19 @@ extern f32 D_60069E8[]; extern f32 D_6006A04[]; extern f32 D_6006A20[]; extern f32 D_6006A3C[]; +extern EnvSettings D_6006A60; extern Gfx D_6006A80[]; extern Gfx D_6006BE0[]; extern f32 D_6006BF0[]; extern f32 D_6006C44[]; extern AnimationHeader D_6006D64; extern Limb *D_6006E50[]; +extern EnvSettings D_6006E70; +extern u8 D_6006E80[]; extern u16 D_6006EA0[]; extern Gfx D_6006F50[]; extern Gfx D_6007410[]; +extern CollisionPoly D_6007558[]; extern Gfx D_60075D0[]; extern Gfx D_6007650[]; extern Gfx D_60079B0[]; @@ -1315,11 +1281,14 @@ extern u8 D_6007B90[]; extern Gfx D_6007CF0[]; extern Gfx D_6007D80[]; extern Gfx D_6007D90[]; +extern EnvSettings D_6007E30; extern Gfx D_6008370[]; extern Gfx D_6008770[]; extern Gfx D_6008830[]; extern Gfx D_6008970[]; +extern u8 D_6008990[]; extern Gfx D_6008AA0[]; +extern Vec3s D_6008E08[]; extern f32 D_600924C[]; extern Gfx D_6009250[]; extern f32 D_60092E8[]; @@ -1330,6 +1299,7 @@ extern u16* D_6009B34[]; extern u16 D_6009BB8[]; extern f32 D_6009CC4[]; extern f32 D_6009CFC[]; +extern AnimationHeader D_6009D30; extern Gfx D_6009E30[]; extern Vtx D_6009ED0[]; extern Gfx D_6009F90[]; @@ -1338,14 +1308,18 @@ extern Gfx D_600A420[]; extern Gfx D_600A810[]; extern Gfx D_600AB10[]; extern u16 D_600AB68[]; +extern u8 D_600AD30[]; extern Gfx D_600AF40[]; extern Gfx D_600B0E0[]; +extern AnimationHeader D_600B1B4; extern Gfx D_600B4B0[]; extern Gfx D_600B8B0[]; +extern u8 D_600B9B0[]; extern Gfx D_600BAF0[]; extern u16 D_600BEA0[]; extern Gfx D_600BF80[]; extern Gfx D_600C130[]; +extern AnimationHeader D_600C15C; extern AnimationHeader D_600C200; extern Limb *D_600C2AC[]; extern u16 D_600C6A0[]; @@ -1353,7 +1327,9 @@ extern Gfx D_600C740[]; extern Vtx D_600C780[]; extern Gfx D_600CAA0[]; extern u16 D_600CBD8[]; +extern u8 D_600CC10[]; extern Gfx D_600D190[]; +extern AnimationHeader D_600D3DC; extern u16 D_600D5C0[]; extern Gfx D_600D730[]; extern u16 D_600D990[]; @@ -1365,37 +1341,54 @@ extern u8 D_600DDC0[]; extern Gfx D_600DDF0[]; extern Gfx D_600E050[]; extern Gfx D_600E0C0[]; +extern u8 D_600E210[]; +extern AnimationHeader D_600E2C4; extern u8 D_600E360[]; +extern Limb *D_600E470[]; extern AnimationHeader D_600E5EC; extern Gfx D_600E820[]; extern u8 D_600E980[]; +extern EnvSettings D_600EA90; extern Gfx D_600EC90[]; extern Gfx D_600EE10[]; extern Gfx D_600EEF0[]; extern Gfx D_600EFF0[]; extern Gfx D_600F160[]; extern Gfx D_600F1D0[]; +extern CollisionPoly D_600F1DC[]; +extern Gfx D_600F1F0[]; extern Gfx D_600F2F0[]; +extern u8 D_600F390[]; +extern Vec3s D_600F394[]; extern Gfx D_600F3D0[]; +extern CollisionPoly D_600F3F4[]; extern Gfx D_600F4C0[]; extern Gfx D_600F560[]; +extern Vec3s D_600F5AC[]; +extern CollisionPoly D_600F60C[]; extern Gfx D_600F670[]; extern Gfx D_600F6C0[]; extern Gfx D_600F6C0[]; +extern AnimationHeader D_600F744; extern Gfx D_600F8A0[]; extern u8 D_600F940[]; extern Gfx D_600F9B0[]; +extern Vec3s D_600FD50[]; extern f32 D_600FE9C[]; extern f32 D_600FEB8[]; -extern f32 D_600FF30[]; +extern f32 D_600FF30_Hitbox[]; +extern EnvSettings D_600FF30_Env; extern f32 D_600FF80[]; extern f32 D_600FFA0[]; extern f32 D_600FFC0[]; extern f32 D_600FFE0[]; +extern u8 D_6010010[]; extern ObjectInit* D_6010088[]; extern u8 D_6010090[]; extern u16 D_6010198[]; +extern CollisionPoly D_6010294[]; extern Gfx D_60102C0[]; +extern u8 D_60105C0[]; extern u8 D_60106B0[]; extern Gfx D_6010700[]; extern Gfx D_6010960[]; @@ -1403,10 +1396,13 @@ extern Gfx D_6010A50[]; extern u16 D_6010C20[]; extern Gfx D_6010E00[]; extern u8 D_6010FA0[]; +extern EnvSettings D_6011000; extern f32 D_6011058[]; extern f32 D_601115C[]; extern u8 D_6011660[]; +extern Vec3s D_601170C[]; extern u8 D_6011890[]; +extern Gfx D_6011910[]; extern Gfx D_60119A0[]; extern f32 D_6011B24[]; extern u16 D_6011B40[]; @@ -1414,20 +1410,25 @@ extern f32 D_6011BF4[]; extern f32 D_6011C10[]; extern f32 D_6011C48[]; extern f32 D_6011C80[]; +extern u8 D_6011EA0[]; extern Gfx D_6011EE0[]; extern Gfx D_60120F0[]; extern u8 D_6012310[]; extern u8 D_60123F0[]; extern Gfx D_6012C00[]; +extern u8 D_60131A0[]; extern Gfx D_60132B0[]; extern u8 D_6013470[]; extern Gfx D_6013480[]; extern Gfx D_60137B0[]; extern AnimationHeader D_6013820; +extern AnimationHeader D_601388C; extern Limb* D_601390C[]; extern Gfx D_6013960[]; +extern u8 D_60139E0[]; extern Gfx D_6013B50[]; extern u8 D_6014140[]; +extern u8 D_6014360[]; extern Gfx D_60143E0[]; extern Gfx D_6014500[]; extern u16 D_6014510[]; @@ -1439,24 +1440,40 @@ extern Gfx D_60148B0[]; extern Gfx D_60148D0[]; extern Gfx D_6014A20[]; extern Gfx D_6014B50[]; +extern u8 D_6014BA0[]; +extern EnvSettings D_6014D50; +extern CollisionPoly D_6014FEC[]; extern Gfx D_60153B0[]; extern u16 D_6015430[]; extern Gfx D_6015730[]; extern u8 D_6015CE0[]; +extern Gfx D_6015DD0[]; +extern Gfx D_6015EE0[]; extern Gfx D_6015F00[]; +extern Gfx D_6015FF0[]; extern Gfx D_6016270[]; +extern Vec3s D_6016374[]; extern Gfx D_60164F0[]; extern Gfx D_6016580[]; extern f32 D_601668C[]; extern f32 D_60166F4[]; extern f32 D_6016714[]; +extern u8 D_6016760[]; +extern Gfx D_6016CF0[]; +extern Gfx D_6017090[]; +extern Gfx D_6017370[]; +extern u8 D_6017640[]; +extern u8 D_6018280[]; extern Gfx D_6018450[]; extern Gfx D_60188D0[]; +extern AnimationHeader D_6018994; +extern Limb* D_6018BA0[]; extern Gfx D_6018BF0[]; extern Gfx D_6018C00[]; // possible collision extern Gfx D_6018D40[]; extern Gfx D_6018E80[]; extern u16 D_6018F30[]; +extern u8 D_60190B0[]; extern Gfx D_6019220[]; extern Gfx D_6019730[]; extern u16 D_6019E50[]; @@ -1468,6 +1485,7 @@ extern Gfx D_601AE40[]; extern Gfx D_601AFF0[]; extern Gfx D_601B0D0[]; extern u16* D_601B1E4[]; +extern Gfx D_601B2B0[]; extern u16 D_601B4B0[]; extern f32 D_601B4C4[]; extern f32 D_601B4E0[]; @@ -1493,9 +1511,12 @@ extern f32 D_601B8D8[]; extern Gfx D_601BB40[]; extern Gfx D_601BEC0[]; extern Gfx D_601C080[]; +extern Gfx D_601C0D0[]; extern Gfx D_601C6A0[]; extern Gfx D_601C7C0[]; +extern Gfx D_601C820[]; extern u16 D_601C8E0[]; +extern Gfx D_601C960[]; extern Gfx D_601C9B0[]; extern Gfx D_601D1F0[]; extern Gfx D_601D730[]; @@ -1503,17 +1524,21 @@ extern u8 D_601D750[]; extern u16 D_601D800[]; extern u16 D_601DB50[]; extern Gfx D_601DE60[]; +extern Gfx D_601DE80[]; extern Gfx D_601E150[]; extern u16 D_601E1E8[]; extern AnimationHeader D_601E8C4; extern Limb* D_601E9D0[]; extern Gfx D_601EAA0[]; extern Gfx D_601F1D0[]; +extern EnvSettings D_601F1F0; extern Gfx D_601F500[]; extern Gfx D_601F5A0[]; +extern Gfx D_601F6B0[]; extern AnimationHeader D_601F874; extern Limb* D_601F920[]; extern Gfx D_601FCB0[]; +extern u8 D_601FF40[]; extern Gfx D_601FF80[]; extern Gfx D_60200E0[]; extern Gfx D_6020760[]; @@ -1526,29 +1551,37 @@ extern u16 D_6020FB0[]; extern u16 D_6021ED0[]; extern AnimationHeader D_602201C; extern Limb* D_60220E8[]; +extern Gfx D_6022110[]; +extern u16 D_6022340[]; extern Gfx D_60223C0[]; +extern u8 D_60223E0[]; extern Gfx D_6022450[]; extern Gfx D_6022530[]; extern u16 D_6022760[]; extern Gfx D_6022920[]; extern u16 D_60229A4[]; +extern f32 D_60231A4[]; extern Gfx D_60231C0[]; extern Gfx D_60238F0[]; extern Gfx D_6023AC0[]; +extern EnvSettings D_6023F20; extern Gfx D_6024010[]; extern Gfx D_6024220[]; extern Gfx D_60244A0[]; extern u16 D_60245E0[]; extern u16 D_60247E0[]; +extern u8 D_6024890[]; extern Gfx D_6024AC0[]; extern Gfx D_6024B60[]; extern u16 D_6025500[]; extern Gfx D_6025B50[]; extern u16 D_6026420[]; +extern EnvSettings D_60266D0; +extern EnvSettings D_6026C80; extern u16 D_6026C90[]; +extern u8 D_6026D70[]; extern Gfx D_60270E0[]; extern Gfx D_6027180[]; -extern u16 D_6022340[]; extern AnimationHeader D_6027320; extern u16 D_6027340[]; extern Limb* D_602742C[]; @@ -1556,6 +1589,8 @@ extern Gfx D_6027900[]; extern u16* D_6027F50[]; extern u16 D_6028260[]; extern f32 D_6028454[]; +extern f32 D_6028578[]; +extern EnvSettings D_6028760; extern u16* D_60289FC[]; extern u16 D_6028A60[]; extern u16 D_6029170[]; @@ -1563,6 +1598,7 @@ extern u8 D_6029220[]; extern AnimationHeader D_6029528; extern Limb* D_6029674[]; extern Gfx D_6029890[]; +extern EnvSettings D_602A120; extern Gfx D_602A720[]; extern u16* D_602AAC0[]; extern Gfx D_602AC40[]; @@ -1571,6 +1607,7 @@ extern u16 D_602ACC0[]; extern ObjectInit* D_602B148[]; extern Gfx D_602B4C0[]; extern u16 D_602B620[]; +extern u8 D_602B6D0[]; extern f32 D_602B9EC[]; extern f32 D_602BA20[]; extern f32 D_602BAE4[]; @@ -1590,16 +1627,21 @@ extern f32 D_602C250[]; extern f32 D_602C294[]; extern f32 D_602C2B0[]; extern u16 D_602C2CC[]; +extern Triangle D_602CACC[]; +extern Vec3f D_602CB80[]; extern Gfx D_602D5F0[]; extern Gfx D_602DA20[]; extern u16 D_602DAD0[]; extern Gfx D_602DAE0[]; +extern u8 D_602DB60[]; extern Gfx D_602DB80[]; extern Gfx D_602DC20[]; extern Gfx D_602DCA0[]; extern u16 D_602DCB8[]; extern Gfx D_602E080[]; extern Gfx D_602E380[]; +extern EnvSettings D_602E4B0; +extern EnvSettings D_602E540; extern Gfx D_602E570[]; extern EnvSettings D_602E584[]; extern Gfx D_602E7A0[]; @@ -1616,8 +1658,14 @@ extern f32 D_602F740[]; extern f32 D_602F75C[]; extern Gfx D_602F7C0[]; extern f32 D_602FA50[]; +extern CollisionPoly D_602FA9C[]; extern u16 D_602FF60[]; +extern u8 D_602FFD0[]; +extern Vec3s D_60300C8[]; +extern CollisionPoly D_6030208[]; extern Gfx D_6030500[]; +extern Vec3s D_6030550[]; +extern CollisionPoly D_60305DC[]; extern Gfx D_6030630[]; extern Gfx D_60306D0[]; extern u16* D_60308B8[]; @@ -1634,10 +1682,23 @@ extern f32 D_6030D20[]; extern f32 D_6030D74[]; extern f32 D_6030DF8[]; extern f32 D_6030E14[]; -extern f32 D_6030E30[]; +extern f32 D_6030E30_Hitbox[]; +extern EnvSettings D_6030E30_Env; extern f32 D_6030E4C[]; extern f32 D_6030E68[]; +extern Triangle D_6030E74[]; +extern Vec3f D_6030E80[]; +extern Triangle D_6030EB0[]; +extern Vec3f D_6030EBC[]; +extern Triangle D_6030EEC[]; +extern Vec3f D_6030EF8[]; +extern Triangle D_6030F28[]; +extern Vec3f D_6030F34[]; +extern Triangle D_6030F64[]; extern f32 D_6030F74[]; +extern Vec3f D_6030F7C[]; +extern Triangle D_6030FC4[]; +extern Vec3f D_6030FD0[]; extern f32 D_6031398[]; extern f32 D_60313CC[]; extern f32 D_6031400[]; @@ -1649,18 +1710,32 @@ extern f32 D_6031538[]; extern f32 D_6031554[]; extern f32 D_6031570[]; extern u16 D_603158C[]; +extern Vec3s D_603184C[]; +extern Triangle D_6031FB0[]; +extern Triangle D_6031FB0[]; +extern Vec3f D_6031FE0[]; +extern Vec3f D_603204C[]; +extern Triangle D_60320B8[]; extern u16* D_60320D0[]; extern Gfx D_60320E0[]; +extern Vec3f D_603216C[]; extern f32 D_6032328[]; +extern Triangle D_6032388[]; extern u16 D_60323D0[]; extern f32 D_6032408[]; +extern Vec3f D_6032430[]; +extern u16 D_6032440[]; extern f32 D_6032488[]; extern f32 D_60324EC[]; extern f32 D_6032550[]; extern Gfx D_6032580[]; +extern u16 D_6032A60[]; extern Gfx D_6032BC0[]; extern u16* D_6032E18[]; extern Gfx D_6033000[]; +extern CollisionPoly D_6033070[]; +extern u16 D_6033080[]; +extern Vec3s D_6033E08[]; extern f32 D_603405C[]; extern f32 D_6034368[]; extern f32 D_6034478[]; @@ -1672,6 +1747,7 @@ extern f32 D_60347D4[]; extern f32 D_60347F0[]; extern f32 D_603486C[]; extern Gfx D_6034B90[]; +extern u16 D_6035780[]; extern f32 D_60359C8[]; extern f32 D_6035A14[]; extern f32 D_6035A48[]; @@ -1716,12 +1792,18 @@ extern f32 D_6036930[]; extern f32 D_603694C[]; extern f32 D_6036968[]; extern Gfx D_6036CD0[]; +extern EnvSettings D_6037160; extern Gfx D_6037CF0[]; +extern u16 D_6037E80[]; extern u16* D_60381D8[]; +extern u16 D_603A580[]; +extern u16 D_603A580[]; extern ObjectInit D_603B074[]; +extern u16 D_603CC80[]; extern u16* D_603D9E8[]; extern f32 D_603DCA4[]; extern f32 D_603DD40[]; +extern EnvSettings D_C035110; extern f32 D_603DDF0[]; extern f32 D_603DE8C[]; extern f32 D_603DEF4[]; @@ -1731,52 +1813,6 @@ extern f32 D_603E014[]; extern f32 D_603E030[]; extern f32 D_603E09C[]; extern f32 D_603E0EC[]; -extern f32 D_603E118[]; -extern f32 D_603E14C[]; -extern f32 D_603E1B4[]; -extern f32 D_603E21C[]; -extern f32 D_603E3E0[]; -extern f32 D_603E468[]; -extern f32 D_603E484[]; -extern f32 D_603E4A0[]; -extern f32 D_603E4A4[]; -extern f32 D_603E4DC[]; -extern f32 D_603E514[]; -extern f32 D_603E54C[]; -extern f32 D_603E598[]; -extern f32 D_603E5B4[]; -extern f32 D_603E5D0[]; -extern f32 D_603E604[]; -extern f32 D_603E620[]; -extern f32 D_603E714[]; -extern f32 D_603E748[]; -extern f32 D_603E7C4[]; -extern f32 D_603E840[]; -extern f32 D_603E88C[]; -extern f32 D_603E8A8[]; -extern f32 D_603E98C[]; -extern f32 D_603E9EC[]; -extern f32 D_603EA08[]; -extern f32 D_603EA74[]; -extern f32 D_603EAE0[]; -extern f32 D_603EB0C[]; -extern u16 D_603EB38[]; -extern Gfx D_6041070[]; -extern u16 D_60447A0[]; -extern u16 D_6047550[]; -extern Gfx D_6049F80[]; -extern Gfx D_604A190[]; -extern Gfx D_604A710[]; -extern Gfx D_604A9F0[]; -extern Gfx D_604A400[]; -extern Gfx D_605C230[]; -extern f32 D_6028578[]; -extern Gfx D_600F1F0[]; -extern Gfx D_6015EE0[]; -extern Gfx D_6011910[]; -extern AnimationHeader D_6018994; -extern Limb* D_6018BA0[]; -extern Gfx D_601B2B0[]; // ast_9DD390, ast_A0E340, ast_BFA740, ast_CBFE70, ast_D27600 extern Gfx D_7000000[]; @@ -1950,57 +1986,57 @@ extern Gfx D_F014310[]; // fox_map, to be ordered later -extern u8 D_60030D0[]; -extern u8 D_600B9B0[]; -extern u8 D_6010010[]; -extern u8 D_600E210[]; -extern u8 D_6006320[]; -extern u8 D_60131A0[]; -extern u8 D_6001C80[]; -extern u8 D_6017640[]; -extern u8 D_6014360[]; -extern u8 D_6008990[]; -extern u8 D_600AD30[]; -extern u8 D_6011EA0[]; -extern u8 D_6016760[]; -extern u8 D_6005740[]; -extern u8 D_6003B50[]; -extern u8 D_600CC10[]; -extern u8 D_60105C0[]; -extern u8 D_600F390[]; -extern u8 D_6006E80[]; -extern u8 D_60139E0[]; -extern u8 D_6002160[]; -extern u8 D_6018280[]; -extern u8 D_6014BA0[]; -extern Gfx D_6055F20[]; -extern Gfx D_6051D20[]; -extern u8 D_601FF40[]; -extern u8 D_602B6D0[]; -extern u8 D_6026D70[]; -extern u8 D_602FFD0[]; -extern u8 D_60223E0[]; -extern u8 D_6024890[]; -extern u8 D_60190B0[]; -extern u8 D_602DB60[]; -extern Gfx D_6060610[]; -extern Gfx D_601C0D0[]; -extern Gfx D_601DE80[]; -extern Gfx D_601C960[]; +extern f32 D_603E118[]; +extern f32 D_603E14C[]; +extern f32 D_603E1B4[]; +extern f32 D_603E21C[]; +extern f32 D_603E3E0[]; +extern f32 D_603E468[]; +extern f32 D_603E484[]; +extern f32 D_603E4A0[]; +extern f32 D_603E4A4[]; +extern f32 D_603E4DC[]; +extern f32 D_603E514[]; +extern f32 D_603E54C[]; +extern f32 D_603E598[]; +extern f32 D_603E5B4[]; +extern f32 D_603E5D0[]; +extern f32 D_603E604[]; +extern f32 D_603E620[]; +extern f32 D_603E714[]; +extern f32 D_603E748[]; +extern f32 D_603E7C4[]; +extern f32 D_603E840[]; +extern f32 D_603E88C[]; +extern f32 D_603E8A8[]; +extern f32 D_603E98C[]; +extern f32 D_603E9EC[]; +extern f32 D_603EA08[]; +extern f32 D_603EA74[]; +extern f32 D_603EAE0[]; +extern f32 D_603EB0C[]; +extern u16 D_603EB38[]; +extern Triangle D_603F338[]; +extern u16 D_603F380[]; +extern Vec3f D_603F388[]; +extern Triangle D_603F40C[]; +extern Vec3f D_603F4E4[]; +extern Gfx D_6041070[]; +extern u16 D_6041A80[]; +extern u16 D_6044180[]; +extern u16 D_60447A0[]; +extern u16 D_6047550[]; +extern Gfx D_6049F80[]; +extern Gfx D_604A190[]; +extern Gfx D_604A400[]; +extern Gfx D_604A710[]; +extern Gfx D_604A9F0[]; extern Gfx D_604B750[]; extern Gfx D_604DB10[]; -extern Gfx D_601F6B0[]; -extern u16 D_6041A80[]; -extern u16 D_603F380[]; -extern u16 D_6035780[]; -extern u16 D_6037E80[]; -extern u16 D_6033080[]; -extern u16 D_603CC80[]; -extern u16 D_603A580[]; -extern u16 D_603A580[]; -extern u16 D_6032A60[]; -extern u16 D_6044180[]; -extern u16 D_6032440[]; +extern Gfx D_6051D20[]; +extern Gfx D_6055F20[]; +extern Gfx D_605C230[]; +extern Gfx D_6060610[]; extern Gfx D_9006AE0[]; extern Gfx D_9000570[]; diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index fb146f4c..f8a9db31 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -3,6 +3,7 @@ __libm_qnan_f = 0x800C9570; D_1 = 0x1; //ignore:true D_80120000 = 0x80120000;//ignore:true D_80130001 = 0x80130001;//ignore:true +D_80150000 = 0x80150000;//ignore:true D_80000000 = 0x80000000;//ignore:true D_80000001 = 0x80000001;//ignore:true D_80000002 = 0x80000002;//ignore:true @@ -19,6 +20,10 @@ 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_800C45E0 = 0x800C45E0; @@ -87,10 +92,10 @@ D_800C93EC = 0x800C93EC; // force_migration:True D_DF4260_8019B1EC = 0x8019B1EC; // force_migration:True segment:ovl_DF4260 D_DF4260_8019B6D8 = 0x8019B6D8; // size:0x110 segment:ovl_DF4260 -D_E16C50_801C171C = 0x801C171C; // force_migration:True segment:ovl_E16C50 -D_E16C50_801C1728 = 0x801C1728; // force_migration:True segment:ovl_E16C50 -D_E16C50_801C1730 = 0x801C1730; // force_migration:True segment:ovl_E16C50 -D_E16C50_801C1758 = 0x801C1758; // force_migration:True segment:ovl_E16C50 +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 +D_i3_801C1758 = 0x801C1758; // force_migration:True segment:ovl_i3 D_E6A810_801BB83C = 0x801BB83C; // force_migration:True segment:ovl_E6A810 D_E6A810_801BB808 = 0x801BB808; // force_migration:True segment:ovl_E6A810 D_E6A810_801BBAD0 = 0x801BBAD0; // force_migration:True segment:ovl_E6A810 diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 0606ad56..463de5fc 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -151,6 +151,9 @@ Message_IsPrintingChar = 0x800C2F30; D_800C9CC4 = 0x800C9CC4; D_800C9CF8 = 0x800C9CF8; +// fox_43AC0 +gBossFrameCount = 0x801613A0; + // fox_save gDefaultSave = 0x800D4D10; gSaveFile = 0x80178870; //size:0x200 @@ -355,11 +358,13 @@ func_800A25DC = 0x800A25DC; func_800A26C0 = 0x800A26C0; func_800A3608 = 0x800A3608; -gTotalHits = 0x80161714; // sf_hud -gMedalFlashTimer = 0x801617B8; +gTotalHits = 0x80161714; +gShowBossHealth = 0x80161734; gMedalStatus = 0x801617B4; +gMedalFlashTimer = 0x801617B8; + // fox_play D_80161A50 = 0x80161A50; @@ -410,7 +415,7 @@ gGameState = 0x80177834; D_80177838 = 0x80177838; D_Timer_8017783C = 0x8017783C; D_80177840 = 0x80177840; -D_80177848 = 0x80177848; +gBossHealthBar = 0x80177848; D_8017784C = 0x8017784C; D_80177850 = 0x80177850; D_80177854 = 0x80177854; @@ -436,7 +441,7 @@ gTeamDamage = 0x80177910; gBrakeButton = 0x80177928; D_80177930 = 0x80177930; gShootButton = 0x80177938; -D_80177940 = 0x80177940; +gGroundLevel = 0x80177940; gBombButton = 0x80177948; D_80177950 = 0x80177950; D_80177958 = 0x80177958; diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index 88f5f7f4..640076b6 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -30,66 +30,66 @@ D_EBFBE0_801AEE6C = 0x801AEE6C; // type:s32 size:0x58 force_migration:True segme D_EBFBE0_801AF25C = 0x801AF25C; // type:f32 size:0x18 force_migration:True segment:ovl_menu D_EBFBE0_801AF274 = 0x801AF274; // type:f32 size:0x18 force_migration:True segment:ovl_menu -func_E16C50_80187754 = 0x80187754; -func_E16C50_801932AC = 0x801932AC; -func_E16C50_8019B1F0 = 0x8019B1F0; -func_E16C50_8019B810 = 0x8019B810; -func_E16C50_8019C200 = 0x8019C200; -func_E16C50_8019D060 = 0x8019D060; -func_E16C50_801AD688 = 0x801AD688; -func_E16C50_801AE3AC = 0x801AE3AC; -func_E16C50_801AF9FC = 0x801AF9FC; -func_E16C50_801B10F8 = 0x801B10F8; -func_E16C50_801B6344 = 0x801B6344; -func_E16C50_801B6E54 = 0x801B6E54; -func_E16C50_801B7AF0 = 0x801B7AF0; -func_E16C50_801BA57C = 0x801BA57C; -func_E16C50_801BB26C = 0x801BB26C; -func_E16C50_801915A4 = 0x801915A4; -func_E16C50_80191BB8 = 0x80191BB8; -D_E16C50_801C2240 = 0x801C2240; -D_E16C50_801C4188 = 0x801C4188; -D_E16C50_801C2250 = 0x801C2250;//size:0xA0 segment:ovl_E16C50 -D_E16C50_801C22F0 = 0x801C22F0;//size:0x40 segment:ovl_E16C50 -D_E16C50_801BF1F0 = 0x801BF1F0;//size:0x30 type:f32 segment:ovl_E16C50 -D_E16C50_801BF220 = 0x801BF220;//size:0x30 type:f32 segment:ovl_E16C50 -D_E16C50_801BF250 = 0x801BF250;//size:0x30 type:f32 segment:ovl_E16C50 -D_E16C50_801BF280 = 0x801BF280;//size:0x30 type:f32 segment:ovl_E16C50 -D_E16C50_801BF2B0 = 0x801BF2B0;//size:0x30 type:f32 segment:ovl_E16C50 -D_E16C50_801BF2E0 = 0x801BF2E0;//size:0x30 type:f32 segment:ovl_E16C50 -D_E16C50_801BF8AC = 0x801BF8AC;//size:0xC type:Vec3f segment:ovl_E16C50 -D_E16C50_801BF8B8 = 0x801BF8B8;//size:0xC type:Vec3f segment:ovl_E16C50 -D_E16C50_801BF8C4 = 0x801BF8C4;//size:0x8 type:f32 segment:ovl_E16C50 -D_E16C50_801BED10 = 0x801BED10;//size:0xC type:Vec3f segment:ovl_E16C50 -D_E16C50_801BED1C = 0x801BED1C;//size:0xC type:Vec3f segment:ovl_E16C50 -D_E16C50_801BED70 = 0x801BED70;//size:0x90 type:Vec3f segment:ovl_E16C50 -D_E16C50_801BEE00 = 0x801BEE00;//size:0x90 type:Vec3f segment:ovl_E16C50 -D_E16C50_801BEEF0 = 0x801BEEF0;//size:0x90 type:Vec3f segment:ovl_E16C50 -D_E16C50_801BEF80 = 0x801BEF80;//size:0x90 type:Vec3f segment:ovl_E16C50 -D_E16C50_801BF070 = 0x801BF070;//size:0x90 type:Vec3f segment:ovl_E16C50 -D_E16C50_801BF100 = 0x801BF100;//size:0x90 type:Vec3f segment:ovl_E16C50 -D_E16C50_801BF190 = 0x801BF190;//size:0x30 type:f32 segment:ovl_E16C50 +func_i3_80187754 = 0x80187754; +func_i3_801932AC = 0x801932AC; +func_i3_8019B1F0 = 0x8019B1F0; +func_i3_8019B810 = 0x8019B810; +func_i3_8019C200 = 0x8019C200; +func_i3_8019D060 = 0x8019D060; +func_i3_801AD688 = 0x801AD688; +func_i3_801AE3AC = 0x801AE3AC; +func_i3_801AF9FC = 0x801AF9FC; +func_i3_801B10F8 = 0x801B10F8; +func_i3_801B6344 = 0x801B6344; +func_i3_801B6E54 = 0x801B6E54; +func_i3_801B7AF0 = 0x801B7AF0; +func_i3_801BA57C = 0x801BA57C; +func_i3_801BB26C = 0x801BB26C; +func_i3_801915A4 = 0x801915A4; +func_i3_80191BB8 = 0x80191BB8; +D_i3_801C2240 = 0x801C2240; +D_i3_801C4188 = 0x801C4188; +D_i3_801C2250 = 0x801C2250;//size:0xA0 segment:ovl_i3 +D_i3_801C22F0 = 0x801C22F0;//size:0x40 segment:ovl_i3 +D_i3_801BF1F0 = 0x801BF1F0;//size:0x30 type:f32 segment:ovl_i3 +D_i3_801BF220 = 0x801BF220;//size:0x30 type:f32 segment:ovl_i3 +D_i3_801BF250 = 0x801BF250;//size:0x30 type:f32 segment:ovl_i3 +D_i3_801BF280 = 0x801BF280;//size:0x30 type:f32 segment:ovl_i3 +D_i3_801BF2B0 = 0x801BF2B0;//size:0x30 type:f32 segment:ovl_i3 +D_i3_801BF2E0 = 0x801BF2E0;//size:0x30 type:f32 segment:ovl_i3 +D_i3_801BF8AC = 0x801BF8AC;//size:0xC type:Vec3f segment:ovl_i3 +D_i3_801BF8B8 = 0x801BF8B8;//size:0xC type:Vec3f segment:ovl_i3 +D_i3_801BF8C4 = 0x801BF8C4;//size:0x8 type:f32 segment:ovl_i3 +D_i3_801BED10 = 0x801BED10;//size:0xC type:Vec3f segment:ovl_i3 +D_i3_801BED1C = 0x801BED1C;//size:0xC type:Vec3f segment:ovl_i3 +D_i3_801BED70 = 0x801BED70;//size:0x90 type:Vec3f segment:ovl_i3 +D_i3_801BEE00 = 0x801BEE00;//size:0x90 type:Vec3f segment:ovl_i3 +D_i3_801BEEF0 = 0x801BEEF0;//size:0x90 type:Vec3f segment:ovl_i3 +D_i3_801BEF80 = 0x801BEF80;//size:0x90 type:Vec3f segment:ovl_i3 +D_i3_801BF070 = 0x801BF070;//size:0x90 type:Vec3f segment:ovl_i3 +D_i3_801BF100 = 0x801BF100;//size:0x90 type:Vec3f segment:ovl_i3 +D_i3_801BF190 = 0x801BF190;//size:0x30 type:f32 segment:ovl_i3 -D_E16C50_801C2330 = 0x801C2330;//segment:ovl_E16C50 type:s32 size:0xA0 -D_E16C50_801C23D0 = 0x801C23D0;//segment:ovl_E16C50 type:s32 size:0x118 -D_E16C50_801C24E8 = 0x801C24E8;//segment:ovl_E16C50 type:f32 size:0x258 +sZoLimbTimers = 0x801C2330;//segment:ovl_i3 type:s32 size:0xA0 +sZoSwork = 0x801C23D0;//segment:ovl_i3 type:s32 size:0x118 +sZoFwork = 0x801C24E8;//segment:ovl_i3 type:f32 size:0x258 -D_E16C50_801C27C8 = 0x801C27C8; //segment:ovl_E16C50 size:0x12C0 -D_E16C50_801C3A88 = 0x801C3A88; //segment:ovl_E16C50 size:0x700 -D_E16C50_801C4190 = 0x801C4190; //segment:ovl_E16C50 size:0x28 -D_E16C50_801C41B8 = 0x801C41B8; //segment:ovl_E16C50 size:0x78 -D_E16C50_801C4230 = 0x801C4230; //segment:ovl_E16C50 size:0x70 -D_E16C50_801C42A0 = 0x801C42A0; //segment:ovl_E16C50 size:0x68 -D_E16C50_801C4308 = 0x801C4308; //segment:ovl_E16C50 size:0x148 -D_E16C50_801C0060 = 0x801C0060; //segment:ovl_E16C50 type:f32 -D_E16C50_801BFE14 = 0x801BFE14; //segment:ovl_E16C50 type:s32 -D_E16C50_801C0264 = 0x801C0264; //segment:ovl_E16C50 type:s32 -D_E16C50_801C02C8 = 0x801C02C8; //segment:ovl_E16C50 type:f32 -D_E16C50_801C02D0 = 0x801C02D0; //segment:ovl_E16C50 type:s32 -D_E16C50_801C0130 = 0x801C0130; //segment:ovl_E16C50 ignore:True -D_E16C50_801C2740 = 0x801C2740; //segment:ovl_E16C50 size:0x28 -D_E16C50_801C2768 = 0x801C2768; //segment:ovl_E16C50 size:0x38 -D_E16C50_801C27A0 = 0x801C27A0; //segment:ovl_E16C50 size:0x20 +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 +D_i3_801C4230 = 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 +D_i3_801BFE14 = 0x801BFE14; //segment:ovl_i3 type:s32 +D_i3_801C0264 = 0x801C0264; //segment:ovl_i3 type:s32 +D_i3_801C02C8 = 0x801C02C8; //segment:ovl_i3 type:f32 +D_i3_801C02D0 = 0x801C02D0; //segment:ovl_i3 type:s32 +D_i3_801C0130 = 0x801C0130; //segment:ovl_i3 ignore:True +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 func_E51970_80198594 = 0x80198594; func_E51970_80193CA4 = 0x80193CA4; diff --git a/linker_scripts/us/undefined_syms.ld b/linker_scripts/us/undefined_syms.ld index 07598648..fe36c5b8 100644 --- a/linker_scripts/us/undefined_syms.ld +++ b/linker_scripts/us/undefined_syms.ld @@ -357,6 +357,7 @@ D_5000480 = 0x05000480; D_6000E00 = 0x06000E00; D_6001360 = 0x06001360; D_6001DA0 = 0x06001DA0; +D_60012A0 = 0x060012A0; D_60023B0 = 0x060023B0; D_6002990 = 0x06002990; D_6003000 = 0x06003000; @@ -431,7 +432,7 @@ D_600F6C0 = 0x0600F6C0; D_600FD50 = 0x0600FD50; D_600FE9C = 0x0600FE9C; D_600FEB8 = 0x0600FEB8; -D_600FF30 = 0x0600FF30; +D_600FF30_Hitbox = 0x0600FF30; D_600FF80 = 0x0600FF80; D_600FFA0 = 0x0600FFA0; D_600FFC0 = 0x0600FFC0; @@ -467,6 +468,8 @@ D_60153B0 = 0x060153B0; D_6015730 = 0x06015730; D_6015CE0 = 0x06015CE0; D_6015F00 = 0x06015F00; +D_6015FF0 = 0x06015FF0; +D_6015DD0 = 0x06015DD0; D_6016270 = 0x06016270; D_6016374 = 0x06016374; D_60164F0 = 0x060164F0; @@ -508,8 +511,11 @@ D_601F500 = 0x0601F500; D_601F5A0 = 0x0601F5A0; D_601FCB0 = 0x0601FCB0; D_6022340 = 0x06022340; +D_6022110 = 0x06022110; D_60231C0 = 0x060231C0; D_60238F0 = 0x060238F0; +D_60239E0 = 0x060239E0; +D_6023730 = 0x06023730; D_6024010 = 0x06024010; D_60244A0 = 0x060244A0; D_60247E0 = 0x060247E0; @@ -580,7 +586,7 @@ D_6030D20 = 0x06030D20; D_6030D74 = 0x06030D74; D_6030DF8 = 0x06030DF8; D_6030E14 = 0x06030E14; -D_6030E30 = 0x06030E30; +D_6030E30_Hitbox = 0x06030E30; D_6030E4C = 0x06030E4C; D_6030E68 = 0x06030E68; D_6030E74 = 0x06030E74; @@ -714,6 +720,7 @@ D_603F338 = 0x0603F338; D_603F388 = 0x0603F388; D_603F40C = 0x0603F40C; D_603F4E4 = 0x0603F4E4; +D_6049F80 = 0x06049F80; D_604A190 = 0x0604A190; D_604A400 = 0x0604A400; D_604A710 = 0x0604A710; @@ -723,6 +730,25 @@ D_60034E0 = 0x060034E0; D_6003580 = 0x06003580; D_6003620 = 0x06003620; D_60036C0 = 0x060036C0; +D_6037160 = 0x06037160; +D_6026C80 = 0x06026C80; +D_602A120 = 0x0602A120; +D_6023F20 = 0x06023F20; +D_6028760 = 0x06028760; +D_602E4B0 = 0x0602E4B0; +D_6007E30 = 0x06007E30; +D_601F1F0 = 0x0601F1F0; +D_60266D0 = 0x060266D0; +D_C035110 = 0x0C035110; +D_6006A60 = 0x06006A60; +D_6030E30_Env = 0x06030E30; +D_6005000 = 0x06005000; +D_602E540 = 0x0602E540; +D_600EA90 = 0x0600EA90; +D_6011000 = 0x06011000; +D_600FF30_Env = 0x0600FF30; +D_6006E70 = 0x06006E70; +D_6014D50 = 0x06014D50; D_700AB70 = 0x0700AB70; D_700BE00 = 0x0700BE00; @@ -747,59 +773,57 @@ D_D00B5C0 = 0x0D00B5C0; D_D00B720 = 0x0D00B720; // fox_map, to be ordered later -D_60030D0 = 0x060030D0; -D_600B9B0 = 0x0600B9B0; -D_6010010 = 0x06010010; -D_600E210 = 0x0600E210; -D_6006320 = 0x06006320; -D_60131A0 = 0x060131A0; D_6001C80 = 0x06001C80; -D_6017640 = 0x06017640; -D_6014360 = 0x06014360; - +D_6002160 = 0x06002160; +D_60030D0 = 0x060030D0; +D_6003B50 = 0x06003B50; +D_6005740 = 0x06005740; +D_6006320 = 0x06006320; +D_6006E80 = 0x06006E80; D_6008990 = 0x06008990; D_600AD30 = 0x0600AD30; -D_6011EA0 = 0x06011EA0; -D_6016760 = 0x06016760; -D_6005740 = 0x06005740; - -D_6003B50 = 0x06003B50; +D_600B9B0 = 0x0600B9B0; D_600CC10 = 0x0600CC10; -D_60105C0 = 0x060105C0; +D_600E210 = 0x0600E210; D_600F390 = 0x0600F390; -D_6006E80 = 0x06006E80; +D_6010010 = 0x06010010; +D_60105C0 = 0x060105C0; +D_6011EA0 = 0x06011EA0; +D_60131A0 = 0x060131A0; D_60139E0 = 0x060139E0; -D_6002160 = 0x06002160; -D_6018280 = 0x06018280; +D_6014360 = 0x06014360; D_6014BA0 = 0x06014BA0; - -D_6055F20 = 0x06055F20; -D_6051D20 = 0x06051D20; +D_6016760 = 0x06016760; +D_6017640 = 0x06017640; +D_6018280 = 0x06018280; +D_60190B0 = 0x060190B0; +D_601C0D0 = 0x0601C0D0; +D_601C960 = 0x0601C960; +D_601DE80 = 0x0601DE80; +D_601F6B0 = 0x0601F6B0; D_601FF40 = 0x0601FF40; -D_602B6D0 = 0x0602B6D0; -D_6026D70 = 0x06026D70; -D_602FFD0 = 0x0602FFD0; D_60223E0 = 0x060223E0; D_6024890 = 0x06024890; -D_60190B0 = 0x060190B0; +D_6026D70 = 0x06026D70; +D_602B6D0 = 0x0602B6D0; D_602DB60 = 0x0602DB60; -D_6060610 = 0x06060610; -D_601C0D0 = 0x0601C0D0; -D_601DE80 = 0x0601DE80; -D_601C960 = 0x0601C960; -D_604B750 = 0x0604B750; -D_604DB10 = 0x0604DB10; -D_601F6B0 = 0x0601F6B0; -D_6041A80 = 0x06041A80; -D_603F380 = 0x0603F380; +D_602FFD0 = 0x0602FFD0; +D_6032440 = 0x06032440; +D_6032A60 = 0x06032A60; +D_6033080 = 0x06033080; D_6035780 = 0x06035780; D_6037E80 = 0x06037E80; -D_6033080 = 0x06033080; -D_603CC80 = 0x0603CC80; D_603A580 = 0x0603A580; -D_6032A60 = 0x06032A60; +D_603CC80 = 0x0603CC80; +D_603F380 = 0x0603F380; +D_6041A80 = 0x06041A80; D_6044180 = 0x06044180; -D_6032440 = 0x06032440; +D_604B750 = 0x0604B750; +D_604DB10 = 0x0604DB10; +D_6051D20 = 0x06051D20; +D_6055F20 = 0x06055F20; +D_6060610 = 0x06060610; + D_9006AE0 = 0x09006AE0; D_9000570 = 0x09000570; D_90086F0 = 0x090086F0; diff --git a/src/main/dmatable.c b/src/main/dmatable.c index 3f260c4d..33664f8d 100644 --- a/src/main/dmatable.c +++ b/src/main/dmatable.c @@ -63,7 +63,7 @@ DmaEntry gDmaTable[90] = { { SEGMENT_ROM_START(ast_DE5D50), { SEGMENT_ROM_START(ast_DE5D50), SEGMENT_ROM_END(ast_DE5D50) }, false }, { SEGMENT_ROM_START(ovl_DF4260), { SEGMENT_ROM_START(ovl_DF4260), SEGMENT_ROM_END(ovl_DF4260) }, false }, { SEGMENT_ROM_START(ovl_E08400), { SEGMENT_ROM_START(ovl_E08400), SEGMENT_ROM_END(ovl_E08400) }, false }, - { SEGMENT_ROM_START(ovl_E16C50), { SEGMENT_ROM_START(ovl_E16C50), SEGMENT_ROM_END(ovl_E16C50) }, false }, + { SEGMENT_ROM_START(ovl_i3), { SEGMENT_ROM_START(ovl_i3), SEGMENT_ROM_END(ovl_i3) }, false }, { SEGMENT_ROM_START(ovl_E51970), { SEGMENT_ROM_START(ovl_E51970), SEGMENT_ROM_END(ovl_E51970) }, false }, { SEGMENT_ROM_START(ovl_E6A810), { SEGMENT_ROM_START(ovl_E6A810), SEGMENT_ROM_END(ovl_E6A810) }, false }, { SEGMENT_ROM_START(ovl_E9F1D0), { SEGMENT_ROM_START(ovl_E9F1D0), SEGMENT_ROM_END(ovl_E9F1D0) }, false }, diff --git a/src/main/fox_360.c b/src/main/fox_360.c index 5dbd94a4..cc4e7dff 100644 --- a/src/main/fox_360.c +++ b/src/main/fox_360.c @@ -226,7 +226,7 @@ void func_8002E700(Player* player) { player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; - gActors->unk_0B8 = 2; + gActors[0].unk_0B8 = 2; } break; } @@ -1025,7 +1025,7 @@ void func_8003088C(Actor* arg0) { arg0->fwork[14] = sp3C.y; arg0->fwork[12] = sp3C.z; } - if ((gRadioState == 0) && (gActors->obj.status == 2)) { + if ((gRadioState == 0) && (gActors[0].obj.status == 2)) { if (arg0->unk_0D0 == 3) { switch (arg0->unk_0E4) { case 1: @@ -1375,7 +1375,7 @@ void func_800319AC(Actor* this) { case 0: if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_9) { this->fwork[0] = this->fwork[1] = 40.0f; - if (gActors->unk_0B8 == 5) { + if (gActors[0].unk_0B8 == 5) { Math_SmoothStepToF(&this->unk_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); this->fwork[1] = 200.0f; } @@ -1462,7 +1462,7 @@ void func_800319AC(Actor* this) { this->fwork[6] = gPlayer[0].unk_138 + spC4; this->fwork[1] = gPlayer[0].unk_0D0 + 10.0f; } - if ((gActors->unk_0B8 == 6) && (this->unk_0E4 < 4)) { + if ((gActors[0].unk_0B8 == 6) && (this->unk_0E4 < 4)) { this->fwork[3] = 3.0f; this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f; this->iwork[11] = 2; @@ -1508,7 +1508,7 @@ void func_800319AC(Actor* this) { this->fwork[6] = gBosses[0].obj.pos.z; this->fwork[1] = 40.0f; } - if ((this->unk_0E6 >= 0) && (this->unk_0E6 != 100) && (gActors->unk_0B8 != 6)) { + if ((this->unk_0E6 >= 0) && (this->unk_0E6 != 100) && (gActors[0].unk_0B8 != 6)) { if (spE8 < spF8) { if (spEC < spF8) { if (this->unk_0E6 != 0) { @@ -1529,7 +1529,7 @@ void func_800319AC(Actor* this) { this->iwork[4]++; this->iwork[5] = 1; if (!((this->index + gFrameCount) & sp10F) && (Rand_ZeroOne() < spF0) && func_80031900(this) && - ((gActors->unk_0B8 == 2) || (gCurrentLevel == LEVEL_TRAINING))) { + ((gActors[0].unk_0B8 == 2) || (gCurrentLevel == LEVEL_TRAINING))) { if ((this->unk_0E6 == 0) && (gCurrentLevel != LEVEL_TRAINING)) { if ((this->iwork[4] > 250) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { if ((Rand_ZeroOne() < 0.5f) || (gCurrentLevel == LEVEL_VENOM_2)) { @@ -1558,7 +1558,7 @@ void func_800319AC(Actor* this) { } } if ((gRadioState == 0) && (this->timer_0C4 == 0) && (D_8015F928 > 700) && (D_8015F908 == 0) && - (gActors->obj.status == 2)) { + (gActors[0].obj.status == 2)) { this->timer_0C4 = 600; if (Rand_ZeroOne() < 0.5f) { gActors[this->unk_0E6].iwork[6]++; @@ -1745,7 +1745,7 @@ void func_800319AC(Actor* this) { this->fwork[3] = 1.0f; this->fwork[1] = 38.0f; } - if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors->unk_0B8 == 0xA)) { + if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].unk_0B8 == 0xA)) { this->fwork[10] = 30.0f; } if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { @@ -1905,7 +1905,7 @@ void func_800319AC(Actor* this) { if (spD8 < 0.0f) { spD8 += 360.0f; } - } else if ((this->obj.pos.y < (D_80177940 + 50.0f)) && (spD8 > 180.0f)) { + } else if ((this->obj.pos.y < (gGroundLevel + 50.0f)) && (spD8 > 180.0f)) { spD8 = 0.0f; this->unk_0F4.x = 0.0f; } @@ -1967,8 +1967,8 @@ void func_800319AC(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 < D_80177940 + 40.0f) && (this->vel.y < 0.0f)) { - this->obj.pos.y = D_80177940 + 40.0f; + if ((this->obj.pos.y < gGroundLevel + 40.0f) && (this->vel.y < 0.0f)) { + this->obj.pos.y = gGroundLevel + 40.0f; this->vel.y = 0.0f; } if (this->iwork[0] != 0) { @@ -2022,7 +2022,7 @@ void func_800319AC(Actor* this) { temp_v1->unk_10 = this->unk_0F4.y + 180.0f; if (this->iwork[1] != 0) { this->iwork[1]--; - if ((this->iwork[1] == 0) && (gActors->unk_0B8 == 2) && (gRadioState == 0)) { + if ((this->iwork[1] == 0) && (gActors[0].unk_0B8 == 2) && (gRadioState == 0)) { switch (this->unk_0E4) { case 1: func_8002F5F4(gMsg_ID_9220, RCID_FALCO); @@ -2125,7 +2125,7 @@ void func_80035098(Actor* actor) { 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, gFrameCount * 20.0f * (*actor).iwork[15] * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gFrameCount * 20.0f * actor->iwork[15] * M_DTOR, 1); if (actor->iwork[15] < 0) { Matrix_RotateX(gGfxMatrix, M_PI, 1); } diff --git a/src/main/fox_43AC0.c b/src/main/fox_43AC0.c index 3cc09ae9..7da7ca99 100644 --- a/src/main/fox_43AC0.c +++ b/src/main/fox_43AC0.c @@ -1,6 +1,6 @@ #include "global.h" -s32 D_801613A0; +s32 gBossFrameCount; s32 D_800C9E90[28] = { 0x8012, 0x8013, 0x8015, 0x8017, 0x8017, 0x8019, 0x8018, 0x801B, 0x8016, 0x8018, 0x8012, 0x8020, 0x8014, 0x801E, @@ -13,13 +13,13 @@ void func_80042EC0(Boss* boss) { s32 var_a3; f32 var_fv0; - if (D_801613A0 < 0xF00) { + if (gBossFrameCount < 0xF00) { var_a3 = 10; - } else if (D_801613A0 < 0x1680) { + } else if (gBossFrameCount < 0x1680) { var_a3 = 5; - } else if (D_801613A0 < 0x1E00) { + } else if (gBossFrameCount < 0x1E00) { var_a3 = 2; - } else if (D_801613A0 < 0x2580) { + } else if (gBossFrameCount < 0x2580) { var_a3 = 1; } else { var_a3 = 0; diff --git a/src/main/sf_43E80.c b/src/main/fox_43E80.c similarity index 99% rename from src/main/sf_43E80.c rename to src/main/fox_43E80.c index 8c38a472..4534d3b4 100644 --- a/src/main/sf_43E80.c +++ b/src/main/fox_43E80.c @@ -326,12 +326,12 @@ void func_800444BC(Player* player) { sp30 = 0.0f; } sp40 = sp3C = 0.0f; - sp38 = D_80177940; + sp38 = gGroundLevel; if (D_801784AC == 4) { func_E6A810_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &sp40, &sp38, &sp3C); } if (gCurrentLevel == LEVEL_MACBETH) { - D_E6A810_801BE250.unk_6C = D_80177940; + D_E6A810_801BE250.unk_6C = gGroundLevel; D_E6A810_801BE250.unk_70 = D_E6A810_801BE250.unk_74 = 0.0f; D_800C9F10 = 0.0f; func_80047754(player); @@ -828,7 +828,7 @@ void func_80046358(Player* player) { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 + -20.0f; - player->unk_068 = D_80177940 + 3.0f; + player->unk_068 = gGroundLevel + 3.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; player->unk_070 = 0.0f; @@ -1164,7 +1164,7 @@ void func_80047504(Player* player) { } else { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 + -10.0f; - player->unk_068 = D_80177940 - 4.0f; + player->unk_068 = gGroundLevel - 4.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; player->unk_070 = 0.0f; diff --git a/src/main/fox_beam.c b/src/main/fox_beam.c index 4a417787..1aef37f6 100644 --- a/src/main/fox_beam.c +++ b/src/main/fox_beam.c @@ -54,16 +54,17 @@ void func_80035E78(PlayerShot* shot) { shot->unk_58 = 150; func_8001CE28(shot->playerNum, &shot->sfxPos); D_Timer_80161A60 = 4; - if (shot->obj.pos.y < (D_80177940 + 450.0f)) { + if (shot->obj.pos.y < (gGroundLevel + 450.0f)) { D_80178480 = 15; if (D_80161A88 == 2) { - func_8007D9DC(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); - func_8007D9DC(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 5); - func_8007D9DC(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 10); - func_8007ADF4(shot->obj.pos.x, D_80177940, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); + func_8007ADF4(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, shot->unk_48 * 0.05f, + shot->unk_48 * 0.5f); func_8007A6F0(&shot->obj.pos, 0x19000014); } else { func_80062B60(shot->obj.pos.x, shot->obj.pos.z, 0, shot->unk_48 * 3.0f); @@ -78,7 +79,7 @@ void func_80035E78(PlayerShot* shot) { if (var_fv1 > 2.0f) { var_fv1 = 2.0f; } - func_8007B550(shot->obj.pos.x, D_80177940 + 6.0f, shot->obj.pos.z, shot->unk_48 * (1.5f + var_fv1), + func_8007B550(shot->obj.pos.x, gGroundLevel + 6.0f, shot->obj.pos.z, shot->unk_48 * (1.5f + var_fv1), var_fv0); } @@ -950,7 +951,7 @@ void func_80038140(PlayerShot* shot) { if (shot->obj.id == PLAYERSHOT_4) { Object_Kill(&shot->obj, &shot->sfxPos); } else { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; func_80036318(shot); Audio_PlaySfx(0x29001062, &shot->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } @@ -964,8 +965,8 @@ void func_80038140(PlayerShot* shot) { if (shot->obj.id == PLAYERSHOT_4) { Object_Kill(&shot->obj, &shot->sfxPos); } else { - boss->unk_062 = 1; - boss->unk_066 = 100; + boss->dmgType = DMG_BEAM; + boss->dmgPart = 100; Audio_PlaySfx(0x29121007, &shot->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); func_80036318(shot); } @@ -976,25 +977,25 @@ void func_80038140(PlayerShot* shot) { if (shot->obj.id == PLAYERSHOT_4) { Object_Kill(&shot->obj, &shot->sfxPos); } else if (!((boss->obj.id == OBJ_BOSS_316) && (shot->playerNum != 0))) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; if (shot->obj.id == PLAYERSHOT_3) { - boss->unk_062 = -1; - boss->unk_064 = 20; + boss->dmgType = DMG_BOMB; + boss->damage = 20; } else if (shot->obj.id == PLAYERSHOT_8) { if (gCurrentLevel == LEVEL_AQUAS) { - boss->unk_064 = 31; + boss->damage = 31; } else { - boss->unk_064 = 30; + boss->damage = 30; } } else { - boss->unk_064 = 10; + boss->damage = 10; if (shot->playerNum < 4) { switch (gLaserStrength[shot->playerNum]) { case LASERS_SINGLE: case LASERS_TWIN: break; case LASERS_HYPER: - boss->unk_064 = 15; + boss->damage = 15; break; } } @@ -1002,7 +1003,7 @@ void func_80038140(PlayerShot* shot) { if (boss->obj.id == OBJ_BOSS_314) { boss->swork[19] = shot->playerNum; } - boss->unk_066 = temp_v0 - 1; + 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) { @@ -1385,7 +1386,7 @@ void func_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_600DB80); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, D_80177940, shot->obj.pos.z + D_80177D20, 1); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_80177D20, 1); Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, 1); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58); @@ -1525,9 +1526,9 @@ void func_8003B00C(PlayerShot* shot, Player* player) { Matrix_Push(&gCalcMatrix); func_80038140(shot); Matrix_Pop(&gCalcMatrix); - if (shot->obj.pos.y < D_80177940) { + if (shot->obj.pos.y < gGroundLevel) { shot->unk_5C = 0; - func_80036770(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); break; } else if (shot->unk_5C == 2) { shot->unk_5C = 0; @@ -1566,9 +1567,9 @@ void func_8003B00C(PlayerShot* shot, Player* player) { Object_Kill(&shot->obj, &shot->sfxPos); } if (shot->unk_5C == 1) { - if (shot->obj.pos.y < D_80177940) { + if (shot->obj.pos.y < gGroundLevel) { func_80036318(shot); - func_80036770(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); if (gCurrentLevel == LEVEL_FORTUNA) { func_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -1583,13 +1584,13 @@ void func_8003B55C(PlayerShot* shot, s32 index) { Vec3f sp44; Vec3f sp38; - if ((D_80161A88 == 2) && (shot->obj.pos.y < (D_80177940 + 50.0f)) && (index == 0)) { - func_8007ACE0(shot->obj.pos.x, D_80177940, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); - func_8007ACE0(shot->obj.pos.x, D_80177940, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); + if ((D_80161A88 == 2) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) { + func_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); + func_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } - if ((shot->obj.pos.y < D_80177940) && (D_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundLevel) && (D_801784AC != 4)) { func_80036318(shot); - shot->obj.pos.y = D_80177940 + 2; + shot->obj.pos.y = gGroundLevel + 2; if (gCurrentLevel == LEVEL_BOLSE) { func_8007A6F0(&shot->obj.pos, 0x29121007); } @@ -1602,14 +1603,14 @@ void func_8003B55C(PlayerShot* shot, s32 index) { sp44.y = sp44.z = 0.0f; sp44.x = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_80036770(shot->obj.pos.x + sp38.x, D_80177940 + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, + func_80036770(shot->obj.pos.x + sp38.x, gGroundLevel + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, 2.0f); sp44.x = -40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_80036770(shot->obj.pos.x + sp38.x, D_80177940 + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, + func_80036770(shot->obj.pos.x + sp38.x, gGroundLevel + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, 2.0f); } else { - func_80036770(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); } } if (D_80161A88 == 2) { @@ -1625,12 +1626,12 @@ void func_8003B55C(PlayerShot* shot, s32 index) { func_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_E16C50_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x, - ((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); - func_E16C50_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x, - ((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); - func_E16C50_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x, - ((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); + func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x, + ((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); + func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x, + ((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); + func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x, + ((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); } } if (shot->unk_64 == 0) { @@ -1724,12 +1725,12 @@ bool func_8003BB4C(PlayerShot* shot) { void func_8003BEF4(PlayerShot* shot) { if (gVersusMode) { - if ((shot->obj.pos.y < D_80177940) || func_8003BB4C(shot) || + if ((shot->obj.pos.y < gGroundLevel) || func_8003BB4C(shot) || !(gControllerHold[shot->playerNum].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, &shot->sfxPos); } } else { - if ((shot->obj.pos.y < D_80177940) || func_8003BB4C(shot) || + if ((shot->obj.pos.y < gGroundLevel) || func_8003BB4C(shot) || !(gControllerHold[gMainController].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, &shot->sfxPos); } @@ -1790,9 +1791,9 @@ void func_8003C008(PlayerShot* shot) { var_fa1 *= 0.6f; } if (sqrtf(SQ(temp_ft4) + SQ(temp_ft5) + SQ(var_fa1)) < var_fs2) { - boss->unk_066 = j; - boss->unk_062 = -1; - boss->unk_064 = 20; + boss->dmgPart = j; + boss->dmgType = DMG_BOMB; + boss->damage = 20; } } } @@ -1987,7 +1988,7 @@ void func_8003CC08(PlayerShot* shot) { func_80035E78(shot); break; } - if ((shot->obj.pos.y < D_80177940) && (D_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundLevel) && (D_801784AC != 4)) { func_80035E78(shot); break; } @@ -2009,7 +2010,7 @@ void func_8003CC08(PlayerShot* shot) { } } if (!((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == 2) && - (gBosses[0].unk_04E == 17))) { + (gBosses[0].actionState == 17))) { func_80038140(shot); } func_8003C3D8(shot); @@ -2059,14 +2060,14 @@ void func_8003CF90(PlayerShot* shot) { Actor* actor; Player* player; - if ((shot->obj.pos.y < D_80177940) || (shot->unk_64 == 1)) { - if ((D_80161A88 == 2) && (shot->obj.pos.y < D_80177940)) { + if ((shot->obj.pos.y < gGroundLevel) || (shot->unk_64 == 1)) { + if ((D_80161A88 == 2) && (shot->obj.pos.y < gGroundLevel)) { shot->unk_48 = 10.0f; - func_8007D9DC(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, - 0); - func_8007D9DC(shot->obj.pos.x, D_80177940 + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, - 5); - func_8007ADF4(shot->obj.pos.x, D_80177940, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); + func_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 0); + func_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 5); + func_8007ADF4(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); func_8007A6F0(&shot->obj.pos, 0x19000014); } func_80036318(shot); @@ -2221,7 +2222,7 @@ void func_8003D54C(PlayerShot* shot, s32 index) { Object_Kill(&shot->obj, &shot->sfxPos); func_8007A6F0(&shot->obj.pos, 0x0903502E); } else if (gCurrentLevel == LEVEL_AQUAS) { - func_E16C50_801ABA40(shot); + func_i3_801ABA40(shot); } else { func_8003CF90(shot); } diff --git a/src/main/fox_bg.c b/src/main/fox_bg.c index ee922e9b..bf995817 100644 --- a/src/main/fox_bg.c +++ b/src/main/fox_bg.c @@ -1,7 +1,7 @@ +// #include "prevent_bss_reordering.h" #include "global.h" -#include "prevent_bss_reordering.h" -extern f32 D_E16C50_801C4188; +extern f32 D_i3_801C4188; f32 D_8015F960; u8 D_8015F964; @@ -115,7 +115,7 @@ void func_8003DAF0(void) { sp5C = D_80178290; sp58 = D_80178298; - if (gGameState != 7) { + if (gGameState != GSTATE_PLAY) { var_s2 = 1000; } sp70 = __cosf(D_80178428); @@ -1051,7 +1051,7 @@ void func_80040CE4(void) { } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_8015F974, D_8015F978, D_8015F97C, D_8015F980); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_E16C50_801C4188); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C4188); } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, D_8015F970, -3000.0f, 1); diff --git a/src/main/fox_demo.c b/src/main/fox_demo.c index 64e5f325..c801b45f 100644 --- a/src/main/fox_demo.c +++ b/src/main/fox_demo.c @@ -348,9 +348,9 @@ void func_80048E40(Player* player) { player->timer_1F8 = 0; D_8017837C = 4; if (gCurrentLevel == LEVEL_METEO) { - D_800D3180[1] = Play_CheckMedalStatus(0xC8U) + 1; + D_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; } else { - D_800D3180[2] = Play_CheckMedalStatus(0x96U) + 1; + D_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; } D_80177930 = 2; } @@ -717,7 +717,7 @@ void func_8004A52C(Player* player) { break; case LEVEL_ZONESS: - func_E16C50_8019D428(player); + func_i3_8019D428(player); break; case LEVEL_MACBETH: @@ -729,7 +729,7 @@ void func_8004A52C(Player* player) { break; case LEVEL_SOLAR: - func_E16C50_801A10F4(player); + func_i3_801A10F4(player); break; case LEVEL_VENOM_1: @@ -742,7 +742,7 @@ void func_8004A52C(Player* player) { break; case LEVEL_AREA_6: - func_E16C50_8018DF74(player); + func_i3_8018DF74(player); break; } func_8004990C(player); @@ -872,10 +872,10 @@ void func_8004AAF4(Player* player) { func_8001D444(0, 0x803DU, 0, 0xFFU); } else if (gCurrentLevel != LEVEL_TRAINING) { func_800BA808(gMsg_ID_20180, RCID_FOX); - if (gCurrentLevel == 5) { - func_8001D444(0, D_800C9E90[gCurrentLevel], 0, 2U); + if (gCurrentLevel == LEVEL_SECTOR_Y) { + func_8001D444(0, D_800C9E90[gCurrentLevel], 0, 2); } else { - func_8001D444(0, D_800C9E90[gCurrentLevel], 0, 0xFFU); + func_8001D444(0, D_800C9E90[gCurrentLevel], 0, 0xFF); } } } @@ -939,7 +939,7 @@ void func_8004AAF4(Player* player) { D_801779A8[player->num] = 70.0f; - if ((gCurrentLevel != 9) && (gCurrentLevel != 0xA)) { + if ((gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { D_800D1970 = 0; for (i = 0, var_s0 = &gActors[2]; i < 3; i++, var_s0++) { Actor_Initialize(var_s0); @@ -1345,7 +1345,7 @@ void func_8004B368(Player* player) { player->timer_1F8 = 0; D_8017837C = 4; func_8001DBD0(0xA); - D_800D3180[gCurrentLevel] = Play_CheckMedalStatus(0x96U) + 1; + D_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } break; } @@ -1423,7 +1423,7 @@ void func_8004C930(Player* player) { func_80048E40(player); } } else if (gCurrentLevel == LEVEL_AREA_6) { - func_E16C50_8018ED78(player); + func_i3_8018ED78(player); } else if (gCurrentLevel == LEVEL_FORTUNA) { func_8004C90C(player); func_800AA800(player); @@ -1439,10 +1439,10 @@ void func_8004C930(Player* player) { func_8019EE60(player); func_800AA800(player); } else if (gCurrentLevel == LEVEL_SOLAR) { - func_E16C50_801A7930(player); + func_i3_801A7930(player); func_800AA800(player); } else if (gCurrentLevel == LEVEL_ZONESS) { - func_E16C50_8019D76C(player); + func_i3_8019D76C(player); func_800AA800(player); } else if (gCurrentLevel == LEVEL_VENOM_2) { func_80196D88(player); @@ -1753,7 +1753,8 @@ void func_8004D828(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; - if ((gCurrentLevel != 6 || D_80178284 == 0) && (gLevelType == LEVELTYPE_PLANET || gCurrentLevel == LEVEL_BOLSE)) { + if ((gCurrentLevel != LEVEL_VENOM_1 || D_80178284 == 0) && + (gLevelType == LEVELTYPE_PLANET || gCurrentLevel == LEVEL_BOLSE)) { player->vel.y -= 0.5f; player->unk_0E4 -= 2.0f; } @@ -1917,7 +1918,7 @@ void func_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_8007C688(player->pos.x, D_80177940 + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, 0x320); + func_8007C688(player->pos.x, gGroundLevel + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, 0x320); func_80062C38(player->pos.x, player->pos.z); } func_8007D0E0(player->pos.x, player->pos.y - (2.0f * player->vel.y), player->unk_138 - (2.0f * player->vel.z), @@ -1943,8 +1944,8 @@ void func_8004DEF8(Player* player) { } if ((D_80161A88 == 2) && (player->pos.y <= player->unk_0A4)) { - func_8007D9DC(player->pos.x, D_80177940 + 2.0f, player->unk_138, 3.0f, 20.0f, 0); - func_8007ADF4(player->pos.x, D_80177940, player->unk_138, 0.1f, 2.0f); + func_8007D9DC(player->pos.x, gGroundLevel + 2.0f, player->unk_138, 3.0f, 20.0f, 0); + func_8007ADF4(player->pos.x, gGroundLevel, player->unk_138, 0.1f, 2.0f); } } @@ -2483,9 +2484,9 @@ void func_8004F8AC(Actor* actor) { } D_8017836C = actor->iwork[0] / 255.0f; - D_80178370 = gActors->obj.pos.x + 10.0f; - D_80178374 = gActors->obj.pos.y - 40.0f; - D_80178378 = gActors->obj.pos.z - 70.0f; + D_80178370 = gActors[0].obj.pos.x + 10.0f; + D_80178374 = gActors[0].obj.pos.y - 40.0f; + D_80178378 = gActors[0].obj.pos.z - 70.0f; D_80178360 = 255; D_80178364 = 255; D_80178368 = 0x50; @@ -2680,12 +2681,12 @@ void func_8004FEC0(Actor* actor) { for (sp2D0 = 0; sp2D0 < 30; sp2D0++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * (*actor).fwork[20], - ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * (*actor).fwork[20], - ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * (*actor).fwork[20], 1); - Matrix_RotateY(gGfxMatrix, 2.0f * (Rand_ZeroOneSeeded() * 3.1415927f), 1); + Matrix_Translate(gGfxMatrix, ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * actor->fwork[20], + ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * actor->fwork[20], + ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * actor->fwork[20], 1); + Matrix_RotateY(gGfxMatrix, 2.0f * (Rand_ZeroOneSeeded() * M_PI), 1); Matrix_RotateZ(gGfxMatrix, (2.0f * gFrameCount) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, 2.0f * (Rand_ZeroOneSeeded() * 3.1415927f), 1); + Matrix_RotateX(gGfxMatrix, 2.0f * (Rand_ZeroOneSeeded() * M_PI), 1); switch (sp2D0 & 3) { case 0: @@ -2833,9 +2834,8 @@ void func_8004FEC0(Actor* actor) { 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]); + 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_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); diff --git a/src/main/fox_display.c b/src/main/fox_display.c index f5dfb13b..33ef2924 100644 --- a/src/main/fox_display.c +++ b/src/main/fox_display.c @@ -689,7 +689,7 @@ void func_80054280(Player* player, s32 arg1) { func_80052884(player); return; case FORM_BLUE_MARINE: - func_E16C50_801ACBB4(); + func_i3_801ACBB4(); return; case FORM_ON_FOOT: func_800526B8(player); @@ -1672,7 +1672,7 @@ void func_80057D00(void) { } } if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { - func_E16C50_801AA20C(); + func_i3_801AA20C(); } if (((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2))) { diff --git a/src/main/fox_edata_1C.c b/src/main/fox_edata_1C.c index 2791ab0a..28b1f2ea 100644 --- a/src/main/fox_edata_1C.c +++ b/src/main/fox_edata_1C.c @@ -546,11 +546,11 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_80_119 */ {(void*) D_6015730, 0, (ObjectFunc) NULL, D_6030D74, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_80_120 */ {(void*) D_601DE60, 0, (ObjectFunc) NULL, D_6030DF8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_121 */ {(void*) D_602B4C0, 0, (ObjectFunc) NULL, D_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_122 */ {(void*) D_600EE10, 0, (ObjectFunc) NULL, D_6030E30, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_80_122 */ {(void*) D_600EE10, 0, (ObjectFunc) NULL, D_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_123 */ {(void*) D_60120F0, 0, (ObjectFunc) NULL, D_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_124 */ {(void*) D_600EEF0, 0, (ObjectFunc) NULL, D_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_125 */ {(void*) D_600BF80, 0, (ObjectFunc) NULL, D_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_126 */ {(void*) func_E16C50_801BE1FC, 1, (ObjectFunc) NULL, D_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_80_126 */ {(void*) func_i3_801BE1FC, 1, (ObjectFunc) NULL, D_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_127 */ {(void*) D_9005C80, 0, (ObjectFunc) func_DF4260_801924A8, D_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_80_128 */ {(void*) D_9003F50, 0, (ObjectFunc) NULL, D_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_80_129 */ {(void*) D_900F060, 0, (ObjectFunc) NULL, D_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, @@ -612,7 +612,7 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_ACTOR_185 */ {(void*) func_8018DB6C, 1, (ObjectFunc) func_8018D9EC, D_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_186 */ {(void*) func_8005B7CC, 1, (ObjectFunc) func_8018795C, D_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_187 */ {(void*) D_6018450, 0, (ObjectFunc) func_801877C4, D_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_188 */ {(void*) func_E16C50_801BEC74, 1, (ObjectFunc) func_E16C50_801BEC68, D_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_188 */ {(void*) func_i3_801BEC74, 1, (ObjectFunc) func_i3_801BEC68, D_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_189 */ {(void*) func_8005A094, 1, (ObjectFunc) func_8006C008, D_800CBF34, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_190 */ {(void*) func_8005B848, 1, (ObjectFunc) func_800656D4, D_800CBFE4, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_191 */ {(void*) func_8005B848, 1, (ObjectFunc) func_800656D4, D_800CBFE4, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, @@ -659,51 +659,51 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_ACTOR_232 */ {(void*) func_8018B6AC, 1, (ObjectFunc) func_8018B268, D_6006890_f32, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, /* OBJ_ACTOR_233 */ {(void*) func_8018A1C0, 1, (ObjectFunc) func_80189CC8, D_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, /* OBJ_ACTOR_234 */ {(void*) func_80077218, 1, (ObjectFunc) func_800771CC, D_800CBF34, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, - /* OBJ_ACTOR_235 */ {(void*) func_E16C50_80190430, 2, (ObjectFunc) func_E16C50_801904CC, D_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_236 */ {(void*) func_E16C50_80190F08, 1, (ObjectFunc) func_E16C50_80190A00, D_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_235 */ {(void*) func_i3_80190430, 2, (ObjectFunc) func_i3_801904CC, D_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_236 */ {(void*) func_i3_80190F08, 1, (ObjectFunc) func_i3_80190A00, D_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_237 */ {(void*) func_8006A978, 1, (ObjectFunc) func_8006A96C, D_800CBF34, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) func_E16C50_801914C4, 2, (ObjectFunc) func_E16C50_80191010, D_800CBE8C, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_238 */ {(void*) func_i3_801914C4, 2, (ObjectFunc) func_i3_80191010, D_800CBE8C, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, D_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) func_E16C50_80191B4C, 1, (ObjectFunc) func_E16C50_80191680, D_800CBE8C, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, - /* OBJ_ACTOR_241 */ {(void*) func_E16C50_80191DB0, 1, (ObjectFunc) func_E16C50_80191BC4, D_800CBE70, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_242 */ {(void*) func_E16C50_80191FFC, 2, (ObjectFunc) func_E16C50_80192094, D_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) func_E16C50_80192C18, 2, (ObjectFunc) func_E16C50_80192834, D_800CBE8C, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_244 */ {(void*) func_E16C50_80193240, 2, (ObjectFunc) func_E16C50_80192E64, D_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) func_E16C50_8019983C, 1, (ObjectFunc) func_E16C50_8019969C, D_800CBE8C, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) func_E16C50_80199E24, 1, (ObjectFunc) func_E16C50_80199A28, D_800CBE8C, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_247 */ {(void*) func_E16C50_8019D3C4, 1, (ObjectFunc) func_E16C50_8019D15C, D_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) func_E16C50_8019A1FC, 1, (ObjectFunc) func_E16C50_80199F10, D_800CBEA8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) func_E16C50_8019ACCC, 1, (ObjectFunc) func_E16C50_8019A5D4, D_800CBEC4, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_250 */ {(void*) func_E16C50_8019B7DC, 1, (ObjectFunc) func_E16C50_8019B548, D_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_251 */ {(void*) func_E16C50_8019BDE0, 2, (ObjectFunc) func_E16C50_8019B854, D_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_252 */ {(void*) func_E16C50_8019C1CC, 1, (ObjectFunc) func_E16C50_8019BE48, D_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, - /* OBJ_ACTOR_253 */ {(void*) func_E16C50_8019C83C, 1, (ObjectFunc) func_E16C50_8019C454, D_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_254 */ {(void*) func_E16C50_8019CE58, 1, (ObjectFunc) func_E16C50_8019CBEC, D_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_255 */ {(void*) func_E16C50_801AE168, 1, (ObjectFunc) func_E16C50_801AD6C0, D_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_256 */ {(void*) func_E16C50_801AEB44, 1, (ObjectFunc) func_E16C50_801AE3D8, D_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_257 */ {(void*) func_E16C50_801B099C, 1, (ObjectFunc) func_E16C50_801AFA5C, D_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) func_E16C50_801B0EC0, 1, (ObjectFunc) func_E16C50_801B0B60, D_800CBE8C, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_259 */ {(void*) func_E16C50_801B619C, 2, (ObjectFunc) func_E16C50_801B638C, D_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_260 */ {(void*) func_E16C50_801B90DC, 2, (ObjectFunc) func_E16C50_801B7C78, D_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_261 */ {(void*) func_E16C50_801B504C, 2, (ObjectFunc) func_E16C50_801B50E8, D_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_262 */ {(void*) func_E16C50_801B7A24, 2, (ObjectFunc) func_E16C50_801B6FF8, D_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_263 */ {(void*) func_E16C50_801BA108, 2, (ObjectFunc) func_E16C50_801B91A4, D_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) func_E16C50_801BA4E4, 1, (ObjectFunc) func_E16C50_801BA26C, D_800CBE8C, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_265 */ {(void*) func_E16C50_801BAD7C, 1, (ObjectFunc) func_E16C50_801BA6A4, D_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_266 */ {(void*) func_E16C50_801BB204, 2, (ObjectFunc) func_E16C50_801BADF8, D_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_267 */ {(void*) func_E16C50_801BC930, 2, (ObjectFunc) func_E16C50_801BB79C, D_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_268 */ {(void*) func_E16C50_801BDE6C, 1, (ObjectFunc) func_E16C50_801BD54C, D_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_269 */ {(void*) func_E16C50_801BD264, 1, (ObjectFunc) func_E16C50_801BC9A0, D_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_270 */ {(void*) func_E16C50_801BEB1C, 1, (ObjectFunc) func_E16C50_801BE3F8, D_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_240 */ {(void*) func_i3_80191B4C, 1, (ObjectFunc) func_i3_80191680, D_800CBE8C, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_241 */ {(void*) func_i3_80191DB0, 1, (ObjectFunc) func_i3_80191BC4, D_800CBE70, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_242 */ {(void*) func_i3_80191FFC, 2, (ObjectFunc) func_i3_80192094, D_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_243 */ {(void*) func_i3_80192C18, 2, (ObjectFunc) func_i3_80192834, D_800CBE8C, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_244 */ {(void*) func_i3_80193240, 2, (ObjectFunc) func_i3_80192E64, D_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, + /* OBJ_ACTOR_245 */ {(void*) func_i3_8019983C, 1, (ObjectFunc) func_i3_8019969C, D_800CBE8C, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_246 */ {(void*) func_i3_80199E24, 1, (ObjectFunc) func_i3_80199A28, D_800CBE8C, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_247 */ {(void*) func_i3_8019D3C4, 1, (ObjectFunc) func_i3_8019D15C, D_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_248 */ {(void*) func_i3_8019A1FC, 1, (ObjectFunc) func_i3_80199F10, D_800CBEA8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_249 */ {(void*) func_i3_8019ACCC, 1, (ObjectFunc) func_i3_8019A5D4, D_800CBEC4, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_250 */ {(void*) func_i3_8019B7DC, 1, (ObjectFunc) func_i3_8019B548, D_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_251 */ {(void*) func_i3_8019BDE0, 2, (ObjectFunc) func_i3_8019B854, D_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_252 */ {(void*) func_i3_8019C1CC, 1, (ObjectFunc) func_i3_8019BE48, D_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, + /* OBJ_ACTOR_253 */ {(void*) func_i3_8019C83C, 1, (ObjectFunc) func_i3_8019C454, D_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_254 */ {(void*) func_i3_8019CE58, 1, (ObjectFunc) func_i3_8019CBEC, D_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_255 */ {(void*) func_i3_801AE168, 1, (ObjectFunc) func_i3_801AD6C0, D_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_256 */ {(void*) func_i3_801AEB44, 1, (ObjectFunc) func_i3_801AE3D8, D_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_257 */ {(void*) func_i3_801B099C, 1, (ObjectFunc) func_i3_801AFA5C, D_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_258 */ {(void*) func_i3_801B0EC0, 1, (ObjectFunc) func_i3_801B0B60, D_800CBE8C, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_259 */ {(void*) func_i3_801B619C, 2, (ObjectFunc) func_i3_801B638C, D_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_260 */ {(void*) func_i3_801B90DC, 2, (ObjectFunc) func_i3_801B7C78, D_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_261 */ {(void*) func_i3_801B504C, 2, (ObjectFunc) func_i3_801B50E8, D_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_262 */ {(void*) func_i3_801B7A24, 2, (ObjectFunc) func_i3_801B6FF8, D_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_263 */ {(void*) func_i3_801BA108, 2, (ObjectFunc) func_i3_801B91A4, D_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_264 */ {(void*) func_i3_801BA4E4, 1, (ObjectFunc) func_i3_801BA26C, D_800CBE8C, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_265 */ {(void*) func_i3_801BAD7C, 1, (ObjectFunc) func_i3_801BA6A4, D_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_266 */ {(void*) func_i3_801BB204, 2, (ObjectFunc) func_i3_801BADF8, D_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_267 */ {(void*) func_i3_801BC930, 2, (ObjectFunc) func_i3_801BB79C, D_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_268 */ {(void*) func_i3_801BDE6C, 1, (ObjectFunc) func_i3_801BD54C, D_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_269 */ {(void*) func_i3_801BD264, 1, (ObjectFunc) func_i3_801BC9A0, D_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_270 */ {(void*) func_i3_801BEB1C, 1, (ObjectFunc) func_i3_801BE3F8, D_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_271 */ {(void*) func_8002E694, 2, (ObjectFunc) func_8002E670, D_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, /* OBJ_ACTOR_272 */ {(void*) func_8002E6DC, 1, (ObjectFunc) func_8002E6B8, D_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, - /* OBJ_ACTOR_273 */ {(void*) func_80188FE4, 2, (ObjectFunc) func_80188AD0, D_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, + /* OBJ_ACTOR_273 */ {(void*) func_80188FE4, 2, (ObjectFunc) func_80188AD0, D_600FF30_Hitbox, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, /* OBJ_ACTOR_274 */ {(void*) func_8019E3A8, 1, (ObjectFunc) func_8019E234, D_800CBEC4, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) func_E16C50_8019F7AC, 1, (ObjectFunc) func_E16C50_8019F20C, D_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) func_E16C50_8019F7AC, 1, (ObjectFunc) func_E16C50_8019F20C, D_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) func_E16C50_8019F7AC, 1, (ObjectFunc) func_E16C50_8019F20C, D_800CBEC4, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) func_E16C50_8019EA7C, D_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) func_E16C50_801A003C, D_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_275 */ {(void*) func_i3_8019F7AC, 1, (ObjectFunc) func_i3_8019F20C, D_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_276 */ {(void*) func_i3_8019F7AC, 1, (ObjectFunc) func_i3_8019F20C, D_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_277 */ {(void*) func_i3_8019F7AC, 1, (ObjectFunc) func_i3_8019F20C, D_800CBEC4, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) func_i3_8019EA7C, D_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) func_i3_801A003C, D_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* OBJ_ACTOR_280 */ {(void*) D_900DD20, 0, (ObjectFunc) func_80192518, D_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_281 */ {(void*) func_80192E2C, 1, (ObjectFunc) func_80192CD4, D_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_282 */ {(void*) D_901DA50, 0, (ObjectFunc) func_80192CD4, D_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, @@ -725,13 +725,13 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_BOSS_298 */ {(void*) func_801887D0, 1, (ObjectFunc) func_80188344, D_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_299 */ {(void*) func_80042FC4, 2, (ObjectFunc) func_80042FB8, D_800CBF34, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_300 */ {(void*) func_80042FE8, 1, (ObjectFunc) func_80042FDC, D_800CBF34, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_301 */ {(void*) func_E16C50_801BEC5C, 1, (ObjectFunc) func_E16C50_801BEC50, D_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_A6 */ {(void*) func_E16C50_8018C54C, 1, (ObjectFunc) func_E16C50_80187944, D_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_301 */ {(void*) func_i3_801BEC5C, 1, (ObjectFunc) func_i3_801BEC50, D_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_A6 */ {(void*) func_i3_8018C54C, 1, (ObjectFunc) func_i3_80187944, D_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_303 */ {(void*) func_80193434, 2, (ObjectFunc) func_80190078, D_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_304 */ {(void*) func_8018FF84, 2, (ObjectFunc) func_8018FE38, D_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_305 */ {(void*) func_80190020, 2, (ObjectFunc) func_8018FF20, D_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_306 */ {(void*) func_801982A8, 1, (ObjectFunc) func_80197A94,D_E6A810_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_ZO */ {(void*) func_E16C50_801949DC, 2, (ObjectFunc) func_E16C50_80194A84, D_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, + /* OBJ_BOSS_ZO */ {(void*) func_i3_801949DC, 2, (ObjectFunc) func_i3_80194A84, D_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_308 */ {(void*) func_8008FE78, 1, (ObjectFunc) func_800907C4, D_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_309 */ {(void*) func_8002E604, 1, (ObjectFunc) func_8002E5E0, D_800CBF34, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_310 */ {(void*) func_8002E64C, 1, (ObjectFunc) func_8002E628, D_800CBF34, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, @@ -739,10 +739,10 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_BOSS_312 */ {(void*) func_80196288, 2, (ObjectFunc) func_80196210, D_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_313 */ {(void*) func_8019E98C, 1, (ObjectFunc) func_8019E454, D_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_314 */ {(void*) func_8019E2C4, 2, (ObjectFunc) func_8019C888, D_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SO */ {(void*) func_E16C50_801A71B8, 2, (ObjectFunc) func_E16C50_801A5B3C, D_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SO */ {(void*) func_i3_801A71B8, 2, (ObjectFunc) func_i3_801A5B3C, D_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_316 */ {(void*) func_801968F4, 1, (ObjectFunc) func_801946C4, D_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_317 */ {(void*) func_80193B1C, 1, (ObjectFunc) func_80193718, D_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_AQ */ {(void*) func_E16C50_801B4D84, 2, (ObjectFunc) func_E16C50_801B134C, D_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_AQ */ {(void*) func_i3_801B4D84, 2, (ObjectFunc) func_i3_801B134C, D_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_319 */ {(void*) func_801985E4, 1, (ObjectFunc) func_80194398,D_DF4260_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_320 */ {(void*) func_801928C8, 2, (ObjectFunc) func_8018DBF0, D_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_321 */ {(void*) func_8018B8C0, 1, (ObjectFunc) func_80189B70, D_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -790,7 +790,7 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_EFFECT_363 */ {(void*) func_80094BBC, 1, (ObjectFunc) func_80094954, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_364 */ {(void*) func_8007B9DC, 1, (ObjectFunc) func_8007B960, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_365 */ {(void*) func_8007E5CC, 1, (ObjectFunc) func_8007E45C, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_366 */ {(void*) func_80078550, 1, (ObjectFunc) func_E16C50_801AC918, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_366 */ {(void*) func_80078550, 1, (ObjectFunc) func_i3_801AC918, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_367 */ {(void*) func_80078604, 1, (ObjectFunc) func_8007E648, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_368 */ {(void*) func_80188FA8, 1, (ObjectFunc) func_80188F60, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_369 */ {(void*) func_8018DCE4, 1, (ObjectFunc) func_80188CAC, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, @@ -816,7 +816,7 @@ ObjectInfo D_800CC124[0x190] = { /* OBJ_EFFECT_389 */ {(void*) func_800780F8, 1, (ObjectFunc) func_8007B67C, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_390 */ {(void*) NULL, 1, (ObjectFunc) func_8007C50C, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_391 */ {(void*) func_80083B8C, 1, (ObjectFunc) func_800837EC, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_392 */ {(void*) func_E16C50_801A0AF0, 1, (ObjectFunc) func_E16C50_801A0120, NULL, 300.0f, 1, 2, 10, 0, 0.0f, 0 }, + /* OBJ_EFFECT_392 */ {(void*) func_i3_801A0AF0, 1, (ObjectFunc) func_i3_801A0120, NULL, 300.0f, 1, 2, 10, 0, 0.0f, 0 }, /* OBJ_EFFECT_393 */ {(void*) func_80078F78, 1, (ObjectFunc) func_80078EBC, NULL, 300.0f, 1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_394 */ {(void*) func_80080D04, 1, (ObjectFunc) func_80080ACC, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_395 */ {(void*) func_80082F78, 1, (ObjectFunc) func_80081C5C, NULL, 300.0f, 0, 1, 40, 0, 0.0f, 0 }, diff --git a/src/main/fox_edisplay.c b/src/main/fox_edisplay.c index 0e0b9527..16a0432e 100644 --- a/src/main/fox_edisplay.c +++ b/src/main/fox_edisplay.c @@ -1,4 +1,5 @@ #include "global.h" +// #include "prevent_bss_reordering.h" Vec3f D_801615D0; Vec3f D_801615E0; @@ -993,7 +994,7 @@ void Actor_Draw2(Actor* actor) { func_8006B74C(actor); return; case OBJ_ACTOR_236: - func_E16C50_80190F08(actor); + func_i3_80190F08(actor); return; } if ((actor->obj.id == OBJ_ACTOR_200) && (actor->unk_0B4 == 200)) { @@ -1313,19 +1314,19 @@ void func_8005ECD8(s32 index, Object* obj) { } else { switch (obj->id) { case OBJ_ACTOR_230: - Matrix_Translate(gGfxMatrix, obj->pos.x, D_80177940 + 2.0f + gActors[index].fwork[1], + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[1], obj->pos.z + D_80177D20, 1); break; case OBJ_ACTOR_229: case OBJ_ACTOR_231: - Matrix_Translate(gGfxMatrix, obj->pos.x, D_80177940 + 2.0f + gActors[index].fwork[0], + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[0], obj->pos.z + D_80177D20, 1); break; case OBJ_BOSS_316: - Matrix_Translate(gGfxMatrix, obj->pos.x, D_80177940 + 2.0f + D_8017847C, obj->pos.z, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + D_8017847C, obj->pos.z, 1); break; default: - Matrix_Translate(gGfxMatrix, obj->pos.x, D_80177940 + 2.0f, obj->pos.z + D_80177D20, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_80177D20, 1); break; } if ((D_801784AC != 4) || (obj->id == OBJ_ACTOR_200) || (obj->id == OBJ_ACTOR_195) || diff --git a/src/main/fox_effect.c b/src/main/fox_effect.c index 21ff28c6..65e47f5b 100644 --- a/src/main/fox_effect.c +++ b/src/main/fox_effect.c @@ -695,14 +695,14 @@ void func_80079618(f32 posX, f32 posY, f32 posZ, f32 scale2) { void func_8007968C(Effect* effect) { if ((gCurrentLevel != LEVEL_MACBETH) || (effect->unk_44 != 7)) { - if ((effect->timer_50 == 0) || (effect->obj.pos.y < D_80177940)) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundLevel)) { Object_Kill(&effect->obj, &effect->sfxPos); } } else { if (!(gFrameCount & 3)) { func_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 < (D_80177940 - 100.0f))) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundLevel - 100.0f))) { Object_Kill(&effect->obj, &effect->sfxPos); } } @@ -1107,7 +1107,7 @@ void func_8007AC0C(Effect* effect, f32 posX, f32 unused_posY, f32 posZ, f32 scal effect->obj.id = OBJ_EFFECT_372; effect->obj.pos.x = posX; - effect->obj.pos.y = D_80177940; + effect->obj.pos.y = gGroundLevel; effect->obj.pos.z = posZ; effect->unk_44 = 0xB4; @@ -1137,7 +1137,7 @@ void func_8007AD58(Effect* effect, f32 posX, f32 unused_posY, f32 posZ, f32 scal effect->unk_4E = 1; effect->obj.pos.x = posX; - effect->obj.pos.y = D_80177940; + effect->obj.pos.y = gGroundLevel; effect->obj.pos.z = posZ; effect->unk_44 = 0xB4; @@ -2203,10 +2203,10 @@ void func_8007DB70(Effect* effect) { case 0: effect->vel.y -= 0.5f; if ((effect->timer_50 == 0) && ((func_8006351C(1000, &effect->obj.pos, &sp54, 1) != 0) || - (effect->obj.pos.y < (D_80177940 + 10.0f)))) { + (effect->obj.pos.y < (gGroundLevel + 10.0f)))) { effect->vel.y = 0.0f; - if (effect->obj.pos.y < (D_80177940 + 10.0f)) { - effect->obj.pos.y = D_80177940; + if (effect->obj.pos.y < (gGroundLevel + 10.0f)) { + effect->obj.pos.y = gGroundLevel; } effect->unk_4E = 1; effect->timer_50 = 30; @@ -2217,7 +2217,7 @@ void func_8007DB70(Effect* effect) { func_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); func_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 < (D_80177940 + 10.0f)) || (D_80161A88 != 2)) { + if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (D_80161A88 != 2)) { func_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; @@ -2404,9 +2404,9 @@ void func_8007E6B8(Effect* effect, u32 objId, f32 posX, f32 posY, f32 posZ, f32 effect->obj.pos.z = posZ; Object_SetInfo(&effect->info, objId & 0xFFFF); - sp50 = Math_Atan2F(gPlayer->pos.x - posX, gPlayer->unk_138 - posZ); - temp_ft4 = sqrtf(SQ(gPlayer->unk_138 - posZ) + SQ(gPlayer->pos.x - posX)); - sp54 = -Math_Atan2F(gPlayer->pos.y - posY, temp_ft4); + sp50 = Math_Atan2F(gPlayer[0].pos.x - posX, gPlayer[0].unk_138 - posZ); + temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - posX) + SQ(gPlayer[0].unk_138 - posZ)); + sp54 = -Math_Atan2F(gPlayer[0].pos.y - posY, temp_ft4); Matrix_RotateY(gCalcMatrix, sp50, 0); Matrix_RotateX(gCalcMatrix, sp54, 1); @@ -2460,10 +2460,10 @@ void func_8007E93C(Effect* effect, u32 objId, f32 posX, f32 posY, f32 posZ, f32 effect->obj.pos.y = posY; effect->obj.pos.z = posZ; - Object_SetInfo(&effect->info, objId & 0xFFFF); - sp50 = Math_Atan2F(gPlayer->camEye.x - posX, gPlayer->camEye.z - posZ); - temp_ft4 = sqrtf(SQ(gPlayer->camEye.z - posZ) + SQ(gPlayer->camEye.x - posX)); - sp54 = -Math_Atan2F(gPlayer->camEye.y - posY, temp_ft4); + Object_SetInfo(&effect->info, effect->obj.id); + sp50 = Math_Atan2F(gPlayer[0].camEye.x - posX, gPlayer[0].camEye.z - posZ); + temp_ft4 = sqrtf(SQ(gPlayer[0].camEye.x - posX) + SQ(gPlayer[0].camEye.z - posZ)); + sp54 = -Math_Atan2F(gPlayer[0].camEye.y - posY, temp_ft4); Matrix_RotateY(gCalcMatrix, sp50, 0); Matrix_RotateX(gCalcMatrix, sp54, 1); @@ -2608,7 +2608,7 @@ void func_8007F04C(s32 objId, f32 posX, f32 posY, f32 posZ, f32 rotX, f32 rotY, void func_8007F11C(s32 objId, f32 posX, f32 posY, f32 posZ, f32 arg4) { s32 i; - if ((fabsf(posZ - gPlayer->unk_138) > 300.0f) || (fabsf(posX - gPlayer->pos.x) > 300.0f)) { + if ((fabsf(posZ - gPlayer[0].unk_138) > 300.0f) || (fabsf(posX - gPlayer[0].pos.x) > 300.0f)) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == 0) { Matrix_Push(&gCalcMatrix); @@ -2623,7 +2623,7 @@ void func_8007F11C(s32 objId, f32 posX, f32 posY, f32 posZ, f32 arg4) { void func_8007F20C(s32 objId, f32 posX, f32 posY, f32 posZ, f32 arg4) { s32 i; - if ((fabsf(posZ - gPlayer->camEye.z) > 300.0f) || (fabsf(posX - gPlayer->camEye.x) > 300.0f)) { + if ((fabsf(posZ - gPlayer[0].camEye.z) > 300.0f) || (fabsf(posX - gPlayer[0].camEye.x) > 300.0f)) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == 0) { Matrix_Push(&gCalcMatrix); @@ -2640,7 +2640,7 @@ void func_8007F2FC(Effect* effect) { Object_Kill(&effect->obj, &effect->sfxPos); } - if ((effect->obj.pos.y < D_80177940) && (gLevelType == LEVELTYPE_PLANET)) { + if ((effect->obj.pos.y < gGroundLevel) && (gLevelType == LEVELTYPE_PLANET)) { Object_Kill(&effect->obj, &effect->sfxPos); } @@ -2746,7 +2746,7 @@ void func_8007F6B0(Effect* effect) { temp = (i * 10.0f * M_DTOR) + randfloat; sin = __sinf(temp) * effect->scale2 * 8.0f; cos = __cosf(temp) * effect->scale2 * 8.0f; - posY = D_80177940 + 40.0f; + posY = gGroundLevel + 40.0f; if (D_801784AC == 4) { func_E6A810_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_80177D20, &x, &y, &z); @@ -2793,7 +2793,7 @@ void func_8007F958(Effect* effect) { temp = (i * 72.0f * M_DTOR) + randFloat; sin = __sinf(temp) * effect->scale2 * 16.0f; cos = __cosf(temp) * effect->scale2 * 16.0f; - posY = D_80177940 + 10.0f; + posY = gGroundLevel + 10.0f; if (D_801784AC == 4) { func_E6A810_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_80177D20, &x, &y, &z); @@ -2834,7 +2834,7 @@ void func_8007FBE0(Effect* effect) { temp = (i * 36.0f * M_DTOR) + randFloat; sin = __sinf(temp) * effect->scale2 * 16.0f; cos = __cosf(temp) * effect->scale2 * 16.0f; - posY = D_80177940 + 10.0f; + posY = gGroundLevel + 10.0f; func_8007BC7C(effect->obj.pos.x + sin, posY, effect->obj.pos.z + cos, 12.0f); } } @@ -2881,14 +2881,14 @@ void func_8007FE88(Effect* effect) { return; } - if (gPlayer->unk_280 != 0) { + if (gPlayer[0].unk_280 != 0) { var_fa0 = 100.0f; } - if (fabsf(gPlayer->unk_138 - effect->obj.pos.z) < (50.0f + var_fa0)) { - if ((fabsf(gPlayer->pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && - (fabsf(gPlayer->pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { - if ((gPlayer->unk_280 != 0) || (gPlayer->timer_27C != 0)) { + if (fabsf(gPlayer[0].unk_138 - 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)) { effect->obj.rot.y = 90.0f; effect->obj.rot.x = Rand_ZeroOne() * 360.0f; Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0); @@ -2900,20 +2900,20 @@ void func_8007FE88(Effect* effect) { effect->vel.x = destVelocity.x; effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; - gPlayer->unk_2C4 += 1; + gPlayer[0].unk_2C4 += 1; Audio_PlaySfx(0x09007011, &effect->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - if ((gPlayer->unk_280 == 0) && (gPlayer->timer_498 == 0)) { + if ((gPlayer[0].unk_280 == 0) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); - gPlayer->unk_0D8.x = 20.0f; + gPlayer[0].unk_0D8.x = 20.0f; if (effect->vel.x < 0.0f) { - gPlayer->unk_0D8.x *= -1.0f; + gPlayer[0].unk_0D8.x *= -1.0f; } if (gCurrentLevel != LEVEL_MACBETH) { - gPlayer->unk_0D8.y = 20.0f; + gPlayer[0].unk_0D8.y = 20.0f; if (effect->vel.y < 0.0f) { - gPlayer->unk_0D8.y *= -1.0f; + gPlayer[0].unk_0D8.y *= -1.0f; } } Object_Kill(&effect->obj, &effect->sfxPos); @@ -2925,10 +2925,10 @@ void func_8007FE88(Effect* effect) { if (func_E6A810_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_80177D20) != 0) { Object_Kill(&effect->obj, &effect->sfxPos); } - } else if (effect->obj.pos.y < D_80177940) { + } else if (effect->obj.pos.y < gGroundLevel) { Object_Kill(&effect->obj, &effect->sfxPos); if (D_80161A88 != 2) { - effect->obj.pos.y = D_80177940; + effect->obj.pos.y = gGroundLevel; func_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } } @@ -2987,9 +2987,9 @@ void func_8008040C(Effect* effect) { switch (effect->unk_4E) { case 0: - rotY = Math_Atan2F(gPlayer->pos.x - effect->obj.pos.x, gPlayer->unk_138 - effect->obj.pos.z); - temp = sqrtf(SQ(gPlayer->unk_138 - effect->obj.pos.z) + SQ(gPlayer->pos.x - effect->obj.pos.x)); - rotX = -Math_Atan2F(gPlayer->pos.y - effect->obj.pos.y, temp); + rotY = 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)); + rotX = -Math_Atan2F(gPlayer[0].pos.y - effect->obj.pos.y, temp); Matrix_RotateY(gCalcMatrix, rotY, 0); Matrix_RotateX(gCalcMatrix, rotX, 1); srcVelocity.y = 0.0f; @@ -3014,14 +3014,14 @@ void func_8008040C(Effect* effect) { return; } - if (gPlayer->unk_280 != 0) { + if (gPlayer[0].unk_280 != 0) { var_fa0 = 100.0f; } - if (fabsf(gPlayer->unk_138 - effect->obj.pos.z) < (50.0f + var_fa0)) { - if ((fabsf(gPlayer->pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && - (fabsf(gPlayer->pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { - if ((gPlayer->unk_280 != 0) || (gPlayer->timer_27C != 0)) { + if (fabsf(gPlayer[0].unk_138 - 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)) { effect->obj.rot.y = 90.0f; effect->obj.rot.x = Rand_ZeroOne() * 360.0f; Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0); @@ -3033,19 +3033,19 @@ void func_8008040C(Effect* effect) { effect->vel.x = destVelocity.x; effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; - gPlayer->unk_2C4++; + gPlayer[0].unk_2C4++; Audio_PlaySfx(0x09007011, &effect->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - if ((gPlayer->unk_280 == 0) && (gPlayer->timer_498 == 0)) { + if ((gPlayer[0].unk_280 == 0) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); - gPlayer->unk_0D8.x = 20.0f; + gPlayer[0].unk_0D8.x = 20.0f; if (effect->vel.x < 0.0f) { - gPlayer->unk_0D8.x *= -1.0f; + gPlayer[0].unk_0D8.x *= -1.0f; } - gPlayer->unk_0D8.y = 20.0f; + gPlayer[0].unk_0D8.y = 20.0f; if (effect->vel.y < 0.0f) { - gPlayer->unk_0D8.y *= -1.0f; + gPlayer[0].unk_0D8.y *= -1.0f; } Object_Kill(&effect->obj, &effect->sfxPos); } @@ -3056,10 +3056,10 @@ void func_8008040C(Effect* effect) { 0) { Object_Kill(&effect->obj, &effect->sfxPos); } - } else if (effect->obj.pos.y < D_80177940) { + } else if (effect->obj.pos.y < gGroundLevel) { Object_Kill(&effect->obj, &effect->sfxPos); if (D_80161A88 != 2) { - effect->obj.pos.y = D_80177940; + effect->obj.pos.y = gGroundLevel; func_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } } @@ -3142,7 +3142,7 @@ void func_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 < D_80177940)) { + if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundLevel)) { Object_Kill(&effect->obj, &effect->sfxPos); } if (effect->unk_44 != 0) { @@ -3496,6 +3496,7 @@ void func_80081C5C(Effect* effect) { s32 unusedOut; Vec3f velocity; Vec3f velocityDest; + // f32 pad; velocity.x = effect->vel.x; velocity.y = effect->vel.y; @@ -3603,7 +3604,7 @@ void func_80081C5C(Effect* effect) { if (effect->unk_44 != 0) { Object_Kill(&effect->obj, &effect->sfxPos); func_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f); - } else if (fabsf(gPlayer->unk_138 - effect->obj.pos.z) < 1000.0f) { + } else if (fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < 1000.0f) { func_8006F0D8(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f); Object_Kill(&effect->obj, &effect->sfxPos); } @@ -3650,7 +3651,7 @@ void func_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 < D_80177940)) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundLevel)) { Object_Kill(&effect->obj, &effect->sfxPos); } break; @@ -3658,11 +3659,7 @@ void func_80081C5C(Effect* effect) { case LEVEL_ZONESS: if (!(gFrameCount & 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 } @@ -3684,8 +3681,8 @@ void func_80081C5C(Effect* effect) { case 8: Math_SmoothStepToF(D_801779A8, 30.0f, 1.0f, 5.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, gBosses->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gBosses->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1); velocity.y = 0.0f; velocity.x = 0; @@ -3707,17 +3704,17 @@ void func_80081C5C(Effect* effect) { Math_SmoothStepToF(&effect->scale2, 6.0f, 0.01f, 0.05f, 0.00001f); if (effect->scale2 >= 5.0f) { gEffects[ARRAY_COUNT(gEffects) - 1].obj.status = - (gEffects[ARRAY_COUNT(gEffects) - 2].obj.status = 0); + gEffects[ARRAY_COUNT(gEffects) - 2].obj.status = 0; func_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 10); - D_80178348 = (D_80178350 = (D_80178354 = 0xFF)); - D_80178340 = (D_80178358 = 0xFF); + D_80178348 = D_80178350 = D_80178354 = 0xFF; + D_80178340 = D_80178358 = 0xFF; D_80178358 = 0; D_8017835C = 25; effect->timer_50 = 10; D_800D18EC = 0.0f; D_800D18E8 = 0.0f; gBosses[0].timer_050 = 150; - gBosses[0].unk_04E = 6; + gBosses[0].actionState = 6; effect->unk_44++; } break; @@ -3726,9 +3723,9 @@ void func_80081C5C(Effect* effect) { Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); if (effect->timer_50 == 0) { if (D_80178340 != 0) { - D_80178348 = (D_80178350 = (D_80178354 = (D_80178340 = 0))); + D_80178348 = D_80178350 = D_80178354 = D_80178340 = 0; } - effect->timer_50 = gBosses->timer_050; + effect->timer_50 = gBosses[0].timer_050; effect->unk_44++; } break; @@ -3752,7 +3749,7 @@ void func_80081C5C(Effect* effect) { posZDiff = gBosses[0].obj.pos.z - effect->obj.pos.z; yRotDeg = Math_RadToDeg(Math_Atan2F(posXDiff, posZDiff)); - xRotDeg = Math_RadToDeg(-Math_Atan2F(posYDiff, sqrtf((posXDiff * posXDiff) + (posZDiff * 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); @@ -3794,19 +3791,17 @@ void func_80081C5C(Effect* effect) { effect->unk_46 -= 1; } if ((!(gFrameCount & 0xF)) && (effect->timer_50 == 0)) { - D_800D18EC = (Math_Atan2F(gPlayer->camEye.x - gBosses->obj.pos.x, - gPlayer->camEye.z - (gBosses->obj.pos.z + D_80177D20)) * - 180.0f) / - M_PI; - D_800D18E8 = - ((-Math_Atan2F(gPlayer->camEye.y - gBosses->obj.pos.y, - sqrtf(SQ(gPlayer->camEye.x - gBosses->obj.pos.x) + - SQ((gPlayer->camEye.z - (gBosses->obj.pos.z + D_80177D20)))))) * - 180.0f) / - M_PI; + D_800D18EC = Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x, + gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_80177D20)) * + 180.0f / M_PI; + + D_800D18E8 = -Math_Atan2F(gPlayer[0].camEye.y - gBosses[0].obj.pos.y, + sqrtf(SQ(gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_80177D20)) + + SQ(gPlayer[0].camEye.x - gBosses[0].obj.pos.x))) * + 180.0f / M_PI; } - if (gBosses->timer_050 == 0) { - gBosses->swork[39] = effect->index; + if (gBosses[0].timer_050 == 0) { + gBosses[0].swork[39] = effect->index; effect->unk_44 = 1; } break; @@ -3818,24 +3813,24 @@ void func_80081C5C(Effect* effect) { effect->info.unk_14 = 0; - Math_SmoothStepToAngle(&gBosses->obj.rot.x, D_800D18E8, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToAngle(&gBosses->obj.rot.y, D_800D18EC, 0.1f, 1.0f, 0.00001f); + 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->obj.rot.x; - effect->obj.rot.y = gBosses->obj.rot.y; + effect->obj.rot.x = gBosses[0].obj.rot.x; + effect->obj.rot.y = gBosses[0].obj.rot.y; effect->obj.rot.z += 30.0f; - Matrix_RotateY(gCalcMatrix, gBosses->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gBosses->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1); velocity.x = velocity.y = 0.0f; velocity.z = 250.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->obj.pos.x = gBosses->obj.pos.x + velocityDest.x; - effect->obj.pos.y = gBosses->obj.pos.y + velocityDest.y; - effect->obj.pos.z = gBosses->obj.pos.z + velocityDest.z; + 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; if (effect->unk_44 == 0) { Math_SmoothStepToF(&effect->unk_60.x, 5.0f, 0.1f, 1.0f, 0.00001f); @@ -3844,14 +3839,14 @@ void func_80081C5C(Effect* effect) { } velocity.x = velocity.y = 0.0f; - velocity.z = fabsf(gPlayer->unk_138 - effect->obj.pos.z); + velocity.z = fabsf(gPlayer[0].unk_138 - effect->obj.pos.z); Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); if ((((effect->timer_50 == 0) && - (fabsf(gPlayer->pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) && - (fabsf(gPlayer->pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) && - (gPlayer->timer_498 == 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)) { Player_ApplyDamage(gPlayer, 0, 40); } break; @@ -4085,7 +4080,7 @@ void func_800837EC(Effect* effect) { } effect->obj.rot.y = - (Math_Atan2F(gPlayer->camEye.x - effect->obj.pos.x, gPlayer->camEye.z - (effect->obj.pos.z + D_80177D20)) * + (Math_Atan2F(gPlayer[0].camEye.x - effect->obj.pos.x, gPlayer[0].camEye.z - (effect->obj.pos.z + D_80177D20)) * 180.0f) / M_PI; } @@ -4148,9 +4143,9 @@ void func_80083D2C(f32 posX, f32 posY, f32 posZ, f32 srcZ) { } } - x = gPlayer->pos.x + xSway - posX; - y = gPlayer->pos.y - posY; - z = gPlayer->unk_138 - posZ; + x = gPlayer[0].pos.x + xSway - posX; + y = gPlayer[0].pos.y - posY; + z = gPlayer[0].unk_138 - posZ; rotY = Math_Atan2F(x, z); rotX = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); @@ -4193,8 +4188,8 @@ void func_80083FA8(Effect* effect) { return; } - effect->obj.rot.y = (-gPlayer->unk_058 * 180.0f) / M_PI; - effect->obj.rot.x = (gPlayer->unk_05C * 180.0f) / M_PI; + effect->obj.rot.y = (-gPlayer[0].unk_058 * 180.0f) / M_PI; + effect->obj.rot.x = (gPlayer[0].unk_05C * 180.0f) / M_PI; effect->obj.rot.z += 20.0f; Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, 0); diff --git a/src/main/fox_enmy.c b/src/main/fox_enmy.c index e0a0ed5e..e4d3e742 100644 --- a/src/main/fox_enmy.c +++ b/src/main/fox_enmy.c @@ -305,7 +305,7 @@ void func_80061B68(void) { sp1C = (Rand_ZeroOne() - 0.5f); x = gPlayer[0].pos.x + (sp1C * 2000.0f) + (5.0f * gPlayer[0].vel.x); y = 0; - while (y <= D_80177940) { + while (y <= gGroundLevel) { sp1C = (Rand_ZeroOne() - 0.5f); y = gPlayer[0].pos.y + (sp1C * 2000.0f) + (5.0f * gPlayer[0].vel.y); } @@ -584,7 +584,7 @@ void func_80062B60(f32 xPos, f32 zPos, s32 arg2, f32 arg3) { gEffects[i].obj.status = 1; gEffects[i].obj.id = OBJ_EFFECT_348; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = D_80177940 + 3.0f; + gEffects[i].obj.pos.y = gGroundLevel + 3.0f; gEffects[i].obj.pos.z = zPos; gEffects[i].scale2 = 10.0f; gEffects[i].scale1 = arg3; @@ -607,7 +607,7 @@ void func_80062C38(f32 xPos, f32 yPos) { gEffects[i].obj.status = 1; gEffects[i].obj.id = OBJ_EFFECT_349; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = D_80177940 + 3.0f; + gEffects[i].obj.pos.y = gGroundLevel + 3.0f; gEffects[i].obj.pos.z = yPos; gEffects[i].scale2 = 1.0f; gEffects[i].scale1 = 1.3f; @@ -628,7 +628,7 @@ void func_80062D04(f32 xPos, f32 yPos) { gEffects[i].obj.status = 1; gEffects[i].obj.id = OBJ_EFFECT_350; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = D_80177940 + 3.0f; + gEffects[i].obj.pos.y = gGroundLevel + 3.0f; gEffects[i].obj.pos.z = yPos; gEffects[i].scale2 = 3.0f; gEffects[i].scale1 = 2.0f; @@ -851,7 +851,7 @@ s32 func_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { temp.y = fabsf(boss->obj.pos.y - pos->y) * 2; temp.z = fabsf(boss->obj.pos.z - pos->z) * (5.0f / 6.0f); if (sqrtf(VEC3F_SQ(temp)) < 1500.0f) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; return 2; } } else { @@ -935,7 +935,7 @@ void func_80063CAC(Object_80* obj80) { void func_80063D58(Object_80* obj80) { s32 i; - obj80->obj.pos.y = D_80177940; + obj80->obj.pos.y = gGroundLevel; for (i = 0; i < ARRAY_COUNT(gObjects4C); i++) { if (gObjects4C[i].obj.status == 0) { Object_4C_Initialize(&gObjects4C[i]); @@ -1014,7 +1014,7 @@ void Object_Init(s32 index, ObjectId objId) { gActors[index].fwork[10] = fabsf(Math_ModF(gActors[index].obj.pos.x, 100.0f)); break; case OBJ_ACTOR_247: - func_E16C50_8019D060(&gActors[index]); + func_i3_8019D060(&gActors[index]); break; case OBJ_EFFECT_368: if (gCurrentLevel == LEVEL_TITANIA) { @@ -1230,7 +1230,7 @@ void Object_Init(s32 index, ObjectId objId) { func_DF4260_8018BE7C(&gBosses[index]); break; case OBJ_BOSS_A6: - func_E16C50_80187754(&gBosses[index]); + func_i3_80187754(&gBosses[index]); break; case OBJ_ACTOR_231: func_E6A810_8018B96C(&gActors[index]); @@ -1257,43 +1257,43 @@ void Object_Init(s32 index, ObjectId objId) { func_E6A810_8018FA48(&gBosses[index]); break; case OBJ_ACTOR_240: - func_E16C50_801915A4(&gActors[index]); + func_i3_801915A4(&gActors[index]); break; case OBJ_ACTOR_241: - func_E16C50_80191BB8(&gActors[index]); + func_i3_80191BB8(&gActors[index]); break; case OBJ_BOSS_ZO: - func_E16C50_801932AC(&gBosses[index]); + func_i3_801932AC(&gBosses[index]); break; case OBJ_ACTOR_250: - func_E16C50_8019B1F0(&gActors[index]); + func_i3_8019B1F0(&gActors[index]); break; case OBJ_ACTOR_251: - func_E16C50_8019B810(&gActors[index]); + func_i3_8019B810(&gActors[index]); break; case OBJ_ACTOR_253: - func_E16C50_8019C200(&gActors[index]); + func_i3_8019C200(&gActors[index]); break; case OBJ_ACTOR_255: - func_E16C50_801AD688(&gActors[index]); + func_i3_801AD688(&gActors[index]); break; case OBJ_ACTOR_256: - func_E16C50_801AE3AC(&gActors[index]); + func_i3_801AE3AC(&gActors[index]); break; case OBJ_ACTOR_257: - func_E16C50_801AF9FC(&gActors[index]); + func_i3_801AF9FC(&gActors[index]); break; case OBJ_BOSS_AQ: - func_E16C50_801B10F8(&gBosses[index]); + func_i3_801B10F8(&gBosses[index]); break; case OBJ_ACTOR_259: - func_E16C50_801B6344(&gActors[index]); + func_i3_801B6344(&gActors[index]); break; case OBJ_ACTOR_262: - func_E16C50_801B6E54(&gActors[index]); + func_i3_801B6E54(&gActors[index]); break; case OBJ_ACTOR_260: - func_E16C50_801B7AF0(&gActors[index]); + func_i3_801B7AF0(&gActors[index]); break; case OBJ_80_57: func_E6A810_8018F0D8(&gObjects80[index]); @@ -1315,10 +1315,10 @@ void Object_Init(s32 index, ObjectId objId) { func_DF4260_801933B4(&gActors[index]); break; case OBJ_ACTOR_265: - func_E16C50_801BA57C(&gActors[index]); + func_i3_801BA57C(&gActors[index]); break; case OBJ_ACTOR_267: - func_E16C50_801BB26C(&gActors[index]); + func_i3_801BB26C(&gActors[index]); break; } } @@ -1566,7 +1566,7 @@ void func_800656D4(Actor* actor) { sp8C.y = actor->vel.y; sp8C.z = actor->vel.z; if ((func_8006351C(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { func_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); Object_Kill(&actor->obj, &actor->sfxPos); if (actor->unk_0D0 != 0) { @@ -1694,12 +1694,12 @@ void func_80066254(Actor* actor) { void func_8006654C(Actor* actor) { actor->gravity = 0.4f; - if (actor->obj.pos.y <= D_80177940 + 130.0f) { - actor->obj.pos.y = D_80177940 + 130.0f; + if (actor->obj.pos.y <= gGroundLevel + 130.0f) { + actor->obj.pos.y = gGroundLevel + 130.0f; actor->vel.y = 0.0f; } - actor->vel.x = __sinf(actor->obj.rot.y * M_DTOR) * (*actor).fwork[0]; - actor->vel.z = __cosf(actor->obj.rot.y * M_DTOR) * (*actor).fwork[0]; + actor->vel.x = __sinf(actor->obj.rot.y * M_DTOR) * actor->fwork[0]; + actor->vel.z = __cosf(actor->obj.rot.y * M_DTOR) * actor->fwork[0]; switch (actor->unk_0B8) { case 0: if (actor->fwork[0] < 20.0f) { @@ -1896,8 +1896,8 @@ void func_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 < D_80177940 + 70.0f) { - Math_SmoothStepToF(&item->obj.pos.y, D_80177940 + 70.0f, 0.1f, 5.0f, 0.01f); + if (item->obj.pos.y < gGroundLevel + 70.0f) { + Math_SmoothStepToF(&item->obj.pos.y, gGroundLevel + 70.0f, 0.1f, 5.0f, 0.01f); } if ((gCurrentLevel == LEVEL_AQUAS) && (D_80178284 != 0)) { item->obj.pos.z += 20.0f; diff --git a/src/main/fox_enmy2.c b/src/main/fox_enmy2.c index fc8d4035..7e3dbdc4 100644 --- a/src/main/fox_enmy2.c +++ b/src/main/fox_enmy2.c @@ -331,8 +331,8 @@ void func_8006B95C(Object_80* obj80) { case 0: obj80->vel.y -= 1.0f; - if (obj80->obj.pos.y < D_80177940 + 40.0f) { - obj80->obj.pos.y = D_80177940 + 40.0f; + if (obj80->obj.pos.y < gGroundLevel + 40.0f) { + obj80->obj.pos.y = gGroundLevel + 40.0f; Audio_PlaySfx(0x19130003, &obj80->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); obj80->unk_48 = 2; obj80->vel.y = 0.0f; @@ -431,8 +431,8 @@ void func_8006BB78(Actor* actor) { if (actor->vel.y < 12.0f) { Math_SmoothStepToF(&actor->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); } - if (actor->obj.pos.y < (D_80177940 + 10.0f)) { - actor->obj.pos.y = D_80177940; + if (actor->obj.pos.y < (gGroundLevel + 10.0f)) { + actor->obj.pos.y = gGroundLevel; actor->unk_0B8 = 4; actor->unk_0B6 = 0; actor->vel.y = 0.0f; @@ -449,7 +449,7 @@ void func_8006BB78(Actor* actor) { break; } - if ((actor->obj.pos.y <= (D_80177940 + 10.0f)) && !(gFrameCount & 7)) { + if ((actor->obj.pos.y <= (gGroundLevel + 10.0f)) && !(gFrameCount & 7)) { func_8006BB1C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); } @@ -486,8 +486,8 @@ void func_8006C008(Actor* actor) { switch (actor->unk_0B8) { case 40: if (actor->unk_04A & 4) { - actor->obj.pos.x = gPlayer[0].pos.x + (*actor).fwork[3]; - actor->obj.pos.z = gPlayer[0].unk_138 + (*actor).fwork[4]; + actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3]; + actor->obj.pos.z = gPlayer[0].unk_138 + actor->fwork[4]; } actor->obj.rot.x += actor->fwork[0]; @@ -604,7 +604,7 @@ void func_8006C008(Actor* actor) { case 53: case 55: if (((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) && + (actor->obj.pos.y < (gGroundLevel + 10.0f))) && (actor->timer_0BE == 0)) { func_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 50.0f, actor->scale * 10.0f); Object_Kill(&actor->obj, &actor->sfxPos); @@ -615,7 +615,7 @@ void func_8006C008(Actor* actor) { case 56: Math_SmoothStepToF(&actor->scale, 0.0f, 0.1f, 2.0f, 0.0001f); if (((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) && + (actor->obj.pos.y < (gGroundLevel + 10.0f))) && (actor->timer_0BE == 0)) { func_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 50.0f, actor->scale * 10.0f); Object_Kill(&actor->obj, &actor->sfxPos); @@ -636,7 +636,7 @@ void func_8006C008(Actor* actor) { actor->obj.rot.z += actor->fwork[2]; if (((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) && + (actor->obj.pos.y < (gGroundLevel + 10.0f))) && (actor->timer_0BE == 0)) { func_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 50.0f, actor->scale * 10.0f); Object_Kill(&actor->obj, &actor->sfxPos); @@ -646,7 +646,7 @@ void func_8006C008(Actor* actor) { case 54: if (((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) && + (actor->obj.pos.y < (gGroundLevel + 10.0f))) && (actor->timer_0BE == 0)) { func_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 70.0f, actor->scale * 20.0f); func_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 70.0f, actor->scale * 20.0f); @@ -666,7 +666,7 @@ void func_8006C008(Actor* actor) { if (func_8006351C(actor->index, &actor->obj.pos, &D_800C9F2C, 1) != 0) { actor->vel.x *= -0.7f; } - if (actor->obj.pos.y < D_80177940) { + if (actor->obj.pos.y < gGroundLevel) { Object_Kill(&actor->obj, &actor->sfxPos); } break; @@ -680,7 +680,7 @@ void func_8006C008(Actor* actor) { actor->vel.x *= -0.7f; } - if (actor->obj.pos.y < D_80177940) { + if (actor->obj.pos.y < gGroundLevel) { if (actor->iwork[0] >= 3) { actor->vel.y = 0.0f; actor->gravity = 0.0f; @@ -690,7 +690,7 @@ void func_8006C008(Actor* actor) { } else { actor->iwork[0]++; actor->vel.y = -actor->vel.y * 0.7f; - actor->obj.pos.y = D_80177940; + actor->obj.pos.y = gGroundLevel; actor->fwork[0] *= 0.5f; actor->fwork[1] *= 0.5f; actor->fwork[2] *= 0.5f; @@ -712,12 +712,12 @@ void func_8006C008(Actor* actor) { if (actor->unk_0B8 == 0x46) { if ((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) { + (actor->obj.pos.y < (gGroundLevel + 10.0f))) { Object_Kill(&actor->obj, &actor->sfxPos); } } else if (actor->unk_0B8 == 0x27) { if (((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) && + (actor->obj.pos.y < (gGroundLevel + 10.0f))) && (actor->timer_0BE == 0)) { func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, &actor->sfxPos); @@ -739,7 +739,7 @@ void func_8006C008(Actor* actor) { func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->scale); } if (((actor->timer_0BC == 0) || (func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) && + (actor->obj.pos.y < (gGroundLevel + 10.0f))) && (actor->timer_0BE == 0)) { func_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, actor->scale * 1.5f, 4); @@ -751,7 +751,7 @@ void func_8006C008(Actor* actor) { func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); } if ((func_8006351C(actor->index, &actor->obj.pos, &D_800D0030, 1) != 0) || - (actor->obj.pos.y < (D_80177940 + 10.0f))) { + (actor->obj.pos.y < (gGroundLevel + 10.0f))) { if (gLevelType == LEVELTYPE_SPACE) { func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2.0f); Object_Kill(&actor->obj, &actor->sfxPos); @@ -1947,8 +1947,8 @@ void func_8006FEEC(Actor* actor) { if (actor->unk_0CE <= 0) { for (i = 3; i < 11; i++) { - func_E16C50_801900FC(&actor->vwork[i], &actor->vwork[i + 11], (Rand_ZeroOne() - 0.5f) * 20.0f, - Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 41, actor->scale, 200, i); + func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 11], (Rand_ZeroOne() - 0.5f) * 20.0f, + Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 41, actor->scale, 200, i); } actor->unk_044 = 0; func_80066254(actor); @@ -2188,7 +2188,7 @@ void func_800701E0(Actor* actor) { sp3C.z = actor->vel.z; if ((func_8006351C(actor->index, &actor->obj.pos, &sp3C, 0) != 0) || - (actor->obj.pos.y < (D_80177940 + 20.0f))) { + (actor->obj.pos.y < (gGroundLevel + 20.0f))) { actor->obj.status = 3; actor->obj.pos.z -= actor->vel.z; actor->unk_0D0 = 1; @@ -2592,79 +2592,79 @@ void func_80070D44(Actor* actor) { break; case 49: - if (D_800D3180[1] != 0) { + if (D_800D3180[LEVEL_METEO] != 0) { func_80070CEC(actor); } break; case 50: - if (D_800D3180[0xE] != 0) { + if (D_800D3180[LEVEL_FORTUNA] != 0) { func_80070CEC(actor); } break; case 51: - if (D_800D3180[2] != 0) { + if (D_800D3180[LEVEL_SECTOR_X] != 0) { func_80070CEC(actor); } break; case 52: - if (D_800D3180[0xC] != 0) { + if (D_800D3180[LEVEL_TITANIA] != 0) { func_80070CEC(actor); } break; case 53: - if (D_800D3180[0x11] != 0) { + if (D_800D3180[LEVEL_BOLSE] != 0) { func_80070CEC(actor); } break; case 54: - if (D_800D3180[5] != 0) { + if (D_800D3180[LEVEL_SECTOR_Y] != 0) { func_80070CEC(actor); } break; case 55: - if (D_800D3180[0x10] != 0) { + if (D_800D3180[LEVEL_KATINA] != 0) { func_80070CEC(actor); } break; case 56: - if (D_800D3180[7] != 0) { + if (D_800D3180[LEVEL_SOLAR] != 0) { func_80070CEC(actor); } break; case 57: - if (D_800D3180[0xB] != 0) { + if (D_800D3180[LEVEL_MACBETH] != 0) { func_80070CEC(actor); } break; case 58: - if (D_800D3180[0xD] != 0) { + if (D_800D3180[LEVEL_AQUAS] != 0) { func_80070CEC(actor); } break; case 59: - if (D_800D3180[8] != 0) { + if (D_800D3180[LEVEL_ZONESS] != 0) { func_80070CEC(actor); } break; case 60: - if (D_800D3180[0x12] != 0) { + if (D_800D3180[LEVEL_SECTOR_Z] != 0) { func_80070CEC(actor); } break; case 61: - if (D_800D3180[3] != 0) { + if (D_800D3180[LEVEL_AREA_6] != 0) { func_80070CEC(actor); } break; @@ -3115,8 +3115,8 @@ void func_80072594(Actor* actor) { break; case 13: - spDC = __sinf(((actor->index * 45) + gFrameCount) * M_DTOR) * (*actor).fwork[17]; - spD8 = __cosf(((actor->index * 45) + (gFrameCount * 2)) * M_DTOR) * (*actor).fwork[17]; + spDC = __sinf(((actor->index * 45) + gFrameCount) * M_DTOR) * actor->fwork[17]; + spD8 = __cosf(((actor->index * 45) + (gFrameCount * 2)) * M_DTOR) * actor->fwork[17]; pad = actor->iwork[1]; pad = gActors[pad].iwork[12]; D_Timer_80161670[pad] = 5; @@ -3442,8 +3442,8 @@ void func_80072594(Actor* actor) { actor->unk_0B6 = 0; } if (((s32) gFrameCount % 3) == 0) { - func_E16C50_8019E9F4(actor->obj.pos.x, actor->obj.pos.y - 20, actor->obj.pos.z - 180.0f, 0.0f, - Rand_ZeroOne() * 20.0f * -1.0f, 0.0f, 4.0f, 2); + func_i3_8019E9F4(actor->obj.pos.x, actor->obj.pos.y - 20, actor->obj.pos.z - 180.0f, 0.0f, + Rand_ZeroOne() * 20.0f * -1.0f, 0.0f, 4.0f, 2); } } else if (actor->unk_0B6 >= Animation_GetFrameCount(&D_40057AC)) { actor->unk_0B6 = 0; @@ -3635,9 +3635,9 @@ void func_80072594(Actor* actor) { actor->unk_0B6 = 49; } if (gFrameCount & 1) { - func_E16C50_801AC8A8(((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.x, - (Rand_ZeroOne() * 50.0f) + actor->obj.pos.y, - ((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.z, 1.0f, 0); + func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.x, + (Rand_ZeroOne() * 50.0f) + actor->obj.pos.y, + ((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.z, 1.0f, 0); } } actor->timer_0C2 = 10000; @@ -3802,8 +3802,8 @@ void func_80074FF0(Actor* actor) { case 96: RCP_SetupDL(&gMasterDisp, 0x22); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) (*actor).fwork[15], (s32) (*actor).fwork[16], - (s32) (*actor).fwork[17], 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) actor->fwork[15], (s32) actor->fwork[16], + (s32) actor->fwork[17], 255); gSPDisplayList(gMasterDisp++, D_800D003C[actor->unk_0B4].unk_00); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); break; @@ -3945,7 +3945,7 @@ void func_80074FF0(Actor* actor) { Matrix_RotateY(gGfxMatrix, M_PI, 1); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); Animation_DrawSkeleton(1, D_400A398, sp114, func_80074BFC, NULL, actor, &gIdentityMatrix); - Math_SmoothStepToF(&(*actor).fwork[16], 0.0f, 0.3f, 2.0f, 0.0001f); + Math_SmoothStepToF(&actor->fwork[16], 0.0f, 0.3f, 2.0f, 0.0001f); break; case 36: @@ -4002,7 +4002,7 @@ void func_80074FF0(Actor* actor) { case 79: temp_s0 = actor->unk_0B8; actor->unk_0B8 = 2; - func_E16C50_80190430(actor); + func_i3_80190430(actor); actor->unk_0B8 = temp_s0; break; @@ -4182,7 +4182,7 @@ void func_800763A4(Actor* actor) { sp60 = func_8006351C(actor->index, &actor->obj.pos, &sp4C, 0); - if ((sp60 != 0) || (actor->obj.pos.y < (D_80177940 + 30.0f))) { + 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_80161A88 != 2) && ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { if (gCurrentLevel == LEVEL_FORTUNA) { @@ -4219,13 +4219,13 @@ void func_800763A4(Actor* actor) { } } } else { - if ((actor->obj.pos.y < (D_80177940 + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { + if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { actor->vel.z = 0.0f; if (D_80161A88 == 2) { - func_8007D9DC(actor->obj.pos.x, D_80177940 + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 0); - func_8007D9DC(actor->obj.pos.x, D_80177940 + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 10); - func_8007D9DC(actor->obj.pos.x, D_80177940 + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 20); - func_8007ADF4(actor->obj.pos.x, D_80177940, actor->obj.pos.z, 0.1f, 3.0f); + func_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 0); + func_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 10); + func_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 20); + func_8007ADF4(actor->obj.pos.x, gGroundLevel, actor->obj.pos.z, 0.1f, 3.0f); } else { func_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); @@ -4233,7 +4233,7 @@ void func_800763A4(Actor* actor) { func_8007C120(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 0.05f, 0x1E); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - func_8007C688(actor->obj.pos.x, D_80177940 + 30.0f, actor->obj.pos.z, 3.0f, 60); + func_8007C688(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 3.0f, 60); if (gCurrentLevel == LEVEL_FORTUNA) { func_80062C38(actor->obj.pos.x, actor->obj.pos.z); } diff --git a/src/main/fox_game.c b/src/main/fox_game.c index 530b51ca..62ac610e 100644 --- a/src/main/fox_game.c +++ b/src/main/fox_game.c @@ -383,8 +383,8 @@ void func_800A26C0(void) { gLifeCount[0] = 2; D_80177D20 = 0.0f; D_8016170C = D_80177A80 = D_80177830 = D_80177838 = D_80177840 = D_80178754 = gVersusMode = D_80177AE0 = - D_80178410 = D_80177B40 = D_80177854 = D_8017784C = gDrawMode = D_80161734 = D_80161A2C = gBgColor = - D_80178340 = 0; + D_80178410 = D_80177B40 = D_80177854 = D_8017784C = gDrawMode = gShowBossHealth = D_80161A2C = + gBgColor = D_80178340 = 0; gNextGameState = D_80177C94 = D_80177CAC = D_80177CB4 = D_80177CBC = D_80177CC4 = D_80177C9C = D_80177CA4 = D_80161A5C = D_80161A34 = 0; for (i = 0; i < 4; i++) { diff --git a/src/main/fox_load.c b/src/main/fox_load.c index 5d56a082..0a18658b 100644 --- a/src/main/fox_load.c +++ b/src/main/fox_load.c @@ -128,25 +128,25 @@ u8 Overlay_Load(u8 ovlSetup, u8 ovlStage) { changeOvl = Overlay_Init(&sOvlE51970_SectorZ[ovlStage]); break; case OVL_SETUP_AQUAS: - changeOvl = Overlay_Init(&sOvlE16C50_Aquas[ovlStage]); + changeOvl = Overlay_Init(&sOvli3_Aquas[ovlStage]); break; case OVL_SETUP_AREA_6: - changeOvl = Overlay_Init(&sOvlE16C50_Area6[ovlStage]); + changeOvl = Overlay_Init(&sOvli3_Area6[ovlStage]); break; case OVL_SETUP_FORTUNA: changeOvl = Overlay_Init(&sOvlE51970_Fortuna[ovlStage]); break; case OVL_SETUP_UNK_4: - changeOvl = Overlay_Init(&sOvlE16C50_Unk4[ovlStage]); + changeOvl = Overlay_Init(&sOvli3_Unk4[ovlStage]); break; case OVL_SETUP_SECTOR_Y: changeOvl = Overlay_Init(&sOvlE9F1D0_SectorY[ovlStage]); break; case OVL_SETUP_SOLAR: - changeOvl = Overlay_Init(&sOvlE16C50_Solar[ovlStage]); + changeOvl = Overlay_Init(&sOvli3_Solar[ovlStage]); break; case OVL_SETUP_ZONESS: - changeOvl = Overlay_Init(&sOvlE16C50_Zoness[ovlStage]); + changeOvl = Overlay_Init(&sOvli3_Zoness[ovlStage]); break; case OVL_SETUP_VENOM_ANDROSS: changeOvl = Overlay_Init(&sOvlE9F1D0_Venom2[ovlStage]); diff --git a/src/main/fox_load_inits.c b/src/main/fox_load_inits.c index d83a8324..dcfcef39 100644 --- a/src/main/fox_load_inits.c +++ b/src/main/fox_load_inits.c @@ -422,8 +422,8 @@ OverlayInit sOvlE51970_SectorZ[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlE16C50_Aquas[1] = { - { OVERLAY_OFFSETS(ovl_E16C50), +OverlayInit sOvli3_Aquas[1] = { + { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_873CB0), /* 0x2 */ ROM_SEGMENT(ast_8AE0A0), /* 0x3 */ ROM_SEGMENT(ast_8E1F80), @@ -441,8 +441,8 @@ OverlayInit sOvlE16C50_Aquas[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlE16C50_Area6[1] = { - { OVERLAY_OFFSETS(ovl_E16C50), +OverlayInit sOvli3_Area6[1] = { + { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_873CB0), /* 0x2 */ ROM_SEGMENT(ast_8A68C0), /* 0x3 */ ROM_SEGMENT(ast_8BFC00), @@ -495,8 +495,8 @@ OverlayInit sOvlE51970_Fortuna[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlE16C50_Unk4[1] = { - { OVERLAY_OFFSETS(ovl_E16C50), +OverlayInit sOvli3_Unk4[1] = { + { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_873CB0), /* 0x2 */ ROM_SEGMENT(ast_8A68C0), /* 0x3 */ ROM_SEGMENT(ast_8BFC00), @@ -533,8 +533,8 @@ OverlayInit sOvlE9F1D0_SectorY[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlE16C50_Solar[1] = { - { OVERLAY_OFFSETS(ovl_E16C50), +OverlayInit sOvli3_Solar[1] = { + { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_873CB0), /* 0x2 */ ROM_SEGMENT(ast_8AE0A0), /* 0x3 */ ROM_SEGMENT(ast_8BFC00), @@ -552,8 +552,8 @@ OverlayInit sOvlE16C50_Solar[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlE16C50_Zoness[1] = { - { OVERLAY_OFFSETS(ovl_E16C50), +OverlayInit sOvli3_Zoness[1] = { + { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_873CB0), /* 0x2 */ ROM_SEGMENT(ast_8AE0A0), /* 0x3 */ ROM_SEGMENT(ast_8BFC00), diff --git a/src/main/fox_play.c b/src/main/fox_play.c index 15eea076..e0382d78 100644 --- a/src/main/fox_play.c +++ b/src/main/fox_play.c @@ -1,33 +1,74 @@ #include "global.h" +#include "fox_map.h" -extern UNK_TYPE D_800D2F50; // type unclear. unused? -extern s32 D_800D2F54; // only gets set to 0. unused? -extern f32 D_800D2F58; -extern f32 D_800D2F5C; // holds float versions of gVolumeSettings. Unused? -extern f32 D_800D2F60; -extern f32 D_800D2F64; -extern u8 D_800D2F68; -extern u8 D_800D2F6C[20]; -extern Vec3f D_800D2F80; -extern Vec3f D_800D2F8C; -extern EnvSettings* D_800D2F98[21]; -extern f32 D_800D2FEC[5]; -extern s32 D_800D3000[4][4]; -extern Vec3f D_800D3040[6]; -extern Vec3f D_800D3088[4]; -extern Vec3f D_800D30B8[4]; -extern Vec3f D_800D30E8; -extern f32 D_800D30F4[4]; -extern f32 D_800D3104[4]; -extern f32 D_800D3114[4]; -extern f32 D_800D3124[12]; -extern f32 D_800D3154[4]; -extern s32 D_800D3164[4]; -extern u8 D_800D317C; -extern u8 D_800D3180[30]; -extern s32 D_800D31A0[4]; +UNK_TYPE D_800D2F50 = 0; +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_800D2F68 = 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, + PLANET_CORNERIA, PLANET_MACBETH, PLANET_TITANIA, PLANET_AQUAS, PLANET_FORTUNA, + PLANET_METEO, PLANET_KATINA, PLANET_BOLSE, PLANET_SECTOR_Z, SAVE_SLOT_VENOM_2, +}; +Vec3f D_800D2F80 = { -65.0f, -22.0f, -65.0f }; +Vec3f D_800D2F8C = { 65.0f, -22.0f, -65.0f }; +EnvSettings* D_800D2F98[21] = { + &D_6037160, &D_6026C80, &D_602A120, &D_6023F20, &D_6028760, &D_602E4B0, &D_6007E30, + &D_601F1F0, &D_60266D0, &D_C035110, &D_6006A60, &D_6030E30_Env, &D_6005000, &D_602E540, + &D_600EA90, NULL, &D_6011000, &D_600FF30_Env, &D_6006E70, &D_6014D50, &D_302DD70, +}; +f32 D_800D2FEC[5] = { + 0.0f, 0.5f, -0.5f, 0.5f, -0.5f, +}; +s32 D_800D3000[4][4] = { + { 20, 40, 0, 0 }, + { 20, 20, 0, 0 }, + { 0, 0, 0, 0 }, + { 80, 120, 0, 0 }, +}; +Vec3f D_800D3040[6] = { + { 0.0f, -20.0f, 0.0f }, { -17.5f, -17.5f, 0.0f }, { -17.5f, 17.5f, 0.0f }, + { 0.0f, 20.0f, 0.0f }, { 17.5f, 17.5f, 0.0f }, { 17.5f, -17.5f, 0.0f }, +}; +Vec3f D_800D3088[4] = { + { 0.0f, -20.0f, 0.0f }, + { 0.0f, 20.0f, 0.0f }, + { 20.0f, 0.0f, 0.0f }, + { -20.0f, 0.0f, 0.0f }, +}; +Vec3f D_800D30B8[4] = { + { 0.0f, -20.0f, 0.0f }, + { 0.0f, 20.0f, 0.0f }, + { -20.0f, 0.0f, 0.0f }, + { 20.0f, 0.0f, 0.0f }, +}; +Vec3f D_800D30E8 = { 0.0f, -10.0f, 0.0f }; +f32 D_800D30F4[4] = { 3.0f, 4.0f, 5.0f, 3.0f }; +f32 D_800D3104[4] = { 0.2f, 0.25f, 0.3f, 0.2f }; +f32 D_800D3114[4] = { 10000.0f, -10000.0f, 10000.0f, -10000.0f }; +f32 D_800D3124[12] = { + 10000.0f, -10000.0f, -10000.0f, 10000.0f, 500.0f, -500.0f, 500.0f, -500.0f, 500.0f, -500.0f, -500.0f, 500.0f, +}; +f32 D_800D3154[4] = { + 45.0f, + -135.0f, + 135.0f, + -45.0f, +}; +s32 D_800D3164[6] = { + 1, 1, -1, 1, -1, 1, +}; +u8 D_800D317C = 255; +u8 D_800D3180[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, +}; +UNK_TYPE D_800D31A0[4] = { 0 }; -extern f32 D_E16C50_801C4188; +extern f32 D_i3_801C4188; #define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr)))) @@ -125,7 +166,7 @@ void func_800A3FEC(void) { } void func_800A4460(Player* player) { - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == 2) && (gBosses[0].unk_04E == 17)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == 2) && (gBosses[0].actionState == 17)) { player->unk_060 = __sinf(player->unk_0F4 * 0.7f * M_DTOR) * 0.5f; player->unk_088 += 13.0f; player->unk_0F4 += 20.0f; @@ -224,16 +265,16 @@ void func_800A4C40(Player* player) { Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), 1); Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); - if (player->pos.y < (D_80177940 + 100.0f)) { - if ((sp3C.y < D_80177940 + 80.0f) && !(gFrameCount & 1)) { + if (player->pos.y < (gGroundLevel + 100.0f)) { + if ((sp3C.y < gGroundLevel + 80.0f) && !(gFrameCount & 1)) { if (D_80161A64) {} - func_8007ACE0(sp3C.x, D_80177940, sp3C.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 + 20.0f); + func_8007ACE0(sp3C.x, gGroundLevel, sp3C.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 + 20.0f); } - if ((sp30.y < D_80177940 + 80.0f) && !(gFrameCount & 1)) { - func_8007ACE0(sp30.x, D_80177940, sp30.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 - 20.0f); + if ((sp30.y < gGroundLevel + 80.0f) && !(gFrameCount & 1)) { + func_8007ACE0(sp30.x, gGroundLevel, sp30.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 - 20.0f); } } - if ((sp30.y < D_80177940 + 80.0f) || (sp3C.y < D_80177940 + 80.0f)) { + if ((sp30.y < gGroundLevel + 80.0f) || (sp3C.y < gGroundLevel + 80.0f)) { if (D_80161A64 == 0) { D_80161A64 = 1; Audio_PlaySfx(0x1100000B, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); @@ -458,13 +499,13 @@ void func_800A594C(void) { if (gVersusMode) { switch (gVersusStage) { case 0: - sEnvSettings = SEGMENTED_TO_VIRTUAL(D_302DD70); + sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_302DD70); break; case 1: - sEnvSettings = SEGMENTED_TO_VIRTUAL(D_302DDB4); + sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_302DDB4); break; case 2: - sEnvSettings = SEGMENTED_TO_VIRTUAL(D_302DDF8); + sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_302DDF8); break; } } else { @@ -519,7 +560,7 @@ void func_800A5D6C(void) { void func_800A5EBC(void) { func_800A5D6C(); - D_80177940 = -25000.0f; + gGroundLevel = -25000.0f; D_80178410 = 600; if (gCurrentLevel == LEVEL_AREA_6) { D_80178410 = 300; @@ -538,11 +579,11 @@ void func_800A5EBC(void) { } if (gCurrentLevel == LEVEL_BOLSE) { D_80178410 = 300; - D_80177940 = -0.0f; + gGroundLevel = -0.0f; } if (gCurrentLevel == LEVEL_TRAINING) { D_80178410 = 800; - D_80177940 = -0.0f; + gGroundLevel = -0.0f; } } @@ -1540,7 +1581,7 @@ void func_800A8BA4(Player* player) { break; } } else if (player->form == FORM_ARWING) { - if ((player->hit1.y < (D_80177940 + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { + if ((player->hit1.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { if (D_80161A88 == 2) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1553,7 +1594,7 @@ void func_800A8BA4(Player* player) { func_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); } } - if ((player->hit2.y < (D_80177940 + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { + if ((player->hit2.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { if (D_80161A88 == 2) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1789,7 +1830,7 @@ void func_800A8BA4(Player* player) { player->unk_110 = 0.0f; player->timer_498 = 5; player->unk_0D8.y = 30.0f; - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; func_8007BFFC(player->pos.x + (10.0f * (Rand_ZeroOne() - 0.5f)), player->pos.y + (10.0f * Rand_ZeroOne()), player->unk_138 + (10.0f * (Rand_ZeroOne() - 0.5f)), 0.0f, 15.0f, 0.0f, 2.0f, 5); @@ -1828,8 +1869,8 @@ void func_800A8BA4(Player* player) { break; } Player_ApplyDamage(player, temp_v0, boss->info.damage); - if ((boss->obj.id == OBJ_BOSS_303) && ((boss->unk_04E == 2) || (boss->unk_04E == 3)) && - (sp98 >= 9)) { + if ((boss->obj.id == OBJ_BOSS_303) && + ((boss->actionState == 2) || (boss->actionState == 3)) && (sp98 >= 9)) { player->unk_0D8.y = -100.0f; } if ((boss->obj.id == OBJ_BOSS_320) && (sp98 < 5)) { @@ -2086,9 +2127,9 @@ void func_800AA800(Player* player) { player->unk_06C = player->unk_138 - player->pos.y; if (D_801784AC != 4) { if (gCamCount == 1) { - player->unk_068 = D_80177940 + 3.0f; + player->unk_068 = gGroundLevel + 3.0f; } else { - player->unk_068 = D_80177940; + player->unk_068 = gGroundLevel; if (player->form == FORM_ON_FOOT) { player->unk_06C = player->unk_138; } @@ -2111,7 +2152,7 @@ void func_800AA800(Player* player) { spC8.y = obj58->obj.pos.y; spC8.z = obj58->obj.pos.z; spD4.x = player->pos.x; - spD4.y = D_80177940; + spD4.y = gGroundLevel; spD4.z = player->unk_138; colId = COL2_4; if (obj58->obj.id == OBJ_80_141) { @@ -2198,7 +2239,7 @@ void func_800AA800(Player* player) { 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) <= D_80177940) { + if ((player->pos.y + var_fs0) <= gGroundLevel) { break; } spD4.x = spE0.x + tempx; @@ -2263,12 +2304,12 @@ void func_800AA800(Player* player) { tempx2 = spE0.x + tempx; tempy2 = spE0.y + tempy; tempz2 = spE0.z + tempz; - if (spEC.y + tempy <= D_80177940) { + if (spEC.y + tempy <= gGroundLevel) { break; } if (func_800A78C4(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { - if (D_80177940 < player->unk_068) { + if (gGroundLevel < player->unk_068) { player->unk_068 = spEC.y + 15.0f + tempy; player->unk_06C = spEC.z + 10.0f + tempz; player->unk_248 = (sp100 / 180.0f) * M_PI; @@ -2354,8 +2395,8 @@ void func_800AB334(void) { case LEVEL_AQUAS: D_80137E78 = 3; D_8015F970 = 1600.0f; - D_E16C50_801C4188 = 128.0f; - func_E16C50_801A9824(); + D_i3_801C4188 = 128.0f; + func_i3_801A9824(); break; case LEVEL_TITANIA: func_E6A810_80188F30(); @@ -2374,7 +2415,7 @@ void func_800AB334(void) { /* fallthrough */ case LEVEL_SOLAR: D_80178294 = 1; - D_80177940 = -20000.0f; + gGroundLevel = -20000.0f; fptr = MEM_ARRAY_ALLOCATE(D_801782CC, 17 * 17); for (i = 0; i < 17 * 17; i++, fptr++) { *fptr = 0.0f; @@ -2490,7 +2531,7 @@ void func_800ABAB4(void) { func_8001A838(0x11403076); func_8001A838(0x49000014); Memory_FreeAll(); - D_80177C78 = D_80177C8C = D_80161734 = D_8015F908 = D_8015F90C = D_8015F910 = 0; + D_80177C78 = D_80177C8C = gShowBossHealth = D_8015F908 = D_8015F90C = D_8015F910 = 0; D_800CA220 = 0; D_80177830 = 0; if (gCurrentLevel != LEVEL_VERSUS) { @@ -2516,7 +2557,7 @@ void func_800ABAB4(void) { D_80177E7C = 0; func_800A594C(); D_80161A62 = D_8017796C = D_Timer_80177B44 = D_80177B4C = D_8015F928 = D_8015F940 = D_80178284 = gFrameCount = - D_80178480 = D_801782FC = D_801613A0 = D_80161690 = D_8015F900 = D_80177930 = 0; + D_80178480 = D_801782FC = gBossFrameCount = D_80161690 = D_8015F900 = D_80177930 = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { D_80177930 = 1; @@ -2537,7 +2578,7 @@ void func_800ABAB4(void) { D_8017835C = 16; D_8017836C = 0.0f; D_8015F960 = 0.0f; - D_80177940 = 0.0f; + gGroundLevel = 0.0f; D_80178414 = D_80178420 = D_80178424 = D_80178428 = D_8017842C = D_80178430 = 0.0f; if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_TRAINING)) { @@ -3079,7 +3120,7 @@ void func_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 < (D_80177940 + 70.0f)) { + if (player->pos.y < (gGroundLevel + 70.0f)) { player->pos.y += 6.0f; } } @@ -3093,7 +3134,7 @@ void func_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 < (D_80177940 + 70.0f)) { + if (player->pos.y < (gGroundLevel + 70.0f)) { player->pos.y += 6.0f; } } @@ -3324,14 +3365,14 @@ void func_800AE4A4(Player* player) { D_80177968 = 2.3f; var_fa1 = 0.1f; temp = -sp78 * D_80177970; - if ((temp <= 0.0f) && (player->pos.y < (D_80177940 + 50.0f))) { + if ((temp <= 0.0f) && (player->pos.y < (gGroundLevel + 50.0f))) { D_80177968 *= 2.0f; temp = 0.0f; var_fa1 = 0.2f; } Math_SmoothStepToF(&player->unk_0E4, temp, var_fa1, D_80177968, 0.03f); var_fv1 = 1.5f; - if (player->pos.y < (D_80177940 + 70.0f)) { + if (player->pos.y < (gGroundLevel + 70.0f)) { var_fv1 = 0.8f; } if (!(((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG)) || @@ -3478,10 +3519,10 @@ void func_800AF07C(Player* player) { D_80177968 = 2.3f; D_80177970 = 0.68f; - if ((gInputPress->stick_x == 0) && (gInputPress->stick_y == 0)) { - // wut - } else { - } + // if ((gInputPress->stick_x == 0) && (gInputPress->stick_y == 0)) { + // // wut + // } else { + // } sp9C = -gInputPress->stick_x; sp98 = gInputPress->stick_y; Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f); @@ -3532,14 +3573,14 @@ void func_800AF07C(Player* player) { D_80177968 = 2.3f; sp84 = 0.1f; var_fa1 = -sp98 * D_80177970; - if ((var_fa1 <= 0.0f) && (player->pos.y < (D_80177940 + 50.0f))) { + if ((var_fa1 <= 0.0f) && (player->pos.y < (gGroundLevel + 50.0f))) { var_fa1 = 0.0f; sp84 = 0.2f; D_80177968 *= 2.0f; } Math_SmoothStepToF(&player->unk_0E4, var_fa1, sp84, D_80177968, 0.03f); var_fv1 = 1.0f; - if (player->pos.y < (D_80177940 + 70.0f)) { + if (player->pos.y < (gGroundLevel + 70.0f)) { var_fv1 = 0.8f; } if (!(((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG)) || @@ -3728,8 +3769,8 @@ void func_800AF928(Player* player) { Math_SmoothStepToF(&player->unk_000, 0.0f, 0.1f, 5.0f, 0.00001f); } player->unk_1D4 = 0; - if (player->pos.y <= D_80177940 - 5.0f) { - player->pos.y = D_80177940 - 5.0f; + if (player->pos.y <= gGroundLevel - 5.0f) { + player->pos.y = gGroundLevel - 5.0f; if (player->vel.y < -20.0f) { player->unk_1F4 = 20; } @@ -3942,7 +3983,7 @@ void func_800B0194(Player* player) { player->unk_1D4 = 0; player->vel.y -= player->unk_0D4; player->pos.y += player->vel.y; - if (player->pos.y <= D_80177940) { + if (player->pos.y <= gGroundLevel) { player->unk_1D4 = 1; player->pos.y = 0.0f; player->vel.y = 0.0f; @@ -4019,7 +4060,7 @@ void func_800B0F50(Player* playerx) { } else { player->unk_09C = 700.0f; player->unk_0A0 = 680.0f; - player->unk_0A4 = D_80177940 + 40.0f; + player->unk_0A4 = gGroundLevel + 40.0f; player->unk_0A8 = 3000.0f; } player->unk_0D0 = D_80161A54; @@ -4048,7 +4089,7 @@ void func_800B0F50(Player* playerx) { player->unk_09C = 700.0f; player->unk_0D0 = 20.0f; player->unk_0A0 = 720.0f; - player->unk_0A4 = D_80177940 + 30.0f; + player->unk_0A4 = gGroundLevel + 30.0f; break; case LEVEL_SOLAR: case LEVEL_ZONESS: @@ -4270,7 +4311,7 @@ void func_800B0F50(Player* playerx) { } else if (!gVersusMode && (D_80177C90 != 0xFFFF) && ((gLevelMode != LEVELMODE_ALL_RANGE) || (D_8015F924 == 0))) { func_8001D444(0, D_80177C90, 0, 0xFF); } - D_80177840 = D_80177848 = D_80177850 = 0; + D_80177840 = gBossHealthBar = D_80177850 = 0; if ((gCurrentLevel == LEVEL_TRAINING)) { D_80177824 = 1; @@ -5045,12 +5086,12 @@ void func_800B42B0(Player* player) { func_80047504(player); break; case FORM_BLUE_MARINE: - func_E16C50_801ACE50(player); - func_E16C50_801AD328(player); + func_i3_801ACE50(player); + func_i3_801AD328(player); func_800B41E0(player); - func_E16C50_801AACF8(player); + func_i3_801AACF8(player); func_800ADF58(player); - func_E16C50_801AC274(player); + func_i3_801AC274(player); func_800A8BA4(player); func_800AA800(player); func_800B415C(player); @@ -5112,7 +5153,7 @@ void func_800B44C4(Player* player) { } break; case FORM_BLUE_MARINE: - func_E16C50_801BEC80(player); + func_i3_801BEC80(player); return; case FORM_ON_FOOT: func_800B00C0(player); @@ -5498,7 +5539,7 @@ void func_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 < (D_80177940 + 50.0f)) { + } else if (player->pos.y < (gGroundLevel + 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); @@ -5896,7 +5937,7 @@ void func_800B71E4(Player* player) { } else if (player->form == FORM_LANDMASTER) { func_80043468(player); } else if (player->form == FORM_BLUE_MARINE) { - func_E16C50_801AA8E8(player); + func_i3_801AA8E8(player); } break; case LEVELMODE_ALL_RANGE: @@ -6061,7 +6102,7 @@ void func_800B79B0(void) { break; case LEVEL_VENOM_ANDROSS: func_E9F1D0_8018BDD8(); - D_80177940 = -25000.0f; + gGroundLevel = -25000.0f; gPlayer[0].unk_0A0 = 612.0f; gPlayer[0].unk_0A4 = -544.0f; if (D_Timer_80177B44 != 0) { @@ -6151,9 +6192,9 @@ void func_800B79B0(void) { var_a0 = MIN(gPlayer[0].shields, 0xFF); func_8001D1C8(var_a0, sp3A); if (!(gFrameCount & 7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { - func_E16C50_8019E8B8((Rand_ZeroOne() - 0.5f) * 6000.0f, -80.0f, - gPlayer[0].unk_138 + ((Rand_ZeroOne() * 2000.0f) + -6000.0f), - (Rand_ZeroOne() * 10.0f) + 20.0f); + func_i3_8019E8B8((Rand_ZeroOne() - 0.5f) * 6000.0f, -80.0f, + gPlayer[0].unk_138 + ((Rand_ZeroOne() * 2000.0f) + -6000.0f), + (Rand_ZeroOne() * 10.0f) + 20.0f); } func_8008C104(D_60229A4, D_6010198); if (gPlayer[0].shields == 0) { diff --git a/src/main/fox_versus.c b/src/main/fox_versus.c index 091f4f0a..853c6a7e 100644 --- a/src/main/fox_versus.c +++ b/src/main/fox_versus.c @@ -1923,7 +1923,7 @@ void func_800C2244(Actor* actor) { x3 += 360.0f; } - } else if (actor->obj.pos.y < D_80177940 + 50.0f) { + } else if (actor->obj.pos.y < gGroundLevel + 50.0f) { if (x3 > 180.0f) { x3 = 0.0f; actor->unk_0F4.x = 0.0f; @@ -1959,8 +1959,8 @@ void func_800C2244(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < D_80177940 + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = D_80177940 + 40.0f; + if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundLevel + 40.0f; actor->vel.y = 0.0f; } diff --git a/src/main/sf_hud.c b/src/main/sf_hud.c index 20692e06..6d48d97f 100644 --- a/src/main/sf_hud.c +++ b/src/main/sf_hud.c @@ -1322,8 +1322,8 @@ void func_8008DE68(void) { f32 temp7; f32 var_fv0; - if ((D_80161734 == 1) && (gTeamShields[2] > 0)) { - if ((D_80177848 >= 0) && (D_801616BC == -1.0f)) { + if ((gShowBossHealth == 1) && (gTeamShields[2] > 0)) { + if ((gBossHealthBar >= 0) && (D_801616BC == -1.0f)) { Audio_PlaySfx(0x4900C028, &D_800C5D28, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); D_801616BC = 255.0f; } @@ -1358,7 +1358,7 @@ void func_8008DE68(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); if (D_801616BC > 0.0f) { - var_fv0 = (D_801616BC - D_80177848) * (2.76f / D_801616BC); + var_fv0 = (D_801616BC - gBossHealthBar) * (2.76f / D_801616BC); if (var_fv0 > 2.76f) { var_fv0 = 2.76f; } @@ -1600,10 +1600,10 @@ void func_8008F96C(void) { #pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_hud/func_80090200.s") void func_800907C4(Boss* boss) { - switch (boss->unk_04E) { + switch (boss->actionState) { case 0: if ((boss->fwork[1] == 255.0f) && (boss->fwork[2] == 212.0f)) { - boss->unk_04E = 1; + boss->actionState = 1; } else { Math_SmoothStepToF(&boss->fwork[1], 255.0f, 0.3f, 6.0f, 6.0f); @@ -1613,7 +1613,7 @@ void func_800907C4(Boss* boss) { case 1: if ((boss->fwork[1] == 28.0f) && (boss->fwork[2] == 23.0f)) { - boss->unk_04E = 0; + boss->actionState = 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); @@ -1819,9 +1819,9 @@ bool func_800910C0(Actor* actor) { actor->timer_0BC = (s32) (Rand_ZeroOne() * 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; + 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; if (actor->unk_0E4 == 1) { var_fv1 = 1500.0f; @@ -1965,7 +1965,7 @@ bool func_80091864(Actor* actor) { sp44 += 40.0f; if (sp44 >= 360.0f) { sp44 -= 360.0f; - } else if ((actor->obj.pos.y < (D_80177940 + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && (sp44 > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && (sp44 > 180.0f)) { sp44 = 0.0f; } actor->iwork[0] = 0; @@ -2022,8 +2022,8 @@ bool func_80091B90(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < D_80177940 + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { - actor->obj.pos.y = D_80177940 + 40.0f; + if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { + actor->obj.pos.y = gGroundLevel + 40.0f; actor->vel.y = 0.0f; } actor->vel.z -= D_80177D08; @@ -2054,7 +2054,7 @@ bool func_80091DF4(Actor* actor) { Vec3f sp44; Vec3f sp38; - if ((actor->iwork[0] != 0) && (D_80177848 > 70)) { + if ((actor->iwork[0] != 0) && (gBossHealthBar > 70)) { actor->iwork[0] = 0; sp44.x = 0.0f; sp44.y = 0.0f; @@ -2214,7 +2214,7 @@ void func_80093310(void) { this->obj.pos.x = 0.0f; this->obj.pos.y += 1700.0f; this->obj.pos.z -= 5000.0f; - gActors->unk_0B6 = 1; + gActors[0].unk_0B6 = 1; if (1) {} this->obj.id = OBJ_ACTOR_195; Object_SetInfo(&this->info, this->obj.id); diff --git a/src/overlays/ovl_DF4260/fox_co.c b/src/overlays/ovl_DF4260/fox_co.c index dc2b4c85..29f56522 100644 --- a/src/overlays/ovl_DF4260/fox_co.c +++ b/src/overlays/ovl_DF4260/fox_co.c @@ -91,8 +91,8 @@ void func_DF4260_80187838(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { void func_DF4260_801878D8(Boss* boss) { s32 i; - D_801613A0 = 0; - if (gLevelMode == 0) { + gBossFrameCount = 0; + if (gLevelMode == LEVELMODE_ON_RAILS) { if (gPlayer[0].state_1C8 == 3) { gPlayer[0].state_1C8 = 9; gPlayer[0].unk_1D0 = 0; @@ -137,11 +137,11 @@ void func_DF4260_80187AC8(Boss* boss) { s32 var_s1; s32 var_s1_2; - if (boss->unk_062 != 0) { - boss->unk_062 = 0; - if (boss->unk_066 == 0) { + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; + if (boss->dmgPart == 0) { boss->swork[10] = 15; - boss->swork[29] -= boss->unk_064; + boss->swork[29] -= boss->damage; func_DF4260_80187A38(boss, D_DF4260_8019B6D8[62], D_DF4260_8019B6D8[63], D_DF4260_8019B6D8[64], 0.2f, 20); if (boss->swork[29] < 30) { func_8007A6F0(&boss->obj.pos, 0x2943500F); @@ -158,7 +158,7 @@ void func_DF4260_80187AC8(Boss* boss) { if (fabsf(boss->obj.rot.x) < 20.0f) { boss->swork[32] = 1; } - boss->unk_04E = 7; + boss->actionState = 7; boss->timer_050 = 100; func_800182F4(0x105000FF); func_800182F4(0x115000FF); @@ -178,13 +178,13 @@ void func_DF4260_80187AC8(Boss* boss) { } func_800BA808(gMsg_ID_2280, RCID_BOSS_CORNERIA); func_80042EC0(boss); - D_801613A0 = 100000; + gBossFrameCount = 100000; return; } - } else if (boss->unk_066 == 3) { + } else if (boss->dmgPart == 3) { boss->swork[3] = 15; boss->swork[20] = 30; - boss->swork[28] -= boss->unk_064; + boss->swork[28] -= boss->damage; func_DF4260_801879F0(boss, D_DF4260_8019B6D8[12] + ((Rand_ZeroOne() - 0.5f) * 60.0f), D_DF4260_8019B6D8[13], D_DF4260_8019B6D8[14] + ((Rand_ZeroOne() - 0.5f) * 60.0f), 2.0f); func_DF4260_80187A38(boss, D_DF4260_8019B6D8[12], D_DF4260_8019B6D8[13], D_DF4260_8019B6D8[14], 0.1f, 20); @@ -195,10 +195,10 @@ void func_DF4260_80187AC8(Boss* boss) { } } - if (boss->unk_066 == 1) { + if (boss->dmgPart == 1) { boss->swork[2] = 15; boss->swork[21] = 30; - boss->swork[26] -= boss->unk_064; + boss->swork[26] -= boss->damage; func_DF4260_801879F0(boss, D_DF4260_8019B6D8[6] + ((Rand_ZeroOne() - 0.5f) * 60.0f), D_DF4260_8019B6D8[7], D_DF4260_8019B6D8[8] + ((Rand_ZeroOne() - 0.5f) * 60.0f), 2.0f); @@ -208,10 +208,10 @@ void func_DF4260_80187AC8(Boss* boss) { boss->info.hitbox[1 + 6] = 100000.0f; func_DF4260_8018798C(boss, D_DF4260_8019B6D8[6], D_DF4260_8019B6D8[7], D_DF4260_8019B6D8[8], 7.0f); } - } else if (boss->unk_066 == 2) { + } else if (boss->dmgPart == 2) { boss->swork[1] = 15; boss->swork[22] = 30; - boss->swork[27] -= boss->unk_064; + boss->swork[27] -= boss->damage; func_DF4260_801879F0(boss, D_DF4260_8019B6D8[0] + ((Rand_ZeroOne() - 0.5f) * 60.0f), D_DF4260_8019B6D8[1], D_DF4260_8019B6D8[2] + ((Rand_ZeroOne() - 0.5f) * 60.0f), 2.0f); func_DF4260_80187A38(boss, D_DF4260_8019B6D8[0], D_DF4260_8019B6D8[1], D_DF4260_8019B6D8[2], 0.1f, 20); @@ -220,11 +220,11 @@ void func_DF4260_80187AC8(Boss* boss) { boss->info.hitbox[1 + 12] = 100000.0f; func_DF4260_8018798C(boss, D_DF4260_8019B6D8[0], D_DF4260_8019B6D8[1], D_DF4260_8019B6D8[2], 7.0f); } - } else if ((boss->unk_066 == 4) || (boss->unk_066 == 5)) { + } else if ((boss->dmgPart == 4) || (boss->dmgPart == 5)) { Audio_PlaySfx(0x2903300E, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); boss->swork[23] = 200; - if (boss->unk_066 == 4) { - boss->swork[24] -= boss->unk_064; + 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) { @@ -237,13 +237,13 @@ void func_DF4260_80187AC8(Boss* boss) { (Rand_ZeroOne() * 20.0f), 0.0f, 5.5f, var_s1 + 0x1C, ((s32) (Rand_ZeroOne() * 30.0f)) + 60.0f); } - if (boss->unk_04E < 5) { - boss->unk_04E = 5; + if (boss->actionState < 5) { + boss->actionState = 5; boss->timer_050 = 60; } } } else { - boss->swork[25] -= boss->unk_064; + boss->swork[25] -= boss->damage; boss->swork[4] = boss->swork[5] = boss->swork[6] = 5; boss->swork[19] = 30; if (boss->swork[25] <= 0) { @@ -257,8 +257,8 @@ void func_DF4260_80187AC8(Boss* boss) { (Rand_ZeroOne() * 20.0f), 0.0f, 5.5f, var_s1 + 0x1C, ((s32) (Rand_ZeroOne() * 30.0f)) + 60.0f); } - if (boss->unk_04E < 5) { - boss->unk_04E = 6; + if (boss->actionState < 5) { + boss->actionState = 6; boss->timer_050 = 60; } } @@ -268,7 +268,7 @@ void func_DF4260_80187AC8(Boss* boss) { boss->timer_050 += 10; } - if ((boss->unk_04E != 0) && (boss->unk_04E < 5)) { + if ((boss->actionState != 0) && (boss->actionState < 5)) { boss->fwork[14] = 0.0f; if (Rand_ZeroOne() < 0.5f) { var_v0 = 0x144; @@ -277,8 +277,8 @@ void func_DF4260_80187AC8(Boss* boss) { } func_DF4260_80187838(boss, boss->obj.pos.x, boss->obj.pos.y + 100.0f, boss->obj.pos.z, var_v0); } - if (boss->unk_04E < 5) { - boss->unk_04E = 0; + if (boss->actionState < 5) { + boss->actionState = 0; switch ((s32) (Rand_ZeroOne() * 5.0f)) { case 0: boss->swork[31] = 2; @@ -359,7 +359,7 @@ void func_DF4260_801887AC(Boss* boss) { s32 sp38; s32 temp_v0; - if ((D_801613A0 >= 500)) { + if ((gBossFrameCount >= 500)) { temp_v0 = boss->swork[30]; if (temp_v0 != 0) { switch (temp_v0) { @@ -406,7 +406,7 @@ void func_DF4260_801887AC(Boss* boss) { void func_DF4260_80188A18(Boss* boss) { if (boss->timer_050 == 0) { - boss->unk_04E = 0; + boss->actionState = 0; boss->timer_050 = (s32) (Rand_ZeroOne() * 20.0f) + 20; boss->fwork[14] = 0.0f; @@ -433,7 +433,7 @@ void func_DF4260_80188A18(Boss* boss) { break; } - if ((D_801613A0 >= 1001) && (Rand_ZeroOne() < 0.3f)) { + if ((gBossFrameCount >= 1001) && (Rand_ZeroOne() < 0.3f)) { if (Rand_ZeroOne() < 0.5f) { func_8002E4F8(gMsg_ID_2263, RCID_BOSS_CORNERIA); } else { @@ -441,7 +441,7 @@ void func_DF4260_80188A18(Boss* boss) { } } } - if ((D_801613A0 >= 801) && !(D_801613A0 & 0x1FF)) { + if ((gBossFrameCount >= 801) && !(gBossFrameCount & 0x1FF)) { if (D_80177B6C < 2) { func_800BA808(gMsg_ID_20237, RCID_PEPPY); } else if (D_801615D0.z > 0.0f) { @@ -484,7 +484,7 @@ void func_DF4260_80188D50(Boss* boss) { if (D_DF4260_801997E0 != 0) { D_DF4260_801997E0--; - } else if ((gPlayer[0].pos.y < 200.0f) && (boss->unk_04E < 5) && + } else if ((gPlayer[0].pos.y < 200.0f) && (boss->actionState < 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)) { boss->swork[36]++; @@ -566,7 +566,7 @@ void func_DF4260_80189058(Boss* boss) { sp78 = D_DF4260_801997FC; sp6C = D_DF4260_80199808; - if (gPlayer->state_1C8 != 9) { + if (gPlayer[0].state_1C8 != 9) { if (boss->swork[33] == 0) { boss->swork[33]++; D_80178284 = 2; @@ -585,15 +585,15 @@ void func_DF4260_80189058(Boss* boss) { boss->info.hitbox[1 + 24] = 0.0f; boss->info.hitbox[1 + 30] = 0.0f; boss->timer_052 = 100; - boss->unk_04E = 0; + boss->actionState = 0; boss->swork[31] = 1; D_DF4260_8019B6D8[66] = 0.0f; D_DF4260_8019B6D8[67] = 10000.0f; boss->timer_050 = 30; Animation_GetFrameData(&D_602C0D0, 0, boss->vwork); - D_801613A0 = 0; + gBossFrameCount = 0; } - D_801613A0++; + gBossFrameCount++; gUnkEntities28[59].unk_00 = 1; gUnkEntities28[59].unk_02 = 0x66; gUnkEntities28[59].pos.x = boss->obj.pos.x; @@ -604,13 +604,13 @@ void func_DF4260_80189058(Boss* boss) { func_DF4260_80188D50(boss); if (D_801615D0.z > 0.0f) { if (D_801615D0.x > 0.0f) { - gPlayer->unk_228 = 0x10; + gPlayer[0].unk_228 = 0x10; } else { - gPlayer->unk_228 = 0x20; + gPlayer[0].unk_228 = 0x20; } } - switch (D_801613A0) { + switch (gBossFrameCount) { case 20: func_800BA808(gMsg_ID_2240, RCID_BOSS_CORNERIA); break; @@ -621,7 +621,7 @@ void func_DF4260_80189058(Boss* boss) { func_800BA808(gMsg_ID_2225, RCID_SLIPPY); break; case 486: - D_80161734 = 1; + gShowBossHealth = 1; break; case 500: func_800BA808(gMsg_ID_2260, RCID_BOSS_CORNERIA); @@ -630,14 +630,14 @@ void func_DF4260_80189058(Boss* boss) { func_800BA808(gMsg_ID_2230, RCID_PEPPY); break; case 3840: - if (boss->unk_04E < 5) { + if (boss->actionState < 5) { func_800BA808(gMsg_ID_2230, RCID_PEPPY); } break; } - if (D_801613A0 >= 487) { - D_80177848 = boss->swork[29] * 2; + if (gBossFrameCount >= 487) { + gBossHealthBar = boss->swork[29] * 2; } for (sp218 = 0; sp218 < 24; sp218++) { @@ -654,7 +654,7 @@ void func_DF4260_80189058(Boss* boss) { boss->fwork[3] = __sinf(boss->swork[21] * 50.0f * M_DTOR) * func_DF4260_80187A88(boss->swork[21]); boss->fwork[4] = __sinf(boss->swork[22] * 50.0f * M_DTOR) * func_DF4260_80187A88(boss->swork[22]); - if (boss->unk_04E < 5) { + if (boss->actionState < 5) { sp5C = __sinf(boss->swork[23] * 12.0f * M_DTOR) * func_DF4260_80187A88(boss->swork[23]) * 0.3f; Math_SmoothStepToF(&boss->obj.rot.z, sp5C, 0.2f, 100.0f, 0.001f); } @@ -689,7 +689,7 @@ void func_DF4260_80189058(Boss* boss) { Math_SmoothStepToAngle(&D_DF4260_8019B6D8[16], sp1FC, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&D_DF4260_8019B6D8[15], sp200, 0.1f, 3.0f, 0.0f); - if (boss->unk_04E != 0) { + if (boss->actionState != 0) { Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(Math_Atan2F(D_DF4260_8019B6D8[66] - boss->obj.pos.x, D_DF4260_8019B6D8[67] - boss->obj.pos.z)), @@ -697,28 +697,28 @@ void func_DF4260_80189058(Boss* boss) { } Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0U); - switch (boss->unk_04E) { + switch (boss->actionState) { case 0: boss->unk_04C = 0; - D_DF4260_8019B6D8[17] = gPlayer->pos.x; - D_DF4260_8019B6D8[18] = gPlayer->pos.y; - D_DF4260_8019B6D8[19] = gPlayer->unk_138; + D_DF4260_8019B6D8[17] = gPlayer[0].pos.x; + D_DF4260_8019B6D8[18] = gPlayer[0].pos.y; + D_DF4260_8019B6D8[19] = gPlayer[0].unk_138; if (boss->timer_050 == 0) { switch (boss->swork[31]) { case 1: - boss->unk_04E = 1; + boss->actionState = 1; boss->timer_050 = (s32) (Rand_ZeroOne() * 50.0f) + 50; boss->fwork[14] = 0.0f; break; case 2: - boss->unk_04E = 2; + boss->actionState = 2; boss->timer_050 = (s32) (Rand_ZeroOne() * 100.0f) + 150; boss->timer_052 = 40; boss->timer_054 = 40; boss->fwork[14] = 0.07f; break; case 4: - boss->unk_04E = 4; + boss->actionState = 4; boss->timer_050 = (s32) (Rand_ZeroOne() * 70.0f) + 100; boss->fwork[14] = 0.1f; D_DF4260_8019B6D8[66] = (Rand_ZeroOne() - 0.5f) * 6000.0f; @@ -726,7 +726,7 @@ void func_DF4260_80189058(Boss* boss) { boss->fwork[14] = 0.07f; break; case 3: - boss->unk_04E = 3; + boss->actionState = 3; boss->timer_050 = (s32) (Rand_ZeroOne() * 100.0f) + 150; boss->fwork[14] = 0.07f; break; @@ -739,9 +739,9 @@ void func_DF4260_80189058(Boss* boss) { } break; case 1: - D_DF4260_8019B6D8[17] = D_DF4260_8019B6D8[66] = gPlayer->pos.x; - D_DF4260_8019B6D8[18] = gPlayer->pos.y; - D_DF4260_8019B6D8[19] = D_DF4260_8019B6D8[67] = gPlayer->unk_138; + D_DF4260_8019B6D8[17] = D_DF4260_8019B6D8[66] = gPlayer[0].pos.x; + D_DF4260_8019B6D8[18] = gPlayer[0].pos.y; + D_DF4260_8019B6D8[19] = D_DF4260_8019B6D8[67] = gPlayer[0].unk_138; boss->unk_04C += 2; if (boss->unk_04C >= Animation_GetFrameCount(&D_602BC18)) { @@ -756,9 +756,9 @@ void func_DF4260_80189058(Boss* boss) { func_DF4260_80188A18(boss); break; case 2: - D_DF4260_8019B6D8[17] = D_DF4260_8019B6D8[66] = gPlayer->pos.x; - D_DF4260_8019B6D8[18] = gPlayer->pos.y; - D_DF4260_8019B6D8[19] = D_DF4260_8019B6D8[67] = gPlayer->unk_138; + D_DF4260_8019B6D8[17] = D_DF4260_8019B6D8[66] = gPlayer[0].pos.x; + D_DF4260_8019B6D8[18] = gPlayer[0].pos.y; + D_DF4260_8019B6D8[19] = D_DF4260_8019B6D8[67] = gPlayer[0].unk_138; boss->unk_04C -= 4; if (boss->unk_04C < 0) { @@ -777,9 +777,9 @@ void func_DF4260_80189058(Boss* boss) { func_DF4260_80188A18(boss); break; case 3: - D_DF4260_8019B6D8[17] = D_DF4260_8019B6D8[66] = gPlayer->pos.x; - D_DF4260_8019B6D8[18] = gPlayer->pos.y; - D_DF4260_8019B6D8[19] = D_DF4260_8019B6D8[67] = gPlayer->unk_138; + D_DF4260_8019B6D8[17] = D_DF4260_8019B6D8[66] = gPlayer[0].pos.x; + D_DF4260_8019B6D8[18] = gPlayer[0].pos.y; + D_DF4260_8019B6D8[19] = D_DF4260_8019B6D8[67] = gPlayer[0].unk_138; boss->unk_04C += 4; if (boss->unk_04C >= 101) { @@ -798,9 +798,9 @@ void func_DF4260_80189058(Boss* boss) { func_DF4260_80188A18(boss); break; case 4: - D_DF4260_8019B6D8[17] = gPlayer->pos.x; - D_DF4260_8019B6D8[18] = gPlayer->pos.y; - D_DF4260_8019B6D8[19] = gPlayer->unk_138; + D_DF4260_8019B6D8[17] = gPlayer[0].pos.x; + D_DF4260_8019B6D8[18] = gPlayer[0].pos.y; + D_DF4260_8019B6D8[19] = gPlayer[0].unk_138; boss->unk_04C += 4; if (boss->unk_04C >= 101) { @@ -815,12 +815,12 @@ void func_DF4260_80189058(Boss* boss) { boss->unk_05E = 0; D_8017812C = 1; if (!(gFrameCount & 7)) { - D_DF4260_8019B6D8[17] = ((Rand_ZeroOne() - 0.5f) * 2000.0f) + gPlayer->pos.x; - D_DF4260_8019B6D8[18] = gPlayer->pos.y; - D_DF4260_8019B6D8[19] = ((Rand_ZeroOne() - 0.5f) * 2000.0f) + gPlayer->unk_138; + D_DF4260_8019B6D8[17] = ((Rand_ZeroOne() - 0.5f) * 2000.0f) + gPlayer[0].pos.x; + D_DF4260_8019B6D8[18] = gPlayer[0].pos.y; + D_DF4260_8019B6D8[19] = ((Rand_ZeroOne() - 0.5f) * 2000.0f) + gPlayer[0].unk_138; } boss->fwork[12] += 0.05f; - if (boss->unk_04E == 6) { + if (boss->actionState == 6) { boss->obj.rot.z += boss->fwork[12]; if (boss->obj.rot.z > 60.0f) { boss->obj.rot.z = 60.0f; @@ -895,7 +895,7 @@ void func_DF4260_80189058(Boss* boss) { func_8007D0E0(D_DF4260_8019B6D8[62], D_DF4260_8019B6D8[63] - 100.0f, D_DF4260_8019B6D8[64], 30.0f); func_80062B60(D_DF4260_8019B6D8[62], D_DF4260_8019B6D8[64], 0, 120.0f); D_80178480 = 25; - D_80161734 = 0; + gShowBossHealth = 0; for (sp218 = 0; sp218 < 100; sp218++) { func_80079618(D_DF4260_8019B6D8[62] + ((Rand_ZeroOne() - 0.5f) * 600.0f), @@ -904,30 +904,30 @@ void func_DF4260_80189058(Boss* boss) { } } if (boss->timer_050 < 50) { - boss->unk_066 = boss->timer_050 & 7; + boss->dmgPart = boss->timer_050 & 7; - switch (boss->unk_066) { + switch (boss->dmgPart) { case 1: if (boss->swork[2] != 1000) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; } break; case 2: if (boss->swork[1] != 1000) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; } case 3: if (boss->swork[3] != 1000) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; } break; case 4: if (boss->swork[7] != 1000) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; } case 5: if (boss->swork[4] != 1000) { - boss->unk_062 = 1; + boss->dmgType = DMG_BEAM; } break; } @@ -947,19 +947,20 @@ void func_DF4260_80189058(Boss* 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); - if (boss->unk_04E < 5) { - if (((fabsf(boss->obj.pos.x) > 4000.0f) || (fabsf(boss->obj.pos.z) > 4000.0f)) && (boss->unk_04E != 4)) { - boss->unk_04E = 4; + if (boss->actionState < 5) { + if (((fabsf(boss->obj.pos.x) > 4000.0f) || (fabsf(boss->obj.pos.z) > 4000.0f)) && + (boss->actionState != 4)) { + boss->actionState = 4; boss->timer_050 = 150; D_DF4260_8019B6D8[66] = 0.0f; D_DF4260_8019B6D8[67] = 0.0f; boss->swork[31] = 0; } - if ((boss->unk_04E != 0) && ((boss->unk_04C == 0) || (boss->unk_04C == 52))) { + if ((boss->actionState != 0) && ((boss->unk_04C == 0) || (boss->unk_04C == 52))) { Audio_PlaySfx(0x29022019U, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - if ((gPlayer->unk_4DC != 0) && (boss->unk_04E != 0)) { - boss->unk_04E = 0; + if ((gPlayer[0].unk_4DC != 0) && (boss->actionState != 0)) { + boss->actionState = 0; boss->swork[31] = 1; boss->timer_050 = 100; boss->fwork[14] = 0.0f; @@ -1525,10 +1526,10 @@ void func_DF4260_8018BE7C(Boss* boss) { s16 temp_s1; D_80178284 = 1; - D_801613A0 = 0; + gBossFrameCount = 0; boss->unk_05E = 1; boss->timer_050 = 354; - boss->unk_060 = 601; + boss->health = 601; boss->fwork[18] = -D_80161A54 - 10.0f; if (fabsf(gPlayer[0].unk_0AC) < 1.0f) { boss->timer_05A = 30000; @@ -1557,7 +1558,7 @@ void func_DF4260_8018BE7C(Boss* boss) { 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].unk_060 = 200; + gBosses[i].health = 200; gBosses[i].unk_05E = 1; gBosses[i].timer_05A = temp_s1; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); @@ -1566,10 +1567,10 @@ void func_DF4260_8018BE7C(Boss* boss) { } void func_DF4260_8018C0B0(Boss* boss) { - func_8007D9DC(boss->obj.pos.x, D_80177940 + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); - func_8007D9DC(boss->obj.pos.x, D_80177940 + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); - func_8007D9DC(boss->obj.pos.x, D_80177940 + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); - func_8007ADF4(boss->obj.pos.x, D_80177940, boss->obj.pos.z, 1.0f, 10.0f); + func_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); + func_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); + func_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); + func_8007ADF4(boss->obj.pos.x, gGroundLevel, boss->obj.pos.z, 1.0f, 10.0f); } static Vec3f D_DF4260_801998CC = { 442.0f, 5.0f, 360.0f }; @@ -1616,7 +1617,7 @@ void func_DF4260_8018C19C(Boss* boss) { f32* temp_a0; f32* temp_a1; - D_801613A0++; + 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); @@ -1645,7 +1646,7 @@ void func_DF4260_8018C19C(Boss* boss) { func_8007BC7C(sp84[8].x + boss->obj.pos.x, sp84[8].y + boss->obj.pos.y, sp84[8].z + boss->obj.pos.z, 10.0f); } } else { - if ((D_801613A0 >= 381) && (D_801613A0 < 430)) { + if ((gBossFrameCount >= 381) && (gBossFrameCount < 430)) { D_80178540 = 5; D_80178570 = 20; D_80178574 = 20; @@ -1656,8 +1657,8 @@ void func_DF4260_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &D_DF4260_801998D8, &sp84[1]); Matrix_MultVec3f(gCalcMatrix, &D_DF4260_801998E4, &sp84[2]); - if (boss->unk_060 != 601) { - var_v1 = boss->unk_060 - 601; + if (boss->health != 601) { + var_v1 = boss->health - 601; if (var_v1 < 0) { var_v1 *= -1; @@ -1675,13 +1676,13 @@ void func_DF4260_8018C19C(Boss* boss) { } } } - if (boss->unk_062 != 0) { - boss->unk_062 = 0; - if ((gBosses[1].unk_04E != 0) && (gBosses[2].unk_04E != 0) && (gBosses[3].unk_04E != 0)) { - if (boss->unk_060 >= 2) { + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; + if ((gBosses[1].actionState != 0) && (gBosses[2].actionState != 0) && (gBosses[3].actionState != 0)) { + if (boss->health >= 2) { boss->timer_05C = 15; - boss->unk_060 -= boss->unk_064; - if (boss->unk_060 < 120) { + boss->health -= boss->damage; + if (boss->health < 120) { boss->fwork[17] = 2.8f; Audio_PlaySfx(0x2943500F, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } else { @@ -1693,10 +1694,10 @@ void func_DF4260_8018C19C(Boss* boss) { } } boss->vel.z = boss->fwork[18]; - if (boss->unk_04E > 0) { + if (boss->actionState > 0) { boss->fwork[3] = (gPlayer[0].camEye.z - D_80177D20) - 2500.0f; } - if (boss->unk_04E != 7) { + if (boss->actionState != 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); } @@ -1704,7 +1705,7 @@ void func_DF4260_8018C19C(Boss* boss) { 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->unk_04E < 6) { + if (boss->actionState < 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); @@ -1713,14 +1714,14 @@ void func_DF4260_8018C19C(Boss* boss) { boss->fwork[15] = 0.5f; } } - if ((gBosses[1].unk_04E != 0) && !(gFrameCount & 0xF)) { + if ((gBosses[1].actionState != 0) && !(gFrameCount & 0xF)) { Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199908, &sp84[5]); func_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].unk_04E != 0) { + if (gBosses[2].actionState != 0) { gBosses[3].unk_05E = 1; - if (gBosses[3].unk_04E != 0) { + if (gBosses[3].actionState != 0) { if (!(gFrameCount & 7)) { Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199950, &sp84[11]); func_8007D0E0(gBosses[0].obj.pos.x + sp84[11].x, gBosses[0].obj.pos.y + sp84[11].y, @@ -1732,13 +1733,13 @@ void func_DF4260_8018C19C(Boss* boss) { gBosses[0].obj.pos.z + sp84[9].z, 5.0f); } } - if ((gBosses[3].unk_04E != 0) && (gBosses[2].unk_04E == 0) && !(gFrameCount & 0xF)) { + if ((gBosses[3].actionState != 0) && (gBosses[2].actionState == 0) && !(gFrameCount & 0xF)) { Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199944, &sp84[10]); func_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->unk_04E == 1) || (boss->unk_04E == 2)) && !(gFrameCount & 7)) { + if (((boss->actionState == 1) || (boss->actionState == 2)) && !(gFrameCount & 7)) { Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_DF4260_8019992C, &sp84[8]); @@ -1750,7 +1751,7 @@ void func_DF4260_8018C19C(Boss* boss) { Math_SmoothStepToF(&D_801779A8[0], 50.0f, 1.0f, 1.6f, 0.0001f); } - switch (boss->unk_04E) { + switch (boss->actionState) { case 0: boss->fwork[3] = gPlayer[0].unk_138 + 1500.0f; if (boss->timer_050 == 350) { @@ -1764,7 +1765,7 @@ void func_DF4260_8018C19C(Boss* boss) { } if (boss->timer_050 == 0) { boss->obj.pos.y = 900.0f; - boss->unk_04E = 1; + boss->actionState = 1; boss->fwork[13] = 180.0f; boss->fwork[12] = 1.5f; boss->fwork[6] = 800.0f; @@ -1776,7 +1777,7 @@ void func_DF4260_8018C19C(Boss* boss) { break; case 1: if (boss->timer_050 == 0) { - boss->unk_04E = 2; + boss->actionState = 2; boss->fwork[8] = 0.0f; boss->fwork[13] = 359.9f; boss->timer_050 = 250; @@ -1784,7 +1785,7 @@ void func_DF4260_8018C19C(Boss* boss) { break; case 2: if (boss->timer_050 == 0) { - boss->unk_04E = 3; + boss->actionState = 3; boss->swork[0] = 4; boss->timer_050 = 75; boss->timer_054 = 0; @@ -1800,7 +1801,7 @@ void func_DF4260_8018C19C(Boss* boss) { boss->fwork[10] = 0.0f; boss->fwork[13] = 0.0f; if (boss->timer_050 == 0) { - boss->unk_04E = boss->swork[0]; + boss->actionState = boss->swork[0]; boss->timer_050 = 60; boss->fwork[8] = 0.0f; Audio_PlaySfx(0x2940201A, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); @@ -1809,15 +1810,15 @@ void func_DF4260_8018C19C(Boss* boss) { case 4: boss->fwork[11] = 120.0f; boss->fwork[13] = 340.0f; - if ((boss->timer_050 == 0) || (gBosses[1].unk_04E != 0)) { - boss->unk_04E = 3; + if ((boss->timer_050 == 0) || (gBosses[1].actionState != 0)) { + boss->actionState = 3; boss->swork[0] = 5; boss->timer_050 = 20; boss->fwork[8] = 0.0f; - if (gBosses[1].unk_04E == 0) { + if (gBosses[1].actionState == 0) { Audio_PlaySfx(0x2940201A, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - if ((boss->swork[5] == 0) && ((gBosses[2].unk_04E == 0) || (gBosses[3].unk_04E == 0))) { + if ((boss->swork[5] == 0) && ((gBosses[2].actionState == 0) || (gBosses[3].actionState == 0))) { func_800BA808(gMsg_ID_2292, RCID_BOSS_CORNERIA2); } boss->swork[5]++; @@ -1831,36 +1832,37 @@ void func_DF4260_8018C19C(Boss* boss) { boss->fwork[9] = 120.0f; boss->fwork[10] = 120.0f; boss->fwork[13] = 20.0f; - if ((boss->fwork[0] > 60.0f) && (gBosses[2].unk_04E == 0) && (boss->swork[1] == 0)) { + if ((boss->fwork[0] > 60.0f) && (gBosses[2].actionState == 0) && (boss->swork[1] == 0)) { func_DF4260_8018BDD4(boss, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); Audio_PlaySfx(0x2903201B, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); func_DF4260_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].unk_04E == 0) && (boss->swork[2] == 0)) { + if ((boss->fwork[1] > 60.0f) && (gBosses[3].actionState == 0) && (boss->swork[2] == 0)) { func_DF4260_8018BDD4(boss, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); Audio_PlaySfx(0x2903201B, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); func_DF4260_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].unk_04E != 0) && (gBosses[2].unk_04E != 0))) { - boss->unk_04E = 3; + if ((boss->timer_050 == 0) || ((gBosses[3].actionState != 0) && (gBosses[2].actionState != 0))) { + boss->actionState = 3; boss->swork[0] = 4; boss->timer_050 = 70; boss->swork[1] = 0; boss->swork[2] = 0; boss->fwork[8] = 0.0f; - if ((boss->swork[4] == 0) && (gBosses[1].unk_04E == 0)) { + if ((boss->swork[4] == 0) && (gBosses[1].actionState == 0)) { func_800BA808(gMsg_ID_2291, RCID_BOSS_CORNERIA2); } if ((boss->swork[4] == 2) && (boss->swork[7] == 0) && - ((gBosses[3].unk_04E == 0) || (gBosses[2].unk_04E == 0) || (gBosses[1].unk_04E == 0))) { + ((gBosses[3].actionState == 0) || (gBosses[2].actionState == 0) || + (gBosses[1].actionState == 0))) { func_800BA808(gMsg_ID_2299, RCID_PEPPY); boss->swork[7]++; } boss->swork[4]++; boss->swork[4] &= 3; - if ((gBosses[3].unk_04E == 0) && (gBosses[2].unk_04E == 0)) { + if ((gBosses[3].actionState == 0) && (gBosses[2].actionState == 0)) { Audio_PlaySfx(0x2940201A, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } } @@ -1870,7 +1872,7 @@ void func_DF4260_8018C19C(Boss* boss) { 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->unk_04E = 7; + boss->actionState = 7; boss->obj.rot.z = 0.0f; boss->obj.rot.y = 0.0f; } @@ -1933,18 +1935,18 @@ void func_DF4260_8018C19C(Boss* boss) { } } } - if (boss->unk_060 < 2) { + if (boss->health < 2) { D_8017796C = -1; func_8001A55C(&boss->sfxPos, 0x31034025); func_800182F4(0x102800FF); func_800182F4(0x112800FF); Audio_PlaySfx(0x2940D09A, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); D_Timer_80161A60 = 8; - D_80161734 = 0; + gShowBossHealth = false; func_800BA808(gMsg_ID_2294, RCID_BOSS_CORNERIA2); - boss->unk_060 = 1; + boss->health = 1; boss->timer_056 = 150; - boss->unk_04E = 8; + boss->actionState = 8; boss->fwork[19] = 15.0f; } else { Math_SmoothStepToF(&boss->fwork[8], 3.0f, 0.1f, 0.5f, 0.001f); @@ -1986,7 +1988,7 @@ void func_DF4260_8018C19C(Boss* boss) { } } Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 1.0f, 1.0f, 0.001f); - if (boss->unk_060 != 0) { + if (boss->health != 0) { if (boss->timer_056 == 0) { func_80042EC0(boss); boss->fwork[17] = 10.0f; @@ -1995,7 +1997,7 @@ void func_DF4260_8018C19C(Boss* boss) { if ((gPlayer[0].state_1C8 == 3) || (gPlayer[0].state_1C8 == 5)) { func_8004319C(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); } - boss->unk_060--; + boss->health--; boss->fwork[8] = 0.0f; func_800BA808(gMsg_ID_2296, RCID_BOSS_CORNERIA2); } else { @@ -2012,7 +2014,7 @@ void func_DF4260_8018C19C(Boss* boss) { } } } else { - boss->unk_04E = 9; + boss->actionState = 9; } break; case 9: @@ -2027,7 +2029,7 @@ void func_DF4260_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 < (D_80177940 + 150.0f)) { + if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { D_80178480 = 100; func_80081A8C(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f, 12); boss->timer_050 = 20; @@ -2035,7 +2037,7 @@ void func_DF4260_8018C19C(Boss* boss) { boss->gravity = 0.0f; boss->fwork[17] = 20.0f; func_DF4260_8018C0B0(boss); - boss->unk_04E = 10; + boss->actionState = 10; } break; case 10: @@ -2066,25 +2068,25 @@ void func_DF4260_8018C19C(Boss* boss) { temp_a1[9] = -557.0f; } boss->fwork[16] = 4.0f; - if ((boss->swork[10] == 0) && (boss->unk_04E < 6)) { + if ((boss->swork[10] == 0) && (boss->actionState < 6)) { boss->fwork[17] = 1.8f; Audio_PlaySfx(0x11020084, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); boss->timer_058 = 71; - boss->unk_04E = 6; + boss->actionState = 6; boss->fwork[12] = 0.0f; boss->fwork[8] = 0.0f; boss->fwork[14] = 0.0f; boss->fwork[13] = 0.0f; } - if (D_801613A0 == 430) { + if (gBossFrameCount == 430) { func_800BA808(gMsg_ID_2225, RCID_SLIPPY); } - if (D_801613A0 == 586) { - D_80161734 = 1; + if (gBossFrameCount == 586) { + gShowBossHealth = true; } - if (D_801613A0 >= 587) { - D_80177848 = (boss->unk_060 / 601.0f) * 255.0f; + if (gBossFrameCount >= 587) { + gBossHealthBar = (boss->health / 601.0f) * 255.0f; } } } @@ -2097,17 +2099,17 @@ void func_DF4260_8018DDAC(Boss* boss) { Vec3f sp40; s32 i; - switch (boss->unk_04E) { + switch (boss->actionState) { case 0: - if (boss->unk_062 != 0) { - boss->unk_062 = 0; - if (boss->unk_066 == 0) { + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; + if (boss->dmgPart == 0) { if (boss->fwork[2] > 60.0f) { - if (boss->unk_060 != 0) { + if (boss->health != 0) { boss->timer_05C = 15; - boss->unk_060 -= boss->unk_064; + boss->health -= boss->damage; Audio_PlaySfx(0x29034003, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - if (boss->unk_060 <= 0) { + if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { func_800BA808(gMsg_ID_15130, RCID_FALCO); @@ -2122,7 +2124,7 @@ void func_DF4260_8018DDAC(Boss* boss) { gBosses[0].swork[10]--; } gBosses[0].timer_056 = 30; - boss->unk_04E = 1; + boss->actionState = 1; Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199A6C, &sp4C); for (i = 0; i < 10; i++) { @@ -2130,7 +2132,7 @@ void func_DF4260_8018DDAC(Boss* boss) { boss->obj.pos.z + sp4C.z, 1.0f); } - if ((gBosses[2].unk_04E == 1) && (gBosses[3].unk_04E == 1)) { + if ((gBosses[2].actionState == 1) && (gBosses[3].actionState == 1)) { gBosses[0].fwork[14] = 335.0f; } } @@ -2166,7 +2168,7 @@ void func_DF4260_8018DDAC(Boss* boss) { boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (D_80177940 + 150.0f)) { + if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2191,17 +2193,17 @@ void func_DF4260_8018E290(Boss* boss) { Vec3f sp40; s32 i; - switch (boss->unk_04E) { + switch (boss->actionState) { case 0: - if (boss->unk_062 != 0) { - boss->unk_062 = 0; - if (boss->unk_066 == 2) { + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; + if (boss->dmgPart == 2) { if (boss->fwork[0] > 60.0f) { - if (boss->unk_060 != 0) { + if (boss->health != 0) { boss->timer_05C = 15; - boss->unk_060 -= boss->unk_064; + boss->health -= boss->damage; Audio_PlaySfx(0x29034003, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - if (boss->unk_060 <= 0) { + if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { func_800BA808(gMsg_ID_15130, RCID_FALCO); @@ -2211,19 +2213,19 @@ void func_DF4260_8018E290(Boss* boss) { boss->info.unk_10 = 300.0f; gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; - boss->unk_060 = 0; + boss->health = 0; Audio_PlaySfx(0x2940C027, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } gBosses[0].timer_056 = 30; - boss->unk_04E = 1; + boss->actionState = 1; Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199A84, &sp4C); for (i = 0; i < 10; i++) { func_80079618(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, 1.0f); } - if (gBosses[1].unk_04E == 1) { + if (gBosses[1].actionState == 1) { gBosses[0].fwork[14] = 25.0f; } } @@ -2259,7 +2261,7 @@ void func_DF4260_8018E290(Boss* boss) { boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (D_80177940 + 150.0f)) { + if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2284,17 +2286,17 @@ void func_DF4260_8018E76C(Boss* boss) { Vec3f sp40; s32 i; - switch (boss->unk_04E) { + switch (boss->actionState) { case 0: - if (boss->unk_062 != 0) { - boss->unk_062 = 0; - if (boss->unk_066 == 2) { + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; + if (boss->dmgPart == 2) { if (boss->fwork[1] > 60.0f) { - if (boss->unk_060 != 0) { + if (boss->health != 0) { boss->timer_05C = 15; - boss->unk_060 -= boss->unk_064; + boss->health -= boss->damage; Audio_PlaySfx(0x29034003, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - if (boss->unk_060 <= 0) { + if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { func_800BA808(gMsg_ID_15130, RCID_FALCO); @@ -2304,13 +2306,13 @@ void func_DF4260_8018E76C(Boss* boss) { boss->info.unk_10 = 300.0f; gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; - boss->unk_060 = 0; + boss->health = 0; Audio_PlaySfx(0x2940C027, &boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } gBosses[0].timer_056 = 30; - boss->unk_04E = 1; + boss->actionState = 1; gBosses[0].fwork[6] = 500.0f; Matrix_MultVec3f(gCalcMatrix, &D_DF4260_80199A9C, &sp4C); @@ -2319,7 +2321,7 @@ void func_DF4260_8018E76C(Boss* boss) { boss->obj.pos.z + sp4C.z, 1.0f); } - if (gBosses[1].unk_04E == 1) { + if (gBosses[1].actionState == 1) { gBosses[0].fwork[14] = 25.0f; } } @@ -2352,7 +2354,7 @@ void func_DF4260_8018E76C(Boss* boss) { func_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 < (D_80177940 + 150.0f)) { + if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2369,7 +2371,7 @@ void func_DF4260_8018E76C(Boss* boss) { } s32 func_DF4260_8018EC54(s32 arg0, Gfx** arg1, Vec3f* arg2, Vec3f* arg3, void* arg4) { - if ((arg0 == 10) && (gBosses[2].unk_04E != 0) && (gBosses[3].unk_04E != 0)) { + if ((arg0 == 10) && (gBosses[2].actionState != 0) && (gBosses[3].actionState != 0)) { *arg1 = NULL; } if ((arg0 != 12) && (arg0 != 10)) { @@ -2711,7 +2713,7 @@ void func_DF4260_8018F880(Player* player) { actor1->iwork[14] = 3; actor2->iwork[14] = 4; player->camEye.x = D_80177978 = player->pos.x - 400.0f; - gPlayer->camEye.y = D_80177980 = player->pos.y + 600.0f; + gPlayer[0].camEye.y = D_80177980 = player->pos.y + 600.0f; player->camEye.z = D_80177988 = player->unk_138 + 2000.0f; player->camAt.x = D_801779A0 = player->pos.x; player->camAt.y = D_801779B8 = player->pos.y; diff --git a/src/overlays/ovl_E16C50/E16C50.c b/src/overlays/ovl_E16C50/E16C50.c deleted file mode 100644 index ae81998a..00000000 --- a/src/overlays/ovl_E16C50/E16C50.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "global.h" - -static s32 D_E16C50_801BECA0 = 0; -static s32 D_E16C50_801C2240; - -void func_E16C50_80187520(s32 arg0, void* arg1) { -} diff --git a/src/overlays/ovl_E16C50/sf_aq.c b/src/overlays/ovl_E16C50/sf_aq.c deleted file mode 100644 index bdc26e39..00000000 --- a/src/overlays/ovl_E16C50/sf_aq.c +++ /dev/null @@ -1,502 +0,0 @@ -#include "global.h" - -void func_E16C50_801AC918(Effect*); -void func_E16C50_801AD6C0(Actor*); -void func_E16C50_801AE168(Actor*); -void func_E16C50_801AE3D8(Actor*); -void func_E16C50_801AEB44(Actor*); -void func_E16C50_801AFA5C(Actor*); -void func_E16C50_801B099C(Actor*); -void func_E16C50_801B0B60(Actor*); -void func_E16C50_801B0EC0(Actor*); -void func_E16C50_801B504C(Actor*); -void func_E16C50_801B50E8(Actor*); -void func_E16C50_801B619C(Actor*); -void func_E16C50_801B638C(Actor*); -void func_E16C50_801B6FF8(Actor*); -void func_E16C50_801B7A24(Actor*); -void func_E16C50_801B7C78(Actor*); -void func_E16C50_801B90DC(Actor*); -void func_E16C50_801B91A4(Actor*); -void func_E16C50_801BA108(Actor*); -void func_E16C50_801BA26C(Actor*); -void func_E16C50_801BA4E4(Actor*); -void func_E16C50_801BA6A4(Actor*); -void func_E16C50_801BAD7C(Actor*); -void func_E16C50_801BADF8(Actor*); -void func_E16C50_801BB204(Actor*); -void func_E16C50_801BB79C(Actor*); -void func_E16C50_801BC930(Actor*); -void func_E16C50_801BC9A0(Actor*); -void func_E16C50_801BD264(Actor*); -void func_E16C50_801BD54C(Actor*); -void func_E16C50_801BDE6C(Actor*); -void func_E16C50_801BE1FC(Object_80*); -void func_E16C50_801BE3F8(Actor*); -void func_E16C50_801BEB1C(Actor*); -void func_E16C50_801BEC68(Actor*); -void func_E16C50_801BEC74(Actor*); - -f32 D_E16C50_801BFB60 = 0.0f; -s32 D_E16C50_801BFB64[11] = { - 0, 0x1E, 0x1B, 0x18, 0x15, 0x12, 0xF, 0xC, 9, 6, 3, -}; -u8 D_E16C50_801BFB90[12] = { - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -}; -u32 D_E16C50_801BFB9C[3] = { 0x06015FF0, 0x06022110, 0x06015DD0 }; -f32 D_E16C50_801BFBA8[2] = { 40.0f, -40.0f }; -f32 D_E16C50_801BFBB0[3] = { 20.0f, 10.0f, 15.0f }; -f32 D_E16C50_801BFBBC[3] = { 8.0f, 27.0f, 42.0f }; -f32 D_E16C50_801BFBC8[3] = { 15.0f, 6.0f, 7.0f }; -f32 D_E16C50_801BFBD4[3] = { 358.0f, 12.0f, 352.0f }; -f32 D_E16C50_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_E16C50_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_E16C50_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 }, -}; -s32 D_E16C50_801BFC70[3] = { 0x12, 0x16, 0x2D }; -f32 D_E16C50_801BFC7C[3] = { 20.0f, 10.0f, 0.0f }; -f32 D_E16C50_801BFC88[3] = { 10.0f, 320.0f, 30.0f }; -Vec3f D_E16C50_801BFC94[6][4] = { - { { 1.0f, 1.0f, 1.0f }, { 0.9f, 0.9f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 0.9f, 0.9f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 0.9f, 0.9f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 0.9f, 1.0f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 0.9f, 1.0f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 1.0f, 0.8f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, -}; -s32 D_E16C50_801BFDB4[6][4] = { - { 1, 5, 0xF, 0x186A0 }, { 1, 5, 0xF, 0x186A0 }, { 1, 5, 0xF, 0x186A0 }, - { 1, 0xA, 0x14, 0x186A0 }, { 1, 0xA, 0x14, 0x186A0 }, { 1, 0xA, 0x14, 0x186A0 }, -}; -s32 D_E16C50_801BFE14 = 0; -Vec3f D_E16C50_801BFE18[6][4] = { - { { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f } }, - { { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f } }, - { { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f } }, - { { 0.2f, 0.2f, 0.2f }, { 0.3f, 0.3f, 0.3f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f } }, - { { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f } }, - { { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f } }, -}; -Vec3f D_E16C50_801BFF38[6][4] = { - { { 1.0f, 1.0f, 1.0f }, { 5.0f, 5.0f, 5.0f }, { 10.0f, 10.0f, 10.0f }, { 5.0f, 5.0f, 5.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 5.0f, 5.0f, 5.0f }, { 10.0f, 10.0f, 10.0f }, { 5.0f, 5.0f, 5.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 3.0f, 3.0f, 3.0f }, { 2.0f, 2.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 3.0f, 1.0f, 3.0f }, { 2.0f, 1.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 3.0f, 1.0f, 3.0f }, { 2.0f, 1.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, - { { 1.0f, 1.0f, 1.0f }, { 1.0f, 4.0f, 3.0f }, { 1.0f, 3.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, -}; -f32 D_E16C50_801C0058 = 191.0f; -f32 D_E16C50_801C005C = 63.0f; -f32 D_E16C50_801C0060[14] = { - 50.0f, 8.0f, 50.0f, 8.0f, 10.0f, 1.0f, 20.0f, 2.0f, 20.0f, 2.0f, 20.0f, 2.0f, 50.0f, 2.0f, -}; -Vec3f D_E16C50_801C0098[2] = { - { 370.0f, -53.0f, 1085.0f }, - { -370.0f, -53.0f, 1085.0f }, -}; -f32 D_E16C50_801C00B0[3][4] = { - { 1.0f, 1.2f, 0.8f, 1.0f }, - { 1.0f, 1.2f, 0.9f, 1.0f }, - { 1.0f, 0.7f, 1.4f, 1.0f }, -}; -s32 D_E16C50_801C00E0[4] = { 1, 5, 8, 0x28 }; -f32 D_E16C50_801C00F0[3][4] = { - { 0.3f, 0.3f, 0.3f, 0.3f }, - { 0.3f, 0.3f, 0.3f, 0.3f }, - { 0.5f, 0.5f, 0.5f, 0.5f }, -}; -f32 D_E16C50_801C0120[3][4] = { - { 1.0f, 1.0f, 1.0f, 1.0f }, - { 1.0f, 1.0f, 1.0f, 1.0f }, - { 2.0f, 2.0f, 2.0f, 2.0f }, -}; -f32 D_E16C50_801C0150[4][4] = { - { 0.0f, 0.0f, 0.0f, 0.0f }, - { 0.0f, -25.5f, 0.0f, 0.0f }, - { -25.5f, 25.5f, -25.5f, 0.0f }, - { 25.5f, 0.0f, 25.5f, 0.0f }, -}; -f32 D_E16C50_801C0190[5] = { - 0.0f, -30.0f, 30.0f, -30.0f, 30.0f, -}; -Vec3f D_E16C50_801C01A4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C01B0 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C01BC = { 340.0f, 600.0f, 1480.0f }; -Vec3f D_E16C50_801C01C8 = { -640.0f, 380.0f, 1520.0f }; -Vec3f D_E16C50_801C01D4 = { 760.0f, 340.0f, 1560.0f }; -Vec3f D_E16C50_801C01E0 = { 130.0f, 350.0f, 130.0f }; -Vec3f D_E16C50_801C01EC = { -130.0f, 350.0f, 130.0f }; -f32 D_E16C50_801C01F8[11] = { - 400.0f, 430.0f, 460.0f, 490.0f, 520.0f, 550.0f, 580.0f, 610.0f, 640.0f, 670.0f, 700.0f, -}; -f32 D_E16C50_801C0224[11] = { - 6.0f, 6.0f, 8.0f, 8.0f, 8.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, -}; -Vec3f D_E16C50_801C0250 = { 0.0f, 0.0f, 0.0f }; -f32 D_E16C50_801C025C[2] = { 120.0f, 0.0f }; -s32 D_E16C50_801C0264[19] = { - 0, 0, 3, 4, 0, 5, 6, 7, 1, 2, 0, 0, 0, 0, 0, 0, 8, 9, 0, -}; -Vec3f D_E16C50_801C02B0 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C02BC = { 0.0f, 0.0f, 0.0f }; -f32 D_E16C50_801C02C8[2] = { 255.0f, 68.0f }; -s32 D_E16C50_801C02D0[2] = { 0x46, 0x64 }; -Vec3f D_E16C50_801C02D8 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C02E4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C02F0 = { 108.0f, 0.0f, 24.0f }; -Vec3f D_E16C50_801C02FC = { 102.0f, 14.0f, -21.0f }; -Vec3f D_E16C50_801C0308 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C0314 = { 0.0f, 0.0f, 50.0f }; -Vec3f D_E16C50_801C0320 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C032C = { -27.0f, 7.0f, 5.0f }; -Vec3f D_E16C50_801C0338 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801C0344[4] = { - { -6.4f, -4.6f, -7.8f }, - { 6.4f, 4.6f, 7.8f }, - { -5.9f, -7.8f, -7.0f }, - { 5.9f, 7.8f, 7.0f }, -}; -Vec3f D_E16C50_801C0374[17] = { - { 1.0f, 1.0f, 1.0f }, { 1.3f, 0.8f, 1.3f }, { 1.0f, 1.2f, 1.0f }, { 1.3f, 0.8f, 1.3f }, - { 1.0f, 1.0f, 1.0f }, { 1.3f, 1.0f, 1.3f }, { 1.0f, 1.0f, 1.0f }, { 1.3f, 1.0f, 1.3f }, - { 1.0f, 1.0f, 1.0f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, - { 1.0f, 1.05f, 1.0f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, - { 0.85f, 0.95f, 0.85f }, -}; -s32 D_E16C50_801C0440[24] = { - 0, 0x1E, 0x3C, 0x5A, 0, 0, 0, 0, 0, 0xF, 0x1E, 0x2D, 0, 0, 0, 0, 0, 0xF, 0x1E, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, -}; -s32 D_E16C50_801C04A0[6] = { - 0xF, -0xF, 0xA, -0xA, 7, -7, -}; -Vec3f D_E16C50_801C04B8 = { 0.0f, 0.0f, 0.0f }; -s32 D_E16C50_801C04C4[9] = { - 1, 5, 9, 0xE, 0xF, 0x10, 0x11, 0, 0xD, -}; -Vec3f D_E16C50_801C04E8 = { 0.0f, 0.0f, 0.0f }; -f32 D_E16C50_801C04F4[4] = { - 700.0f, - 300.0f, - 600.0f, - 400.0f, -}; -Vec3f D_E16C50_801C0504[50] = { - { 416.0f, 440.0f, -4182.0f }, { 437.0f, 440.0f, -4178.0f }, { 510.0f, 420.0f, -4156.0f }, - { 168.0f, 361.0f, -4168.0f }, { 434.0f, 440.0f, -4162.0f }, { 465.0f, 465.0f, -4146.0f }, - { 464.0f, 493.0f, -4124.0f }, { 426.0f, 395.0f, -4136.0f }, { 457.0f, 440.0f, -4112.0f }, - { 480.0f, 487.0f, -4110.0f }, { 454.0f, 440.0f, -4256.0f }, { 179.0f, 507.0f, -4272.0f }, - { 442.0f, 392.0f, -4242.0f }, { 450.0f, 481.0f, -4248.0f }, { 474.0f, 420.0f, -4232.0f }, - { 376.0f, 440.0f, -4196.0f }, { 463.0f, 507.0f, -4190.0f }, { 467.0f, 424.0f, -4208.0f }, - { 394.0f, 404.0f, -4186.0f }, { 256.0f, 440.0f, -3680.0f }, { 243.0f, 515.0f, -3648.0f }, - { 277.0f, 390.0f, -3662.0f }, { 234.0f, 457.0f, -3664.0f }, { 561.0f, 440.0f, -4332.0f }, - { 550.0f, 514.0f, -4346.0f }, { 568.0f, 404.0f, -4304.0f }, { 580.0f, 545.0f, -4350.0f }, - { 552.0f, 382.0f, -4292.0f }, { 528.0f, 462.0f, -4322.0f }, { 558.0f, 440.0f, -4294.0f }, - { 396.0f, 440.0f, -4284.0f }, { 391.0f, 363.0f, -4254.0f }, { 379.0f, 501.0f, -4254.0f }, - { 428.0f, 440.0f, -4246.0f }, { 374.0f, 440.0f, -4282.0f }, { 373.0f, 342.0f, -4290.0f }, - { 353.0f, 570.0f, -4266.0f }, { 359.0f, 440.0f, -4232.0f }, { 399.0f, 216.0f, -4246.0f }, - { 406.0f, 251.0f, -4222.0f }, { 380.0f, 189.0f, -4248.0f }, { 370.0f, 278.0f, -4214.0f }, - { 383.0f, 237.0f, -4266.0f }, { 360.0f, 299.0f, -4320.0f }, { 359.0f, 266.0f, -4280.0f }, - { 354.0f, 211.0f, -4256.0f }, { 391.0f, 238.0f, -4192.0f }, { 340.0f, 294.0f, -4216.0f }, - { 423.0f, 242.0f, -4200.0f }, { 429.0f, 311.0f, -4138.0f }, -}; -f32 D_E16C50_801C075C[51] = { - 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, - 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 320.0f, 320.0f, 320.0f, 320.0f, 40.0f, 40.0f, 40.0f, - 40.0f, 40.0f, 40.0f, 40.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, - 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 10.0f, 28.0f, 28.0f, -}; -f32 D_E16C50_801C0828[51] = { - 210.0f, 250.0f, 170.0f, 200.0f, 225.0f, 240.0f, 220.0f, 180.0f, 210.0f, 230.0f, 355.0f, 349.0f, 357.0f, - 12.0f, 357.0f, 65.0f, 256.0f, 250.0f, 88.0f, 0.0f, 0.0f, 0.0f, 9.0f, 14.0f, 35.0f, 40.0f, - 5.0f, 92.0f, 56.0f, 71.0f, 355.0f, 326.0f, 30.0f, 5.0f, 30.0f, 30.0f, 60.0f, 69.0f, 1.0f, - 346.0f, 30.0f, 97.0f, 30.0f, 30.0f, 30.0f, 30.0f, 162.0f, 98.0f, 10.0f, 213.0f, 30.0f, -}; -Vec3f D_E16C50_801C08F4 = { 0.0f, 0.0f, 0.0f }; - -typedef struct { - char unk_00[0x148]; -} UnkStruct_1C4308; - -PosRot* D_E16C50_801C27C0; -PosRot D_E16C50_801C27C8[4][50]; -Vtx D_E16C50_801C3A88[2][2][28]; -f32 D_E16C50_801C4188; -s32 D_E16C50_801C4190[10]; -f32 D_E16C50_801C41B8[30]; -s32 D_E16C50_801C4230[28]; -s32 D_E16C50_801C42A0[25]; -UnkStruct_1C4308 D_E16C50_801C4308; -s32 D_E16C50_801C4450; -s32 D_E16C50_801C4454; -f32 D_E16C50_801C4458; -f32 D_E16C50_801C445C; - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A8E30.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A92EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9374.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9448.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A94EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A958C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A95C8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A96DC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9728.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9824.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A99D4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9C98.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9DE4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801A9ED0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AA20C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AA4BC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AA8E8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AACF8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AB9B0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801ABA40.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AC09C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AC18C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AC274.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AC7C8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AC8A8.s") - -// OBJ_EFFECT_366 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AC918.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801ACBB4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801ACE50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AD328.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AD598.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AD688.s") - -// OBJ_ACTOR_255 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AD6C0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801ADF7C.s") - -// OBJ_ACTOR_255 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AE168.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AE3AC.s") - -// OBJ_ACTOR_256 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AE3D8.s") - -// OBJ_ACTOR_256 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AEB44.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AF9FC.s") - -// OBJ_ACTOR_257 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801AFA5C.s") - -// OBJ_ACTOR_257 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B099C.s") - -// OBJ_ACTOR_258 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B0B60.s") - -// OBJ_ACTOR_258 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B0EC0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B0F88.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B0FCC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B1008.s") - -// OBJ_BOSS_AQ init -void func_E16C50_801B10F8(Boss* bossAQ); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B10F8.s") - -// OBJ_BOSS_AQ action -void func_E16C50_801B134C(Boss* bossAQ); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B134C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B42AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B49DC.s") - -// OBJ_BOSS_AQ draw -void func_E16C50_801B4D84(Boss* bossAQ); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B4D84.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B4DDC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B4E94.s") - -// OBJ_ACTOR_261 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B504C.s") - -// OBJ_ACTOR_261 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B50E8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B5C18.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B5F68.s") - -// OBJ_ACTOR_259 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B619C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B6344.s") - -// OBJ_ACTOR_259 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B638C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B6E54.s") - -// OBJ_ACTOR_262 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B6FF8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B76EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B7754.s") - -// OBJ_ACTOR_262 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B7A24.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B7AF0.s") - -// OBJ_ACTOR_260 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B7C78.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B8C50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B8D7C.s") - -// OBJ_ACTOR_260 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B90DC.s") - -// OBJ_ACTOR_263 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B91A4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801B9DB0.s") - -// OBJ_ACTOR_263 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BA108.s") - -// OBJ_ACTOR_264 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BA26C.s") - -// OBJ_ACTOR_264 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BA4E4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BA57C.s") - -// OBJ_ACTOR_265 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BA6A4.s") - -// OBJ_ACTOR_265 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BAD7C.s") - -// OBJ_ACTOR_266 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BADF8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BB0C4.s") - -// OBJ_ACTOR_266 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BB204.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BB26C.s") - -// OBJ_ACTOR_267 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BB79C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BC530.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BC91C.s") - -// OBJ_ACTOR_267 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BC930.s") - -// OBJ_ACTOR_269 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BC9A0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BD17C.s") - -// OBJ_ACTOR_269 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BD264.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BD3B0.s") - -// OBJ_ACTOR_268 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BD54C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BDDFC.s") - -// OBJ_ACTOR_268 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BDE6C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BDF14.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BE034.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BE0F0.s") - -// OBJ_80_126 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BE1FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BE274.s") - -// OBJ_ACTOR_270 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BE3F8.s") - -// OBJ_ACTOR_270 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BEB1C.s") - -// OBJ_BOSS_301 action -void func_E16C50_801BEC50(Boss* boss301) { -} - -// OBJ_BOSS_301 draw -void func_E16C50_801BEC5C(Boss* boss301) { -} - -// OBJ_ACTOR_188 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BEC68.s") - -// OBJ_ACTOR_188 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BEC74.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BEC80.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/func_E16C50_801BEC8C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_aq/D_E16C50_801C1A30.s") diff --git a/src/overlays/ovl_E16C50/sf_so.c b/src/overlays/ovl_E16C50/sf_so.c deleted file mode 100644 index 5d221287..00000000 --- a/src/overlays/ovl_E16C50/sf_so.c +++ /dev/null @@ -1,203 +0,0 @@ -#include "global.h" - -typedef void (*BossSOfunc)(Boss*); - -void func_E16C50_8019EA7C(Actor*); -void func_E16C50_8019F20C(Actor*); -void func_E16C50_8019F7AC(Actor*); -void func_E16C50_801A003C(Actor*); -void func_E16C50_801A0120(Effect*); -void func_E16C50_801A0AF0(Effect*); - -void func_E16C50_801A1F80(Boss* bossSO); -void func_E16C50_801A23F4(Boss* bossSO); -void func_E16C50_801A2C98(Boss* bossSO); -void func_E16C50_801A3128(Boss* bossSO); -void func_E16C50_801A3510(Boss* bossSO); -void func_E16C50_801A4214(Boss* bossSO); -void func_E16C50_801A4A34(Boss* bossSO); -void func_E16C50_801A4EF8(Boss* bossSO); -void func_E16C50_801A56B8(Boss* bossSO); - -f32 D_E16C50_801BF8E0[4] = { 10.0f, 6.0f, -6.0f, -10.0f }; -Vec3f D_E16C50_801BF8F0[4] = { - { 10.0f, 7.0f, 0.0f }, - { -10.0f, 7.0f, 0.0f }, - { 7.0f, 10.0f, 0.0f }, - { -7.0f, 10.0f, 0.0f }, -}; -Vec3f D_E16C50_801BF920 = { 0.0f, 0.0f, 0.0f }; -u32 D_E16C50_801BF92C[6] = { - 0x0200B630, 0x0200A5A0, 0x02009510, 0x060084C0, 0x06008D40, 0x06007C40, -}; -u32 D_E16C50_801BF944[6] = { - 0x0601B790, 0x0601B790, 0x0601A700, 0x06019670, 0x060185E0, 0x06017550, -}; -Vec3f D_E16C50_801BF95C[3] = { - { 0.0f, 30.0f, 480.0f }, - { -180.0f, 0.0f, 240.0f }, - { 180.0f, 0.0f, 240.0f }, -}; -BossSOfunc D_E16C50_801BF980[9] = { - func_E16C50_801A1F80, func_E16C50_801A23F4, func_E16C50_801A2C98, func_E16C50_801A3128, func_E16C50_801A3510, - func_E16C50_801A4214, func_E16C50_801A4A34, func_E16C50_801A4EF8, func_E16C50_801A56B8, -}; -Vec3f D_E16C50_801BF9A4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF9B0 = { 10.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF9BC = { -10.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF9C8 = { 90.0f, 0.0f, -10.0f }; -Vec3f D_E16C50_801BF9D4 = { 135.0f, 0.0f, -40.0f }; -Vec3f D_E16C50_801BF9E0 = { 106.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF9EC = { 75.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF9F8 = { 85.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BFA04 = { 10.0f, 2.0f, 0.0f }; -Vec3f D_E16C50_801BFA10 = { 10.0f, -2.0f, 0.0f }; -Vec3f D_E16C50_801BFA1C = { 0.0f, 0.05f, 0.0f }; -Vec3f D_E16C50_801BFA28 = { 0.0f, -0.05f, 0.0f }; -Vec3f D_E16C50_801BFA34 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BFA40[9] = { - { 150.0f, 300.0f, 100.0f }, { -100.0f, 200.0f, 100.0f }, { 50.0f, 100.0f, 100.0f }, - { 0.0f, 0.0f, -500.0f }, { 790.0f, 630.0f, -600.0f }, { 280.0f, 140.0f, 500.0f }, - { -210.0f, 110.0f, 500.0f }, { -460.0f, 260.0f, 500.0f }, { 380.0f, 290.0f, 500.0f }, -}; -Vec3f D_E16C50_801BFAAC[3] = { - { -1.0f, -0.3f, -2.0f }, - { 121.0f, 209.0f, 183.0f }, - { 181.0f, 167.0f, 182.0f }, -}; -Vec3f D_E16C50_801BFAD0[3] = { - { -89.0f, -90.0f, -88.0f }, - { -36.0f, -73.0f, -95.0f }, - { -91.0f, -83.0f, -91.0f }, -}; -Vec3f D_E16C50_801BFAF4[5] = { - { 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 }, -}; -Vec3f D_E16C50_801BFB30[4] = { - { 0.0f, 50.0f, 500.0f }, - { -500.0f, 0.0f, 250.0f }, - { 500.0f, 0.0f, 250.0f }, - { 0.0f, 0.0f, 0.0f }, -}; - -s32 D_E16C50_801C2740[10]; -f32 D_E16C50_801C2768[14]; -s32 D_E16C50_801C27A0[8]; // unused? part of previous? - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019E7F0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019E8B8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019E920.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019E9F4.s") - -// OBJ_ACTOR_278 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019EA7C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019EF30.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019F038.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019F0B0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019F194.s") - -// OBJ_ACTOR_275, 276, 277 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019F20C.s") - -// OBJ_ACTOR_275, 276, 277 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019F7AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019F99C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019FAA4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019FDE0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019FEE8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019FF44.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_8019FFC0.s") - -// OBJ_ACTOR_279 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A003C.s") - -// OBJ_EFFECT_392 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A0120.s") - -// OBJ_EFFECT_392 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A0AF0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A0CEC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A0D90.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A0DF8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A0FD4.s") - -void func_E16C50_801A10F4(Player* player); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A10F4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A1CD8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A1E14.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A1EB0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A1F80.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A239C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A23F4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A2C3C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A2C98.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A30CC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A3128.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A3468.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A3510.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A3C4C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A4214.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A48B8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A4A34.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A4EC0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A4EF8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A56B8.s") - -// OBJ_BOSS_SO action -void func_E16C50_801A5B3C(Boss* bossSO); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A5B3C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A68A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A6BDC.s") - -// OBJ_BOSS_SO draw -void func_E16C50_801A71B8(Boss* bossSO); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A71B8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A7750.s") - -void func_E16C50_801A7930(Player* player); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A7930.s") - -void func_E16C50_801A8BE8(Player* player); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A8BE8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_so/func_E16C50_801A8DB8.s") diff --git a/src/overlays/ovl_E16C50/sf_zo.c b/src/overlays/ovl_E16C50/sf_zo.c deleted file mode 100644 index 8fd7e53a..00000000 --- a/src/overlays/ovl_E16C50/sf_zo.c +++ /dev/null @@ -1,372 +0,0 @@ -#include "global.h" - -void func_E16C50_801904CC(Actor*); -void func_E16C50_80190A00(Actor*); -void func_E16C50_80191010(Actor*); -void func_E16C50_801914C4(Actor*); -void func_E16C50_80191680(Actor*); -void func_E16C50_80191B4C(Actor*); -void func_E16C50_80191BC4(Actor*); -void func_E16C50_80191DB0(Actor*); -void func_E16C50_80191FFC(Actor*); -void func_E16C50_80192094(Actor*); -void func_E16C50_80192834(Actor*); -void func_E16C50_80192C18(Actor*); -void func_E16C50_80192E64(Actor*); -void func_E16C50_80193240(Actor*); -void func_E16C50_8019969C(Actor*); -void func_E16C50_8019983C(Actor*); -void func_E16C50_80199A28(Actor*); -void func_E16C50_80199E24(Actor*); -void func_E16C50_80199F10(Actor*); -void func_E16C50_8019A1FC(Actor*); -void func_E16C50_8019A5D4(Actor*); -void func_E16C50_8019ACCC(Actor*); -void func_E16C50_8019B548(Actor*); -void func_E16C50_8019B7DC(Actor*); -void func_E16C50_8019B854(Actor*); -void func_E16C50_8019BDE0(Actor*); -void func_E16C50_8019BE48(Actor*); -void func_E16C50_8019C1CC(Actor*); -void func_E16C50_8019C454(Actor*); -void func_E16C50_8019C83C(Actor*); -void func_E16C50_8019CBEC(Actor*); -void func_E16C50_8019CE58(Actor*); -void func_E16C50_8019D15C(Actor*); -void func_E16C50_8019D3C4(Actor*); - -Vec3f D_E16C50_801BF560 = { 0.0f, 0.0f, 0.0f }; -s16 D_E16C50_801BF56C[20] = { - 0, 190, 180, 170, 160, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, -}; -u8 D_E16C50_801BF594[20] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, -}; -Gfx* D_E16C50_801BF5A8[3] = { (Gfx*) 0x060012A0, (Gfx*) 0x060239E0, (Gfx*) 0x06023730 }; -Vec3f D_E16C50_801BF5B4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF5C0 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF5CC = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF5D8 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF5E4 = { 0.0f, 0.0f, 0.0f }; -s32 D_E16C50_801BF5F0[6] = { - 20, 40, 20, 20, 10, 10, -}; -f32 D_E16C50_801BF608[6] = { - -45.0f, 0.0f, -45.0f, 0.0f, -45.0f, 0.0f, -}; -Vec3f D_E16C50_801BF620 = { 0.0f, 0.0f, 40.0f }; -Vec3f D_E16C50_801BF62C = { 96.0f, 199.0f, -9.0f }; -Vec3f D_E16C50_801BF638 = { 50.0f, 150.0f, -20.0f }; -Vec3f D_E16C50_801BF644 = { 50.0f, 150.0f, 20.0f }; -Vec3f D_E16C50_801BF650 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF65C = { 210.0f, -50.0f, 0.0f }; -Vec3f D_E16C50_801BF668 = { 50.0f, 70.0f, 0.0f }; -Vec3f D_E16C50_801BF674 = { 166.0f, -174.0f, -25.0f }; -Vec3f D_E16C50_801BF680 = { 166.0f, -174.0f, 25.0f }; -Vec3f D_E16C50_801BF68C = { 50.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF698 = { 150.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF6A4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF6B0 = { 0.0f, 0.0f, 0.0f }; -f32 D_E16C50_801BF6BC[2] = { -600.0f, -3400.0f }; -f32 D_E16C50_801BF6C4[2] = { 330.0f, 30.0f }; -f32 D_E16C50_801BF6CC[2] = { 250.0f, -250.0f }; -f32 D_E16C50_801BF6D4[2] = { 330.0f, 30.0f }; -Vec3f D_E16C50_801BF6DC = { 615.0f, 532.0f, -80.0f }; -Vec3f D_E16C50_801BF6E8 = { -615.0f, 532.0f, -80.0f }; -Vec3f D_E16C50_801BF6F4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF700 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF70C = { 0.0f, 0.0f, 40.0f }; -Vec3f D_E16C50_801BF718 = { 0.0f, 0.0f, 50.0f }; -Vec3f D_E16C50_801BF724 = { 0.0f, 0.0f, 20.0f }; -Vec3f D_E16C50_801BF730 = { 0.0f, 0.0f, 100.0f }; -f32 D_E16C50_801BF73C[2] = { -80.0f, 80.0f }; -Vec3f D_E16C50_801BF744[3] = { - { 0.0f, 50.0f, -200.0f }, - { 0.0f, 50.0f, 200.0f }, - { 0.0f, 50.0f, 600.0f }, -}; -Vec3f D_E16C50_801BF768[3] = { - { 0.0f, 300.0f, 0.0f }, - { 0.0f, 300.0f, -200.0f }, - { 0.0f, 300.0f, 300.0f }, -}; -s32 D_E16C50_801BF78C[30] = { - 0, 7, 7, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 327, 324, 0, 322, 327, 0, 324, 324, 0, 336, 0, -}; -f32 D_E16C50_801BF804[8] = { 0.0f, 0.0f, 270.0f, 90.0f, 0.0f, 180.0f, 400.0f, 400.0f }; -s32 D_E16C50_801BF824[10] = { 1, 5, 9, 14, 15, 16, 17, 0, 13, 1000 }; -Vec3f D_E16C50_801BF84C[6] = { - { 5.0f, -10.0f, 0.0f }, { 10.0f, 0.0f, 0.0f }, { 5.0f, 10.0f, 0.0f }, - { -5.0f, -10.0f, 0.0f }, { -10.0f, 0.0f, 0.0f }, { -5.0f, 10.0f, 0.0f }, -}; -Vec3f D_E16C50_801BF894 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF8A0 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_E16C50_801BF8AC = { 230.0f, -50.0f, 0.0f }; -Vec3f D_E16C50_801BF8B8 = { 230.0f, -250.0f, 0.0f }; -f32 D_E16C50_801BF8C4[2] = { 46.0f, 314.0f }; -f32 D_E16C50_801BF8CC[2] = { 23.0f, 337.0f }; - -typedef struct { - /* 0x000 */ char pad0[4]; - /* 0x004 */ f32 unk_4; - /* 0x008 */ char pad8[0x24]; - /* 0x02C */ f32 unk_2C; - /* 0x030 */ char pad30[0x2C]; - /* 0x05C */ f32 unk_5C; - /* 0x060 */ char pad60[4]; - /* 0x064 */ f32 unk_64; - /* 0x068 */ f32 unk_68; - /* 0x06C */ char pad6C[4]; - /* 0x070 */ f32 unk_70; - /* 0x074 */ Vec3f unk_74; - /* 0x080 */ Vec3f unk_80; - /* 0x08C */ char pad8C[8]; - /* 0x094 */ Vec3f unk_94; - /* 0x0A0 */ Vec3f unk_A0; - /* 0x0AC */ Vec3f unk_AC; - /* 0x0B8 */ Vec3f unk_B8; - /* 0x0C4 */ Vec3f unk_C4; - /* 0x0D0 */ Vec3f unk_D0; - /* 0x0DC */ Vec3f unk_DC; - /* 0x0E8 */ char padE8[8]; - /* 0x0F0 */ Vec3f unk_F0; - /* 0x0FC */ char padFC[8]; - /* 0x104 */ Vec3f unk_104; - /* 0x110 */ Vec3f unk_110; - /* 0x11C */ Vec3f unk_11C; - /* 0x128 */ char pad128[0x4C]; - /* 0x174 */ Vec3f unk_174; - /* 0x180 */ Vec3f unk_180; - /* 0x18C */ Vec3f unk_18C; - /* 0x198 */ Vec3f unk_198; - /* 0x1A4 */ char pad1A4[4]; - /* 0x1A8 */ Vec3f unk_1A8; - /* 0x1B4 */ Vec3f unk_1B4; - /* 0x1C0 */ char pad1C0[0x98]; -} UnkStruct_1C24E8; /* size = 0x258 */ - -s32 D_E16C50_801C2330[40]; -s32 D_E16C50_801C23D0[70]; -UnkStruct_1C24E8 D_E16C50_801C24E8; - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8018FF50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190028.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801900FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019019C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190204.s") - -// OBJ_ACTOR_235 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190430.s") - -// OBJ_ACTOR_235 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801904CC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190790.s") - -// OBJ_ACTOR_236 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190A00.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190B4C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190D0C.s") - -// OBJ_ACTOR_236 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190F08.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80190F28.s") - -// OBJ_ACTOR_238 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191010.s") - -// OBJ_ACTOR_238 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801914C4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801915A4.s") - -// OBJ_ACTOR_240 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191680.s") - -// OBJ_ACTOR_240 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191B4C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191BB8.s") - -// OBJ_ACTOR_241 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191BC4.s") - -// OBJ_ACTOR_241 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191DB0.s") - -// OBJ_ACTOR_242 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191E94.s") - -// OBJ_ACTOR_242 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80191FFC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80192094.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801926F4.s") - -// OBJ_ACTOR_243 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80192834.s") - -// OBJ_ACTOR_243 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80192C18.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80192C84.s") - -// OBJ_ACTOR_244 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80192E64.s") - -// OBJ_ACTOR_244 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193240.s") - -// OBJ_BOSS_ZO init -void func_E16C50_801932AC(Boss* bossZO); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801932AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193628.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801937D8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193908.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193970.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193A98.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193B08.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193C5C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193CC8.s") - -bool func_E16C50_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, Boss* thisx); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80193D08.s") - -void func_E16C50_80194394(s32 limbIndex, Vec3f* rot, Boss* thisx); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80194394.s") - -// OBJ_BOSS_ZO draw -void func_E16C50_801949DC(Boss* bossZO); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801949DC.s") - -// OBJ_BOSS_ZO action -void func_E16C50_80194A84(Boss* bossZO); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80194A84.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801986FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801989FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80198BE8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80198ECC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80198F3C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019907C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019914C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801991D0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80199394.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80199470.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019962C.s") - -// OBJ_ACTOR_245 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019969C.s") - -// OBJ_ACTOR_245 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019983C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801998E0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_801999CC.s") - -// OBJ_ACTOR_246 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80199A28.s") - -// OBJ_ACTOR_246 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80199E24.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80199E9C.s") - -// OBJ_ACTOR_248 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_80199F10.s") - -// OBJ_ACTOR_248 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019A1FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019A4E0.s") - -// OBJ_ACTOR_249 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019A5D4.s") - -// OBJ_ACTOR_249 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019ACCC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019B1F0.s") - -// OBJ_ACTOR_250 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019B548.s") - -// OBJ_ACTOR_250 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019B7DC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019B810.s") - -// OBJ_ACTOR_251 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019B854.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019BC78.s") - -// OBJ_ACTOR_251 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019BDE0.s") - -// OBJ_ACTOR_252 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019BE48.s") - -// OBJ_ACTOR_252 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019C1CC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019C200.s") - -// OBJ_ACTOR_253 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019C454.s") - -// OBJ_ACTOR_253 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019C83C.s") - -// OBJ_ACTOR_254 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019CBEC.s") - -// OBJ_ACTOR_254 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019CE58.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019D060.s") - -// OBJ_ACTOR_247 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019D15C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019D340.s") - -// OBJ_ACTOR_247 draw -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019D3C4.s") - -void func_E16C50_8019D428(Player* player); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019D428.s") - -void func_E16C50_8019D76C(Player* player); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019D76C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/func_E16C50_8019E5F0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/sf_zo/D_E16C50_801C0DB0.s") diff --git a/src/overlays/ovl_E16C50/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c similarity index 52% rename from src/overlays/ovl_E16C50/fox_a6.c rename to src/overlays/ovl_i3/fox_a6.c index 3dcb1a5b..a6f93264 100644 --- a/src/overlays/ovl_E16C50/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -1,16 +1,302 @@ #include "global.h" -void func_E16C50_8018A1B0(Boss* bossA6, s32 arg1); -void func_E16C50_8018A2C4(Boss* bossA6); -void func_E16C50_8018A464(Boss* bossA6, s32 arg1); -void func_E16C50_8018B9BC(Boss* bossA6); -void func_E16C50_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 arg5, s32 arg6, f32 arg7); -void func_E16C50_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4); -void func_E16C50_8018C54C(Boss* bossA6); +void func_i3_8018A1B0(Boss* bossA6, s32 arg1); +void func_i3_8018A2C4(Boss* bossA6); +void func_i3_8018A464(Boss* bossA6, s32 arg1); +void func_i3_8018B9BC(Boss* bossA6); +void func_i3_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 arg5, s32 arg6, f32 arg7); +void func_i3_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4); +void func_i3_8018C54C(Boss* bossA6); -typedef struct { - s32 unk_00[40]; -} UnkStruct_1C2250; +// 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))) +#define A6_HIT_1_2(bossA6, index) ((Hitbox*) (A6_HIT_0(bossA6) + 1 + (index))) +#define A6_HIT_4(bossA6, index) ((Hitbox*) ((f32*) (A6_HIT_1(bossA6, 0) + 3) + 6 * (index))) + +#define A6_HIT_7_1(bossA6, index) ((TiltHitbox*) ((f32*) (A6_HIT_4(bossA6, 0) + 3) + 10 * (index))) + +#define A6_HIT_7_2(bossA6) ((Hitbox*) (A6_HIT_4(bossA6, 0) + 3)) +#define A6_HIT_8_2(bossA6, index) ((TiltHitbox*) ((f32*) (A6_HIT_7_2(bossA6) + 1) + 10 * (index))) +#define A6_HIT_11_2(bossA6, index) ((TiltHitbox*) ((f32*) (A6_HIT_8_2(bossA6) + 3) + 10 * (index))) +#define A6_HIT_14_2(bossA6) ((TiltHitbox*) (A6_HIT_11_2(bossA6) + 3)) + +typedef enum { + /* 0 */ A6_SWK_0, + /* 1 */ A6_SWK_1, + /* 2 */ A6_SWK_2, + /* 3 */ A6_SWK_3, + /* 4 */ A6_SWK_4, + /* 5 */ A6_SWK_5, + /* 6 */ A6_SWK_6, + /* 7 */ A6_SWK_7, + /* 8 */ A6_SWK_8, + /* 9 */ A6_SWK_9, + /* 10 */ A6_SWK_10, + /* 11 */ A6_SWK_11, + /* 12 */ A6_SWK_12, + /* 13 */ A6_SWK_13, + /* 14 */ A6_SWK_14, + /* 15 */ A6_SWK_15, + /* 16 */ A6_SWK_16, + /* 17 */ A6_SWK_17, + /* 18 */ A6_SWK_18, + /* 19 */ A6_SWK_19, + /* 20 */ A6_SWK_20, + /* 21 */ A6_SWK_21, + /* 22 */ A6_SWK_22, + /* 23 */ A6_SWK_23, + /* 24 */ A6_SWK_24, + /* 25 */ A6_SWK_25, + /* 26 */ A6_SWK_26, + /* 27 */ A6_SWK_27, + /* 28 */ A6_SWK_28, + /* 29 */ A6_SWK_29, + /* 30 */ A6_SWK_30, + /* 31 */ A6_SWK_31, + /* 32 */ A6_SWK_32, + /* 33 */ A6_SWK_33, + /* 34 */ A6_SWK_34, + /* 35 */ A6_SWK_35, + /* 36 */ A6_SWK_36, + /* 37 */ A6_SWK_37, + /* 38 */ A6_SWK_38, + /* 39 */ A6_SWK_39, + /* 40 */ A6_SWK_MAX, +} BossA6swork; + +typedef enum { + /* 0 */ A6_FWK_0, + /* 1 */ A6_FWK_1, + /* 2 */ A6_FWK_2, + /* 3 */ A6_FWK_3, + /* 4 */ A6_FWK_4, + /* 5 */ A6_FWK_5, + /* 6 */ A6_FWK_6, + /* 7 */ A6_FWK_7, + /* 8 */ A6_FWK_8, + /* 9 */ A6_FWK_9, + /* 10 */ A6_FWK_10, + /* 11 */ A6_FWK_11, + /* 12 */ A6_FWK_12, + /* 13 */ A6_FWK_13, + /* 14 */ A6_FWK_14, + /* 15 */ A6_FWK_15, + /* 16 */ A6_FWK_16, + /* 17 */ A6_FWK_17, + /* 18 */ A6_FWK_18, + /* 19 */ A6_FWK_19, + /* 20 */ A6_FWK_20, + /* 21 */ A6_FWK_21, + /* 22 */ A6_FWK_22, + /* 23 */ A6_FWK_23, + /* 24 */ A6_FWK_24, + /* 25 */ A6_FWK_25, + /* 26 */ A6_FWK_26, + /* 27 */ A6_FWK_27, + /* 28 */ A6_FWK_28, + /* 29 */ A6_FWK_29, + /* 30 */ A6_FWK_30, + /* 31 */ A6_FWK_31, + /* 32 */ A6_FWK_32, + /* 33 */ A6_FWK_33, + /* 34 */ A6_FWK_34, + /* 35 */ A6_FWK_35, + /* 36 */ A6_FWK_36, + /* 37 */ A6_FWK_37, + /* 38 */ A6_FWK_38, + /* 39 */ A6_FWK_39, + /* 40 */ A6_FWK_40, + /* 41 */ A6_FWK_41, + /* 42 */ A6_FWK_42, + /* 43 */ A6_FWK_43, + /* 44 */ A6_FWK_44, + /* 45 */ A6_FWK_45, + /* 46 */ A6_FWK_46, + /* 47 */ A6_FWK_47, + /* 48 */ A6_FWK_48, + /* 49 */ A6_FWK_49, + /* 50 */ A6_FWK_MAX, +} BossA6fwork; + +typedef enum { + /* 0 */ A6_VWK_0, + /* 1 */ A6_VWK_1, + /* 2 */ A6_VWK_2, + /* 3 */ A6_VWK_3, + /* 4 */ A6_VWK_4, + /* 5 */ A6_VWK_5, + /* 6 */ A6_VWK_6, + /* 7 */ A6_VWK_7, + /* 8 */ A6_VWK_8, + /* 9 */ A6_VWK_9, + /* 10 */ A6_VWK_10, + /* 11 */ A6_VWK_11, + /* 12 */ A6_VWK_12, + /* 13 */ A6_VWK_13, + /* 14 */ A6_VWK_14, + /* 15 */ A6_VWK_15, + /* 16 */ A6_VWK_16, + /* 17 */ A6_VWK_17, + /* 18 */ A6_VWK_18, + /* 19 */ A6_VWK_19, + /* 20 */ A6_VWK_20, + /* 21 */ A6_VWK_21, + /* 22 */ A6_VWK_22, + /* 23 */ A6_VWK_23, + /* 24 */ A6_VWK_24, + /* 25 */ A6_VWK_25, + /* 26 */ A6_VWK_26, + /* 27 */ A6_VWK_27, + /* 28 */ A6_VWK_28, + /* 29 */ A6_VWK_29, + /* 30 */ A6_VWK_30, + /* 31 */ A6_VWK_31, + /* 32 */ A6_VWK_32, + /* 33 */ A6_VWK_33, + /* 34 */ A6_VWK_34, + /* 35 */ A6_VWK_35, + /* 36 */ A6_VWK_36, + /* 37 */ A6_VWK_37, + /* 38 */ A6_VWK_38, + /* 39 */ A6_VWK_39, + /* 40 */ A6_VWK_40, + /* 41 */ A6_VWK_41, + /* 42 */ A6_VWK_42, + /* 43 */ A6_VWK_43, + /* 44 */ A6_VWK_44, + /* 45 */ A6_VWK_45, + /* 46 */ A6_VWK_46, + /* 47 */ A6_VWK_47, + /* 48 */ A6_VWK_48, + /* 49 */ A6_VWK_49, + /* 50 */ A6_VWK_MAX, +} BossA6vwork; + +typedef enum { + /* 0 */ A6_BSS_0, + /* 1 */ A6_BSS_1, + /* 2 */ A6_BSS_2_0, + /* 3 */ A6_BSS_2_1, + /* 4 */ A6_BSS_2_2, + /* 5 */ A6_BSS_5, + /* 6 */ A6_BSS_6, + /* 7 */ A6_BSS_7, + /* 8 */ A6_BSS_8, + /* 9 */ A6_BSS_9, + /* 10 */ A6_BSS_10, + /* 11 */ A6_BSS_11, + /* 12 */ A6_BSS_12_0, + /* 13 */ A6_BSS_12_1, + /* 14 */ A6_BSS_12_2, + /* 15 */ A6_BSS_15, + /* 16 */ A6_BSS_16, + /* 17 */ A6_BSS_17, + /* 18 */ A6_BSS_18, + /* 19 */ A6_BSS_19, + /* 20 */ A6_BSS_20, + /* 21 */ A6_BSS_21, + /* 22 */ A6_BSS_22, + /* 23 */ A6_BSS_23, + /* 24 */ A6_BSS_24, + /* 25 */ A6_BSS_25, + /* 26 */ A6_BSS_26, + /* 27 */ A6_BSS_27, + /* 28 */ A6_BSS_28, + /* 29 */ A6_BSS_29, + /* 30 */ A6_BSS_30, + /* 31 */ A6_BSS_31, + /* 32 */ A6_BSS_32, + /* 33 */ A6_BSS_33, + /* 34 */ A6_BSS_34, + /* 35 */ A6_BSS_35, + /* 36 */ A6_BSS_36, + /* 37 */ A6_BSS_37, + /* 38 */ A6_BSS_38, + /* 39 */ A6_BSS_39, + /* 40 */ A6_BSS_MAX, +} BossA6bsswork; typedef struct { f32 r[3]; @@ -29,128 +315,128 @@ typedef struct { f32 r, g, b; } Color_RGBF32; -UnkStruct_1C2250 D_E16C50_801C2250; -UnkStruct_1C22F0 D_E16C50_801C22F0; +s32 D_i3_801C2250[A6_BSS_MAX]; +UnkStruct_1C22F0 D_i3_801C22F0; -f32 D_E16C50_801BECB0[4][3] = { +f32 D_i3_801BECB0[4][3] = { { 255.0f, 0.0f, 0.0f }, { 255.0f, 63.0f, 63.0f }, { 255.0f, 127.0f, 127.0f }, { 255.0f, 255.0f, 255.0f }, }; -Vec3f D_E16C50_801BECE0 = { 497.0f, 287.0f, 169.0f }; -Vec3f D_E16C50_801BECEC = { -497.0f, 287.0f, 169.0f }; -Vec3f D_E16C50_801BECF8 = { -6.0f, -528.0f, 169.0f }; -Vec3f D_E16C50_801BED04 = { 0.0f, 0.0f, 169.0f }; -Vec3f D_E16C50_801BED10 = { 238.0f, 235.0f, 169.0f }; -Vec3f D_E16C50_801BED1C = { 238.0f, -235.0f, 169.0f }; -Vec3f D_E16C50_801BED28 = { -238.0f, 235.0f, 169.0f }; -Vec3f D_E16C50_801BED34 = { -238.0f, -235.0f, 169.0f }; -Vec3f D_E16C50_801BED40[4] = { +Vec3f D_i3_801BECE0 = { 497.0f, 287.0f, 169.0f }; +Vec3f D_i3_801BECEC = { -497.0f, 287.0f, 169.0f }; +Vec3f D_i3_801BECF8 = { -6.0f, -528.0f, 169.0f }; +Vec3f D_i3_801BED04 = { 0.0f, 0.0f, 169.0f }; +Vec3f D_i3_801BED10 = { 238.0f, 235.0f, 169.0f }; +Vec3f D_i3_801BED1C = { 238.0f, -235.0f, 169.0f }; +Vec3f D_i3_801BED28 = { -238.0f, 235.0f, 169.0f }; +Vec3f D_i3_801BED34 = { -238.0f, -235.0f, 169.0f }; +Vec3f D_i3_801BED40[4] = { { 0.0f, -300.0f, 300.0f }, { 500.0f, -300.0f, 300.0f }, { 270.0f, 45.0f, 135.0f }, { 0.0f, 135.0f, 235.0f }, }; -Vec3f D_E16C50_801BED70[12] = { +Vec3f D_i3_801BED70[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 }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, }; -Vec3f D_E16C50_801BEE00[12] = { +Vec3f D_i3_801BEE00[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 }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 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_E16C50_801BEE90[12] = { +f32 D_i3_801BEE90[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_E16C50_801BEEC0[12] = { +f32 D_i3_801BEEC0[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, }; -Vec3f D_E16C50_801BEEF0[12] = { +Vec3f D_i3_801BEEF0[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 }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, }; -Vec3f D_E16C50_801BEF80[12] = { +Vec3f D_i3_801BEF80[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 }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 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_E16C50_801BF010[12] = { +f32 D_i3_801BF010[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_E16C50_801BF040[12] = { +f32 D_i3_801BF040[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, }; -Vec3f D_E16C50_801BF070[12] = { +Vec3f D_i3_801BF070[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 }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, }; -Vec3f D_E16C50_801BF100[12] = { +Vec3f D_i3_801BF100[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 }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 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_E16C50_801BF190[12] = { +f32 D_i3_801BF190[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_E16C50_801BF1C0[12] = { +f32 D_i3_801BF1C0[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_E16C50_801BF1F0[12] = { +f32 D_i3_801BF1F0[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_E16C50_801BF220[12] = { +f32 D_i3_801BF220[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_E16C50_801BF250[12] = { +f32 D_i3_801BF250[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_E16C50_801BF280[12] = { +f32 D_i3_801BF280[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_E16C50_801BF2B0[12] = { +f32 D_i3_801BF2B0[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_E16C50_801BF2E0[12] = { +f32 D_i3_801BF2E0[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, }; -s32 D_E16C50_801BF310[3] = { 255, 255, 32 }; -s32 D_E16C50_801BF31C[3] = { 32, 255, 32 }; -s32 D_E16C50_801BF328[3] = { 32, 34, 255 }; -f32 D_E16C50_801BF334[12] = { +s32 D_i3_801BF310[3] = { 255, 255, 32 }; +s32 D_i3_801BF31C[3] = { 32, 255, 32 }; +s32 D_i3_801BF328[3] = { 32, 34, 255 }; +f32 D_i3_801BF334[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_E16C50_801BF364[12] = { +f32 D_i3_801BF364[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_E16C50_801BF394[12] = { +f32 D_i3_801BF394[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_E16C50_801BF3C4[12] = { +f32 D_i3_801BF3C4[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_E16C50_801BF3F4[12] = { +f32 D_i3_801BF3F4[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_E16C50_801BF424[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, }; -Color_RGBAF32 D_E16C50_801BF454[4] = { +Color_RGBAF32 D_i3_801BF454[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_E16C50_801BF494[12] = { +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 func_E16C50_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, - s32 unk0B4) { +void func_i3_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, + s32 unk0B4) { (void) "おん\n"; (void) "おふ\n"; @@ -170,20 +456,20 @@ void func_E16C50_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6 func_8007A6F0(&actor->obj.pos, 0x2903201B); } -void func_E16C50_801875E4(f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { +void func_i3_801875E4(f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { s32 i; Actor* actor; for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status == 0) { - func_E16C50_80187530(actor, xPos, yPos, zPos, fwork6, xRot, yRot, timer0BC, unk0B4); - D_E16C50_801C2250.unk_00[11] = i + 1; + func_i3_80187530(actor, xPos, yPos, zPos, fwork6, xRot, yRot, timer0BC, unk0B4); + D_i3_801C2250[A6_BSS_11] = i + 1; break; } } } -void func_E16C50_8018767C(Effect* effect) { +void func_i3_8018767C(Effect* effect) { Effect_Initialize(effect); effect->obj.status = 1; effect->obj.id = OBJ_EFFECT_395; @@ -195,57 +481,55 @@ void func_E16C50_8018767C(Effect* effect) { Object_SetInfo(&effect->info, effect->obj.id); } -void func_E16C50_80187704(void) { +void func_i3_80187704(void) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == 0) { - func_E16C50_8018767C(&gEffects[i]); + func_i3_8018767C(&gEffects[i]); break; } } } -void func_E16C50_80187754(Boss* bossA6) { +void func_i3_80187754(Boss* bossA6) { Hitbox* hitbox; s32 i; - s32* ptr; D_80178284 = 1; D_80161A44 = 25000.0f; - D_801613A0 = 0; - bossA6->unk_060 = 780; - bossA6->fwork[2] = bossA6->fwork[34] = 2.0f; - bossA6->fwork[35] = 1.2f; - bossA6->swork[25] = 3; - bossA6->swork[15 + 0] = bossA6->swork[15 + 1] = bossA6->swork[15 + 2] = 40; - bossA6->swork[18 + 0] = bossA6->swork[18 + 1] = bossA6->swork[18 + 2] = 3; - for (i = 0; i < 40; i++) { - ((s32*) D_E16C50_801C2250.unk_00)[i] = 0; + 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; + for (i = 0; i < A6_BSS_MAX; i++) { + D_i3_801C2250[i] = 0; } - D_E16C50_801C22F0.unk_24 = D_E16C50_801C22F0.unk_28[0] = D_E16C50_801C22F0.unk_28[2] = D_E16C50_801C22F0.unk_28[1] = - 255.0f; - D_E16C50_801C22F0.unk_34 = 0.0f; - bossA6->swork[27 + 0] = bossA6->swork[27 + 1] = bossA6->swork[27 + 2] = 0; - bossA6->swork[22] = 32; - bossA6->swork[23] = 32; - bossA6->swork[24] = 255; - bossA6->fwork[29] = 255.0f; + 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; - bossA6->fwork[3] = -1700.0f; - bossA6->fwork[5] = 30.0f; - bossA6->fwork[32] = 1.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; - bossA6->info.hitbox[8] = bossA6->info.hitbox[14] = bossA6->info.hitbox[20] = 195.0f; - bossA6->info.hitbox[10] = bossA6->info.hitbox[16] = bossA6->info.hitbox[22] = 147.0f; - bossA6->info.hitbox[12] = bossA6->info.hitbox[18] = bossA6->info.hitbox[24] = 153.0f; + 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; func_800182F4(0x102800FF); func_800182F4(0x112800FF); Audio_PlaySfx(0x11002050, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } #ifdef NON_MATCHING -void func_E16C50_80187944(Boss* bossA6) { +void func_i3_80187944(Boss* bossA6) { s32 i; f32 var_fv1; s32 var_s0; @@ -266,8 +550,8 @@ void func_E16C50_80187944(Boss* bossA6) { s32 temp_1; f32 temp2; - D_801613A0++; - if ((bossA6->unk_04E < 6) || ((bossA6->unk_04E >= 8) && (bossA6->unk_04E < 12))) { + gBossFrameCount++; + if ((bossA6->actionState < 6) || ((bossA6->actionState >= 8) && (bossA6->actionState < 12))) { bossA6->obj.rot.y = Math_Atan2F(gPlayer[0].camEye.x - bossA6->obj.pos.x, gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_80177D20)) * 180.0f / M_PI; @@ -279,136 +563,140 @@ void func_E16C50_80187944(Boss* bossA6) { 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->unk_062 != 0) && (bossA6->unk_060 > 0)) { - bossA6->unk_062 = 0; - if (bossA6->fwork[0] > 5.0f) { - if ((bossA6->unk_066 == 0) && (bossA6->swork[25] == 0) && (bossA6->fwork[29] < 30.0f)) { - bossA6->unk_060 -= bossA6->unk_064; + 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->health -= bossA6->damage; bossA6->timer_05C = 15; - if (bossA6->unk_060 < 390) { + if (bossA6->health < 390) { Audio_PlaySfx(0x2943500F, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } else { Audio_PlaySfx(0x29034003, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - if (bossA6->unk_060 <= 0) { - bossA6->unk_060 = 0; - func_80042EC0((Boss*) bossA6); + if (bossA6->health <= 0) { + bossA6->health = 0; + func_80042EC0(bossA6); func_800BA808(gMsg_ID_15252, RCID_SLIPPY); D_8017796C = -1; D_8015F984 = (D_80177D20 * 0.00004f) + 0.5f; Audio_PlaySfx(0x2940D09A, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - D_80161734 = 0; + gShowBossHealth = 0; func_800182F4(0x102800FF); func_800182F4(0x112800FF); - bossA6->fwork[5] = 5.0f; - bossA6->fwork[3] = -20000.0f; - bossA6->fwork[1] = 170.0f; + 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_E16C50_801BECE0, &spA4[0]); - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BECEC, &spA4[1]); - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BECF8, &spA4[2]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECE0, &spA4[0]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECEC, &spA4[1]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECF8, &spA4[2]); for (i = 0; i < 3; i++) { func_8007D0E0(spA4[i].x + bossA6->obj.pos.x, spA4[i].y + bossA6->obj.pos.y, spA4[i].z + bossA6->obj.pos.z, 10.0f); } bossA6->timer_052 = 170; - D_E16C50_801C2250.unk_00[2] = D_E16C50_801C2250.unk_00[3] = D_E16C50_801C2250.unk_00[4] = - bossA6->swork[33 + 0] = bossA6->swork[33 + 1] = bossA6->swork[33 + 2] = 0; + 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; D_Timer_80161A60 = 4; - bossA6->unk_04E = 11; + bossA6->actionState = 11; Audio_PlaySfx(0x2940C00A, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); Audio_PlaySfx(0x3143402E, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } } - if (((bossA6->unk_066 == 4) || (bossA6->unk_066 == 5) || (bossA6->unk_066 == 6)) && - (bossA6->swork[25] != 0)) { - func_E16C50_8018B9BC(bossA6); + if (((bossA6->dmgPart == 4) || (bossA6->dmgPart == 5) || (bossA6->dmgPart == 6)) && + (bossA6->swork[A6_SWK_25] != 0)) { + func_i3_8018B9BC(bossA6); } } - if ((bossA6->unk_066 == 1) || (bossA6->unk_066 == 2) || (bossA6->unk_066 == 3)) { - func_E16C50_8018A2C4(bossA6); + if ((bossA6->dmgPart == 1) || (bossA6->dmgPart == 2) || (bossA6->dmgPart == 3)) { + func_i3_8018A2C4(bossA6); } - if (bossA6->unk_066 >= 7) { + if (bossA6->dmgPart >= 7) { Audio_PlaySfx(0x29121007, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } } for (i = 0; i < 3; i++) { - var_s0 = (bossA6->swork[15 + i] / 10) - 1; + var_s0 = (bossA6->swork[A6_SWK_15 + i] / 10) - 1; if (var_s0 < 0) { var_s0 = 0; } - Math_SmoothStepToF(&D_E16C50_801C22F0.r[i], D_E16C50_801BECB0[var_s0][0], 1.0f, 10.0f, 0); - Math_SmoothStepToF(&D_E16C50_801C22F0.g[i], D_E16C50_801BECB0[var_s0][1], 1.0f, 10.0f, 0); - Math_SmoothStepToF(&D_E16C50_801C22F0.b[i], D_E16C50_801BECB0[var_s0][2], 1.0f, 10.0f, 0); + Math_SmoothStepToF(&D_i3_801C22F0.r[i], D_i3_801BECB0[var_s0][0], 1.0f, 10.0f, 0); + 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[15 + 0] == 0) && (bossA6->swork[15 + 1] == 0) && (bossA6->swork[15 + 2] == 0) && - (bossA6->fwork[0] != 0) && !(gFrameCount & 1)) { + 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) && !(gFrameCount & 1)) { func_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); } temp2 = 0.5f; - if (((Boss*) gBosses)[0].swork[25] == 1) { + if ((gBosses)[0].swork[A6_SWK_25] == 1) { temp2 = 2.0f; } - if (D_E16C50_801C2250.unk_00[10] != 0) { - D_E16C50_801C22F0.unk_34 += temp2; - if (D_E16C50_801C22F0.unk_34 > 360.0f) { - D_E16C50_801C22F0.unk_34 -= 360.0f; + if (D_i3_801C2250[A6_BSS_10] != 0) { + D_i3_801C22F0.unk_34 += temp2; + if (D_i3_801C22F0.unk_34 > 360.0f) { + D_i3_801C22F0.unk_34 -= 360.0f; } } else { - D_E16C50_801C22F0.unk_34 -= temp2; - if (D_E16C50_801C22F0.unk_34 < 0.0f) { - D_E16C50_801C22F0.unk_34 += 360.0f; + D_i3_801C22F0.unk_34 -= temp2; + if (D_i3_801C22F0.unk_34 < 0.0f) { + D_i3_801C22F0.unk_34 += 360.0f; } } - if ((bossA6->unk_04E >= 3) && (bossA6->unk_04E < 5) && (bossA6->fwork[28] == 0.0f)) { - Math_SmoothStepToAngle(&bossA6->fwork[9], bossA6->fwork[32], 0.05f, 0.02f, 0.00001f); - Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[8], 0.05f, bossA6->fwork[9], 0.00001f); - if (bossA6->swork[25] >= 2) { + if ((bossA6->actionState >= 3) && (bossA6->actionState < 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 (!(gFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) { - bossA6->fwork[6] = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 500.0f); + bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 500.0f); } if (!(gFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) { - bossA6->fwork[7] = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 500.0f); + bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 500.0f); } } else { if (!(gFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) { - bossA6->fwork[6] = gPlayer[0].camEye.x + (Rand_ZeroOne() - 0.5f) * 1000.0f; - bossA6->fwork[30] = 0.0f; + bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + (Rand_ZeroOne() - 0.5f) * 1000.0f; + bossA6->fwork[A6_FWK_30] = 0.0f; } if (!(gFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) { - bossA6->fwork[7] = gPlayer[0].camEye.y + (Rand_ZeroOne() - 0.5f) * 1000.0f; - bossA6->fwork[31] = 0.0f; + bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + (Rand_ZeroOne() - 0.5f) * 1000.0f; + bossA6->fwork[A6_FWK_31] = 0.0f; } } } - if (bossA6->unk_04E != 0) { - Math_SmoothStepToF(&bossA6->fwork[4], bossA6->fwork[5], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.z, bossA6->fwork[3] + (gPlayer[0].camEye.z - D_80177D20), 0.1f, - bossA6->fwork[4], 0.00001f); - if (bossA6->unk_04E < 5) { + if (bossA6->actionState != 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, bossA6->fwork[A6_FWK_3] + (gPlayer[0].camEye.z - D_80177D20), 0.1f, + bossA6->fwork[A6_FWK_4], 0.00001f); + if (bossA6->actionState < 5) { sp120 = 2.0f; - if (bossA6->swork[25] == 1) { + if (bossA6->swork[A6_SWK_25] == 1) { sp120 = 50.0f; } - Math_SmoothStepToF(&bossA6->fwork[30], sp120, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[31], sp120, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.x, bossA6->fwork[6], 0.2f, bossA6->fwork[30], 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.y, bossA6->fwork[7], 0.2f, bossA6->fwork[31], 0.00001f); + 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_SmoothStepToAngle(&bossA6->fwork[0], bossA6->fwork[1], 0.2f, bossA6->fwork[2], 0.00001f); + 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[10 + 0], bossA6->fwork[13 + 0], 0.1f, bossA6->fwork[16 + 0], 0.0001f); - Math_SmoothStepToF(&bossA6->fwork[10 + 1], bossA6->fwork[13 + 1], 0.1f, bossA6->fwork[16 + 1], 0.0001f); - Math_SmoothStepToF(&bossA6->fwork[10 + 2], bossA6->fwork[13 + 2], 0.1f, bossA6->fwork[16 + 2], 0.0001f); - Math_SmoothStepToF(&bossA6->fwork[19 + 0], bossA6->fwork[22 + 0], 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[19 + 1], bossA6->fwork[22 + 1], 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[19 + 2], bossA6->fwork[22 + 2], 0.1f, 10.0f, 0.00001f); - if (bossA6->unk_04E > 10) { - bossA6->obj.rot.z += bossA6->fwork[28]; + 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], + 0.0001f); + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_10 + 2], bossA6->fwork[A6_FWK_13 + 2], 0.1f, bossA6->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); + if (bossA6->actionState > 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[28], 5.0f, 0.1f, 0.2f, 0.0001f); + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 5.0f, 0.1f, 0.2f, 0.0001f); for (i = 0; i < 10; i++) { func_80079618(bossA6->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 500.0f), bossA6->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 500.0f), @@ -418,11 +706,11 @@ void func_E16C50_80187944(Boss* bossA6) { bossA6->timer_05C = 15; } if (!(gFrameCount & 1)) { - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BED04, &spC8[0]); - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BED10, &spC8[1]); - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BED1C, &spC8[2]); - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BED28, &spC8[3]); - Matrix_MultVec3f(gCalcMatrix, &D_E16C50_801BED34, &spC8[4]); + 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++) { var_s0 = (Rand_ZeroOne() - 0.5f) * 300.0f; if (i == 0) { @@ -438,7 +726,7 @@ void func_E16C50_80187944(Boss* bossA6) { } } if (!(gFrameCount & 0xF)) { - sp114 = fabsf(bossA6->fwork[3] / -1700.0f); + sp114 = fabsf(bossA6->fwork[A6_FWK_3] / -1700.0f); if (sp114 < 1.0f) { sp114 = 1.0f; } @@ -447,15 +735,15 @@ void func_E16C50_80187944(Boss* bossA6) { } for (i = 0; i < 3; i++) { var_fv1 = sp114; - if (bossA6->swork[18 + i] != 0) { + if (bossA6->swork[A6_SWK_18 + i] != 0) { var_fv1 = 1.0f; } - bossA6->info.hitbox[1 + 1 + 6 * (i + 1)] = 195.0f * var_fv1; - bossA6->info.hitbox[1 + 3 + 6 * (i + 1)] = 147.0f * var_fv1; - bossA6->info.hitbox[1 + 5 + 6 * (i + 1)] = 153.0f * var_fv1; + A6_HIT_1_2(bossA6, i)->z.size = 195.0f * var_fv1; + A6_HIT_1_2(bossA6, i)->y.size = 147.0f * var_fv1; + A6_HIT_1_2(bossA6, i)->x.size = 153.0f * var_fv1; } } - switch (bossA6->unk_04E) { + switch (bossA6->actionState) { case 0: bossA6->info.hitbox[0] = 0; @@ -466,15 +754,15 @@ void func_E16C50_80187944(Boss* bossA6) { if ((bossA6->timer_050 != 0) && (bossA6->timer_050 < 200)) { sp11C = gPlayer[0].camEye.x - bossA6->obj.pos.x; sp118 = gPlayer[0].camEye.y - bossA6->obj.pos.y; - sp114 = gPlayer[0].camEye.z - D_80177D20 + bossA6->fwork[3] - bossA6->obj.pos.z; + sp114 = gPlayer[0].camEye.z - D_80177D20 + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; sp104 = 100.0f; } sp10C = Math_RadToDeg(Math_Atan2F(sp11C, sp114)); sp110 = Math_RadToDeg(-Math_Atan2F(sp118, sqrtf(SQ(sp11C) + SQ(sp114)))); - Math_SmoothStepToAngle(&bossA6->unk_07C, sp10C, 1.0f, sp104, 0.00001f); - Math_SmoothStepToAngle(&bossA6->unk_078, sp110, 1.0f, sp104, 0.00001f); - Matrix_RotateY(gCalcMatrix, bossA6->unk_07C * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossA6->unk_078 * M_DTOR, 1); + Math_SmoothStepToAngle(&bossA6->unk_078.y, sp10C, 1.0f, sp104, 0.00001f); + Math_SmoothStepToAngle(&bossA6->unk_078.x, sp110, 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); @@ -484,18 +772,18 @@ void func_E16C50_80187944(Boss* bossA6) { sp98.z = 60.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); bossA6->vel.z = sp8C.z; - bossA6->fwork[33] += 30.0f; + bossA6->fwork[A6_FWK_33] += 30.0f; if (bossA6->timer_050 == 0) { - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_24, 0.0f, 0.1f, 1.0f, 0); - if (D_E16C50_801C22F0.unk_24 < 1.0f) { - D_E16C50_801C22F0.unk_24 = 0.0f; + 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_KillSfx(&bossA6->sfxPos); Audio_PlaySfx(0x19004051, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); bossA6->timer_050 = 20; - bossA6->obj.pos.z = gPlayer[0].camEye.z - D_80177D20 + bossA6->fwork[3]; - bossA6->fwork[6] = bossA6->obj.pos.x = gPlayer[0].camEye.x; - bossA6->fwork[7] = bossA6->obj.pos.y = gPlayer[0].camEye.y; - bossA6->unk_04E = 2; + bossA6->obj.pos.z = gPlayer[0].camEye.z - D_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->actionState = 2; bossA6->vel.x = 0.0f; bossA6->vel.y = 0.0f; bossA6->vel.z = -40.0f; @@ -509,39 +797,40 @@ void func_E16C50_80187944(Boss* bossA6) { 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_E16C50_801C2250.unk_00[27] == 0) { + if (D_i3_801C2250[A6_BSS_27] == 0) { Audio_PlaySfx(0x39408091, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - D_E16C50_801C2250.unk_00[27] = 1; + D_i3_801C2250[A6_BSS_27] = 1; } bossA6->obj.rot.z = 0.0f; - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_24, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[34], 2.0f, 0.1f, 0.1f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[35], 1.2f, 0.1f, 0.1f, 0.0f); - if (D_E16C50_801C22F0.unk_24 < 1.0f) { - bossA6->fwork[6] = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f); - bossA6->fwork[7] = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f); - bossA6->fwork[3] = -3700.0f + (Rand_ZeroOne() - 0.5f) * 3000.0f; - bossA6->fwork[34] = 2.0f; - bossA6->fwork[35] = 1.2f; - if ((bossA6->swork[37] == 0) && (bossA6->swork[33 + 0] == 0) && (bossA6->swork[33 + 1] == 0) && - (bossA6->swork[33 + 2] == 0) && (bossA6->swork[27 + 0] == 0) && (bossA6->swork[27 + 1] == 0) && - (bossA6->swork[27 + 2] == 0)) { - bossA6->swork[37] = 1; + 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] = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f); + bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f); + bossA6->fwork[A6_FWK_3] = -3700.0f + (Rand_ZeroOne() - 0.5f) * 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[37] != 0) { - bossA6->swork[18 + 0] = bossA6->swork[18 + 1] = bossA6->swork[18 + 2] = 3; - bossA6->fwork[3] = -1700.0f; - if ((bossA6->swork[25] != 1) && (D_E16C50_801C2250.unk_00[0] != 2)) { - bossA6->fwork[3] = ((Rand_ZeroOne() - 0.5f) * 1000.0f) + -3700.0f; + 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_ZeroOne() - 0.5f) * 1000.0f) + -3700.0f; } - bossA6->obj.pos.z = gPlayer[0].camEye.z - D_80177D20 + bossA6->fwork[3]; - bossA6->fwork[6] = bossA6->obj.pos.x = gPlayer[0].camEye.x; - bossA6->fwork[7] = bossA6->obj.pos.y = gPlayer[0].camEye.y; + bossA6->obj.pos.z = gPlayer[0].camEye.z - D_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; } - D_E16C50_801C22F0.unk_24 = 0.0f; + D_i3_801C22F0.unk_24 = 0.0f; bossA6->timer_050 = 50; - bossA6->unk_04E = 2; - D_E16C50_801C2250.unk_00[8] = 0; + bossA6->actionState = 2; + D_i3_801C2250[A6_BSS_8] = 0; Audio_PlaySfx(0x39408092, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } } @@ -556,18 +845,18 @@ void func_E16C50_80187944(Boss* bossA6) { D_80178480 = 50; } if (bossA6->timer_050 == 0) { - if (D_E16C50_801C2250.unk_00[8] == 0) { - D_E16C50_801C2250.unk_00[8] = 1; + if (D_i3_801C2250[A6_BSS_8] == 0) { + D_i3_801C2250[A6_BSS_8] = 1; D_80178348 = D_80178350 = D_80178354 = D_80178340 = 0; } - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_24, 255.0f, 0.1f, 10.0f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[34], 1.0f, 0.1f, 0.1f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[35], 1.0f, 0.1f, 0.1f, 0.0f); - if (D_E16C50_801C22F0.unk_24 > 254.0f) { - D_E16C50_801C22F0.unk_24 = 255.0f; + 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[34] = bossA6->fwork[35] = 1.0f; - switch (bossA6->swork[38]) { + bossA6->fwork[A6_FWK_34] = bossA6->fwork[A6_FWK_35] = 1.0f; + switch (bossA6->swork[A6_SWK_38]) { case 0: bossA6->timer_050 = 100; break; @@ -575,31 +864,31 @@ void func_E16C50_80187944(Boss* bossA6) { bossA6->timer_050 = 1399; break; } - bossA6->swork[38] = 0; - D_E16C50_801C2250.unk_00[28] = 1; - bossA6->unk_04E = 4; - if (bossA6->swork[37] != 0) { + bossA6->swork[A6_SWK_38] = 0; + D_i3_801C2250[A6_BSS_28] = 1; + bossA6->actionState = 4; + if (bossA6->swork[A6_SWK_37] != 0) { bossA6->timer_050 = 30; - bossA6->swork[37] = 0; - bossA6->fwork[8] = bossA6->fwork[9] = 0.0f; - if (bossA6->swork[36] < 2) { - bossA6->swork[36]++; + 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]++; } - bossA6->unk_04E = 3; + bossA6->actionState = 3; } - if (D_E16C50_801C2250.unk_00[6] != 0) { - if (D_E16C50_801C2250.unk_00[0] != 2) { - D_E16C50_801C2250.unk_00[0] = 1; + if (D_i3_801C2250[A6_BSS_6] != 0) { + if (D_i3_801C2250[A6_BSS_0] != 2) { + D_i3_801C2250[A6_BSS_0] = 1; } else { - D_E16C50_801C2250.unk_00[0] = 0; + D_i3_801C2250[A6_BSS_0] = 0; } } - if ((D_E16C50_801C2250.unk_00[6] == 0) || (D_E16C50_801C2250.unk_00[0] == 0)) { - bossA6->fwork[1] = 90.0f; - bossA6->fwork[2] = 2.0f; + 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_PlaySfx(0x31404066, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_6028578); - D_E16C50_801C2250.unk_00[7] = 0; + D_i3_801C2250[A6_BSS_7] = 0; } } } @@ -607,113 +896,116 @@ void func_E16C50_80187944(Boss* bossA6) { case 3: if (bossA6->timer_050 == 1) { Audio_KillSfx(&bossA6->sfxPos); - if (D_E16C50_801C2250.unk_00[7] == 0) { + if (D_i3_801C2250[A6_BSS_7] == 0) { Audio_PlaySfx(0x31008069, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - D_E16C50_801C2250.unk_00[7] = 1; + D_i3_801C2250[A6_BSS_7] = 1; } } - if (D_E16C50_801C2250.unk_00[0] != 0) { - if (bossA6->swork[25] == 1) { + if (D_i3_801C2250[A6_BSS_0] != 0) { + if (bossA6->swork[A6_SWK_25] == 1) { bossA6->timer_052 = 30; - bossA6->unk_04E = 5; - bossA6->fwork[1] = 90.0f; - bossA6->fwork[2] = 2.0f; - bossA6->fwork[37] = 300.0f; + bossA6->actionState = 5; + bossA6->fwork[A6_FWK_1] = 90.0f; + bossA6->fwork[A6_FWK_2] = 2.0f; + bossA6->fwork[A6_FWK_37] = 300.0f; } else { bossA6->timer_052 = 30; - bossA6->unk_04E = 8; + bossA6->actionState = 8; } } else { - if ((bossA6->swork[36] == 3) && (D_E16C50_801C2250.unk_00[29] == 0)) { + if ((bossA6->swork[A6_SWK_36] == 3) && (D_i3_801C2250[A6_BSS_29] == 0)) { func_800BA808(gMsg_ID_7084, RCID_PEPPY); - bossA6->swork[36] = 4; - D_E16C50_801C2250.unk_00[29]++; - D_E16C50_801C2250.unk_00[29] &= 1; + bossA6->swork[A6_SWK_36] = 4; + D_i3_801C2250[A6_BSS_29]++; + D_i3_801C2250[A6_BSS_29] &= 1; } - if ((bossA6->swork[30 + 0] != 0) && (bossA6->swork[30 + 1] != 0) && (bossA6->swork[30 + 2] != 0)) { + 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[1] = 0.0f; - D_E16C50_801C2250.unk_00[28] = 0; - bossA6->unk_04E = 4; - bossA6->fwork[2] = 1.0f; + bossA6->fwork[A6_FWK_1] = 0.0f; + D_i3_801C2250[A6_BSS_28] = 0; + bossA6->actionState = 4; + bossA6->fwork[A6_FWK_2] = 1.0f; bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_6028454); - D_E16C50_801C2250.unk_00[6] = 1; + D_i3_801C2250[A6_BSS_6] = 1; Audio_KillSfx(&bossA6->sfxPos); Audio_PlaySfx(0x31404067, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - bossA6->swork[30 + 0] = bossA6->swork[30 + 1] = bossA6->swork[30 + 2] = 0; - } else if (bossA6->swork[30 + 0] == 0) { - func_E16C50_8018A1B0(bossA6, 0); - } else if (bossA6->swork[30 + 1] == 0) { - func_E16C50_8018A1B0(bossA6, 1); - } else if (bossA6->swork[30 + 2] == 0) { - func_E16C50_8018A1B0(bossA6, 2); + 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) { + func_i3_8018A1B0(bossA6, 0); + } else if (bossA6->swork[A6_SWK_30 + 1] == 0) { + func_i3_8018A1B0(bossA6, 1); + } else if (bossA6->swork[A6_SWK_30 + 2] == 0) { + func_i3_8018A1B0(bossA6, 2); } } break; case 4: if (bossA6->timer_050 == 1400) { - bossA6->swork[15 + 0] = bossA6->swork[15 + 1] = bossA6->swork[15 + 2] = 40; - if (bossA6->swork[25] == 0) { - bossA6->swork[25] = 1; + 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; } - bossA6->fwork[3] = ((Rand_ZeroOne() - 0.5f) * 1000.0f) + -3700.0f; - if (D_E16C50_801C2250.unk_00[28] == 0) { + bossA6->fwork[A6_FWK_3] = ((Rand_ZeroOne() - 0.5f) * 1000.0f) + -3700.0f; + if (D_i3_801C2250[A6_BSS_28] == 0) { Audio_PlaySfx(0x39404068, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } } - Math_SmoothStepToF(&bossA6->fwork[29], 255.0f, 1.0f, 10.0f, 0.0001f); - if ((bossA6->swork[36] == 2) && (bossA6->fwork[0] == 0.0f) && (D_E16C50_801C2250.unk_00[30] == 0)) { + 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)) { func_800BA808(gMsg_ID_7083, RCID_PEPPY); - bossA6->swork[36] = 3; - D_E16C50_801C2250.unk_00[30]++; - D_E16C50_801C2250.unk_00[30] &= 1; + bossA6->swork[A6_SWK_36] = 3; + D_i3_801C2250[A6_BSS_30]++; + D_i3_801C2250[A6_BSS_30] &= 1; } if (!(gFrameCount & 0x3F)) { - bossA6->fwork[8] = Rand_ZeroOne() * 360.0f; - bossA6->fwork[9] = 0.0f; + bossA6->fwork[A6_FWK_8] = Rand_ZeroOne() * 360.0f; + bossA6->fwork[A6_FWK_9] = 0.0f; } if ((bossA6->timer_050 == 0) || - ((bossA6->swork[33 + 0] == 0) && (bossA6->swork[33 + 1] == 0) && (bossA6->swork[33 + 2] == 0) && - (bossA6->swork[27 + 0] == 0) && (bossA6->swork[27 + 1] == 0) && (bossA6->swork[27 + 2] == 0))) { - bossA6->swork[37] = 1; - if (D_E16C50_801C2250.unk_00[6] != 0) { - bossA6->unk_04E = 1; - D_E16C50_801C2250.unk_00[27] = 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 (D_i3_801C2250[A6_BSS_6] != 0) { + bossA6->actionState = 1; + D_i3_801C2250[A6_BSS_27] = 0; } else { - bossA6->fwork[1] = 90.0f; + bossA6->fwork[A6_FWK_1] = 90.0f; bossA6->timer_050 = 30; - bossA6->fwork[8] = bossA6->fwork[9] = 0; - bossA6->fwork[2] = 2.0f; + bossA6->fwork[A6_FWK_8] = bossA6->fwork[A6_FWK_9] = 0; + bossA6->fwork[A6_FWK_2] = 2.0f; Audio_PlaySfx(0x31404066, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_6028578); - D_E16C50_801C2250.unk_00[7] = bossA6->swork[37] = 0; - bossA6->unk_04E = 3; - if (D_E16C50_801C2250.unk_00[6] == 0) { + D_i3_801C2250[A6_BSS_7] = bossA6->swork[A6_SWK_37] = 0; + bossA6->actionState = 3; + if (D_i3_801C2250[A6_BSS_6] == 0) { func_8001D444(0, 0x8017, 0, 0xFF); } } - } else if (bossA6->swork[38] != 0) { + } else if (bossA6->swork[A6_SWK_38] != 0) { bossA6->timer_052 = 30; - bossA6->unk_04E = 9; - bossA6->fwork[28] = 0.0f; - D_E16C50_801C2250.unk_00[24] = 0; - D_E16C50_801C2250.unk_00[27] = 0; + bossA6->actionState = 9; + bossA6->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; - D_E16C50_801C2250.unk_00[34] = 1; + D_i3_801C2250[A6_BSS_34] = 1; } break; case 5: if (bossA6->timer_050 == 1) { - func_E16C50_80187704(); + func_i3_80187704(); Audio_PlaySfx(0x39033093, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - D_E16C50_801C2250.unk_00[33] = 120; + D_i3_801C2250[A6_BSS_33] = 120; } - if (D_E16C50_801C2250.unk_00[33] != 0) { - D_E16C50_801C2250.unk_00[33]--; + if (D_i3_801C2250[A6_BSS_33] != 0) { + D_i3_801C2250[A6_BSS_33]--; } - if (D_E16C50_801C2250.unk_00[33] == 15) { - if (D_E16C50_801C2250.unk_00[32] == 0) { + if (D_i3_801C2250[A6_BSS_33] == 15) { + if (D_i3_801C2250[A6_BSS_32] == 0) { if (gTeamShields[1] > 0) { func_800BA808(gMsg_ID_20315, RCID_FALCO); } else if (gTeamShields[2] > 0) { @@ -722,57 +1014,57 @@ void func_E16C50_80187944(Boss* bossA6) { func_800BA808(gMsg_ID_20317, RCID_PEPPY); } } - D_E16C50_801C2250.unk_00[32]++; - D_E16C50_801C2250.unk_00[32] &= 1; + D_i3_801C2250[A6_BSS_32]++; + D_i3_801C2250[A6_BSS_32] &= 1; } break; case 6: - bossA6->obj.pos.z -= bossA6->fwork[37]; - Math_SmoothStepToF(&bossA6->fwork[37], 0.0f, 1.0f, 10.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[3], -6000.0f, 10.0f, 100.0f, 0.00001f); - sp68 = &D_E16C50_801BF454[D_E16C50_801C2250.unk_00[9]]; - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_28[0], sp68->r, 0.5f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_28[2], sp68->g, 0.5f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_28[1], sp68->b, 0.5f, 100.0f, 0.00001f); + 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); + sp68 = &D_i3_801BF454[D_i3_801C2250[A6_BSS_9]]; + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], sp68->r, 0.5f, 100.0f, 0.00001f); + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], sp68->g, 0.5f, 100.0f, 0.00001f); + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], sp68->b, 0.5f, 100.0f, 0.00001f); if (!(gFrameCount & 0xF)) { - D_E16C50_801C2250.unk_00[9]++; - D_E16C50_801C2250.unk_00[9] &= 3; + D_i3_801C2250[A6_BSS_9]++; + D_i3_801C2250[A6_BSS_9] &= 3; } if (bossA6->timer_050 == 0) { - bossA6->unk_04E = 7; - bossA6->fwork[1] = 0.0f; + bossA6->actionState = 7; + bossA6->fwork[A6_FWK_1] = 0.0f; } break; case 7: - temp_s0_3 = &gEffects[bossA6->swork[39]]; - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_28[0], 255.0f, 1.0f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_28[2], 255.0f, 1.0f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801C22F0.unk_28[1], 255.0f, 1.0f, 100.0f, 0.00001f); - if (bossA6->fwork[0] < 10.0f) { - temp_s0_3->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[0]) * 0.3f); - temp_s0_3->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[0]) * 0.3f); + temp_s0_3 = &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); } - if (bossA6->fwork[0] < 1.0f) { + 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) { - D_E16C50_801C2250.unk_00[0] = 2; - bossA6->swork[37] = 1; + D_i3_801C2250[A6_BSS_0] = 2; + bossA6->swork[A6_SWK_37] = 1; bossA6->timer_050 = 20; - D_E16C50_801C22F0.unk_28[0] = D_E16C50_801C22F0.unk_28[2] = D_E16C50_801C22F0.unk_28[1] = 255.0f; - bossA6->unk_04E = 1; - D_E16C50_801C2250.unk_00[27] = 0; + D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f; + bossA6->actionState = 1; + D_i3_801C2250[A6_BSS_27] = 0; Object_Kill(&temp_s0_3->obj, &temp_s0_3->sfxPos); } } break; case 8: if (bossA6->timer_052 == 0) { - D_E16C50_801C2250.unk_00[24] = 0; + D_i3_801C2250[A6_BSS_24] = 0; bossA6->timer_052 = 300; bossA6->timer_054 = 0; - bossA6->unk_04E = 9; + bossA6->actionState = 9; Audio_PlaySfx(0x11002050, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } break; @@ -781,20 +1073,20 @@ void func_E16C50_80187944(Boss* bossA6) { Audio_KillSfx(&bossA6->sfxPos); Audio_PlaySfx(0x19004051, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); bossA6->timer_054 = 0; - bossA6->unk_04E = 10; + bossA6->actionState = 10; } else { - if (D_E16C50_801C2250.unk_00[34] == 0) { - bossA6->obj.rot.z += bossA6->fwork[28]; + 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[28], 20.0f, 0.1f, 0.5f, 0.0001f); + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 20.0f, 0.1f, 0.5f, 0.0001f); } if (bossA6->timer_054 == 0) { bossA6->timer_054 = 10; - if (D_E16C50_801C2250.unk_00[34] == 0) { + if (D_i3_801C2250[A6_BSS_34] == 0) { bossA6->timer_054 = 30; } sp128 = 6; - if (bossA6->swork[25] == 2) { + if (bossA6->swork[A6_SWK_25] == 2) { sp128 = 12; } for (i = 0; i < sp128; i++) { @@ -805,42 +1097,42 @@ void func_E16C50_80187944(Boss* bossA6) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); sp10C = Math_RadToDeg(Math_Atan2F(sp8C.x, sp8C.z)); sp110 = Math_RadToDeg(-Math_Atan2F(sp8C.y, sqrtf(SQ(sp8C.x) + SQ(sp8C.z)))); - temp_1 = D_E16C50_801C2250.unk_00[12 + i] - 1; + temp_1 = D_i3_801C2250[A6_BSS_12_0 + i] - 1; if (temp_1 < 0) { temp_1 = 0; } if ((gActors[temp_1].obj.status == 0) || (gActors[temp_1].obj.id != OBJ_ACTOR_191) || - (D_E16C50_801C2250.unk_00[24] == 0)) { - D_E16C50_801C2250.unk_00[12 + i] = 0; + (D_i3_801C2250[A6_BSS_24] == 0)) { + D_i3_801C2250[A6_BSS_12_0 + i] = 0; temp_1 = 0; - if (bossA6->swork[25] == 1) { + if (bossA6->swork[A6_SWK_25] == 1) { temp_1 = 1; } - func_E16C50_801875E4(bossA6->obj.pos.x + sp8C.x, bossA6->obj.pos.y + sp8C.y, - bossA6->obj.pos.z + sp8C.z, 25.0f, sp110, sp10C, 10, temp_1); - D_E16C50_801C2250.unk_00[12 + i] = D_E16C50_801C2250.unk_00[11]; + func_i3_801875E4(bossA6->obj.pos.x + sp8C.x, bossA6->obj.pos.y + sp8C.y, + bossA6->obj.pos.z + sp8C.z, 25.0f, sp110, sp10C, 10, temp_1); + D_i3_801C2250[A6_BSS_12_0 + i] = D_i3_801C2250[A6_BSS_11]; } } - D_E16C50_801C2250.unk_00[24] = 1; + D_i3_801C2250[A6_BSS_24] = 1; } } break; case 10: - if (D_E16C50_801C2250.unk_00[34] == 0) { - bossA6->obj.rot.z += bossA6->fwork[28]; + 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[28], 0.0f, 0.1f, 0.5f, 0.0001f); + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 0.0f, 0.1f, 0.5f, 0.0001f); } - if (bossA6->fwork[28] <= 0.1f) { - if (D_E16C50_801C2250.unk_00[34] == 0) { - bossA6->fwork[28] = 0.0f; - D_E16C50_801C2250.unk_00[0] = 2; - bossA6->swork[37] = 1; + if (bossA6->fwork[A6_FWK_28] <= 0.1f) { + if (D_i3_801C2250[A6_BSS_34] == 0) { + bossA6->fwork[A6_FWK_28] = 0.0f; + D_i3_801C2250[A6_BSS_0] = 2; + bossA6->swork[A6_SWK_37] = 1; } bossA6->timer_050 = 20; - D_E16C50_801C2250.unk_00[27] = 0; - D_E16C50_801C2250.unk_00[34] = 0; - bossA6->unk_04E = 1; + D_i3_801C2250[A6_BSS_27] = 0; + D_i3_801C2250[A6_BSS_34] = 0; + bossA6->actionState = 1; } break; case 11: @@ -855,331 +1147,332 @@ void func_E16C50_80187944(Boss* bossA6) { D_801779A8[0] = 20.0f; } if (bossA6->timer_052 == 0) { - D_80161734 = 0; + gShowBossHealth = 0; Object_Kill(&bossA6->obj, &bossA6->sfxPos); } break; } - func_E16C50_8018A464(bossA6, 0); - func_E16C50_8018A464(bossA6, 1); - func_E16C50_8018A464(bossA6, 2); + func_i3_8018A464(bossA6, 0); + func_i3_8018A464(bossA6, 1); + func_i3_8018A464(bossA6, 2); for (i = 0; i < 5; i++) { if (!(gFrameCount & 3)) { - D_E16C50_801BF280[i] = (Rand_ZeroOne() - 0.5f) * 10.0f; - D_E16C50_801BF2B0[i] = (Rand_ZeroOne() - 0.5f) * 10.0f; - D_E16C50_801BF2E0[i] = (Rand_ZeroOne() - 0.5f) * 10.0f; + D_i3_801BF280[i] = (Rand_ZeroOne() - 0.5f) * 10.0f; + D_i3_801BF2B0[i] = (Rand_ZeroOne() - 0.5f) * 10.0f; + D_i3_801BF2E0[i] = (Rand_ZeroOne() - 0.5f) * 10.0f; } - Math_SmoothStepToF(&D_E16C50_801BF1F0[i], D_E16C50_801BF280[i], 1.0f, 5.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF220[i], D_E16C50_801BF2B0[i], 1.0f, 5.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF250[i], D_E16C50_801BF2E0[i], 1.0f, 5.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BF1F0[i], D_i3_801BF280[i], 1.0f, 5.0f, 0.001f); + 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); } - bossA6->info.hitbox[1 + 4 * 6 + 0] = bossA6->vwork[4].z; - bossA6->info.hitbox[1 + 4 * 6 + 2] = bossA6->vwork[4].y; - bossA6->info.hitbox[1 + 4 * 6 + 4] = bossA6->vwork[4].x; - bossA6->info.hitbox[1 + 5 * 6 + 0] = bossA6->vwork[5].z; - bossA6->info.hitbox[1 + 5 * 6 + 2] = bossA6->vwork[5].y; - bossA6->info.hitbox[1 + 5 * 6 + 4] = bossA6->vwork[5].x; - bossA6->info.hitbox[1 + 6 * 6 + 0] = bossA6->vwork[6].z; - bossA6->info.hitbox[1 + 6 * 6 + 2] = bossA6->vwork[6].y; - bossA6->info.hitbox[1 + 6 * 6 + 4] = bossA6->vwork[6].x; - if (D_801613A0 == 600) { + 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; + if (gBossFrameCount == 600) { func_800BA808(gMsg_ID_2225, RCID_SLIPPY); } - if (D_801613A0 == 756) { - D_80161734 = 1; + if (gBossFrameCount == 756) { + gShowBossHealth = 1; } - if (D_801613A0 > 756) { - D_80177848 = (bossA6->unk_060 / 780.0f) * 255.0f; + if (gBossFrameCount > 756) { + gBossHealthBar = (bossA6->health / 780.0f) * 255.0f; } for (i = 0; i < 15; i++) { - if (bossA6->swork[i] != 0) { - bossA6->swork[i]--; + if (bossA6->swork[A6_SWK_0 + i] != 0) { + bossA6->swork[A6_SWK_0 + i]--; } } - if (bossA6->fwork[0] > 20.0f) { + if (bossA6->fwork[A6_FWK_0] > 20.0f) { for (i = 0; i < 3; i++) { - if (bossA6->swork[i] == 0) { - bossA6->swork[i] = 5; + if (bossA6->swork[A6_SWK_0 + i] == 0) { + bossA6->swork[A6_SWK_0 + i] = 5; } } } - if (D_E16C50_801C2250.unk_00[5] != 0) { - D_E16C50_801C2250.unk_00[5]--; + if (D_i3_801C2250[A6_BSS_5] != 0) { + D_i3_801C2250[A6_BSS_5]--; } - if (D_E16C50_801C2250.unk_00[25] != 0) { - D_E16C50_801C2250.unk_00[25]--; + if (D_i3_801C2250[A6_BSS_25] != 0) { + D_i3_801C2250[A6_BSS_25]--; } } #else -void func_E16C50_80187944(Boss* bossA6); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/fox_a6/func_E16C50_80187944.s") +void func_i3_80187944(Boss* bossA6); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80187944.s") #endif -void func_E16C50_8018A1B0(Boss* bossA6, s32 arg1) { - switch (D_E16C50_801C2250.unk_00[arg1 + 2]) { +void func_i3_8018A1B0(Boss* bossA6, s32 arg1) { + switch (D_i3_801C2250[A6_BSS_2_0 + arg1]) { case 0: - bossA6->swork[27 + arg1] = 12; - D_E16C50_801C2250.unk_00[arg1 + 2] = 1; + bossA6->swork[A6_SWK_27 + arg1] = 12; + D_i3_801C2250[A6_BSS_2_0 + arg1] = 1; break; case 1: - bossA6->fwork[13 + arg1] = 120.0f; - if (((bossA6->swork[33 + arg1] == 0) && (D_E16C50_801C2250.unk_00[6] != 0) && - ((bossA6->swork[15 + 0] != 0) || (bossA6->swork[15 + 1] != 0) || (bossA6->swork[15 + 2] != 0))) || - (bossA6->swork[25] == 0)) { - bossA6->fwork[16 + arg1] = 1.0f; + 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; } else { - bossA6->fwork[16 + arg1] = 60.0f; + bossA6->fwork[A6_FWK_16 + arg1] = 60.0f; } - if (bossA6->fwork[10 + arg1] >= 119.0f) { - bossA6->fwork[10 + arg1] = 120.0f; - bossA6->swork[33 + arg1] = 30; - bossA6->fwork[16 + arg1] = 60.0f; - D_E16C50_801C2250.unk_00[arg1 + 2] = 0; - bossA6->swork[arg1 + 6] = 0; - bossA6->swork[arg1 + 9] = 0; - bossA6->swork[30 + arg1] = 1; - bossA6->swork[18 + arg1] = 0; + 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; + 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; } break; } } -void func_E16C50_8018A2C4(Boss* bossA6) { +void func_i3_8018A2C4(Boss* bossA6) { s32 i; Vec3f sp58; s32 pad1; for (i = 0; i < 3; i++) { - if ((bossA6->unk_066 == i + 1) && (bossA6->unk_04E == 4) && (bossA6->fwork[0] < 20.0f)) { - if ((bossA6->swork[18 + i] != 1) && (bossA6->swork[18 + i] != 3)) { - bossA6->swork[i] = 15; - bossA6->swork[i + 3] = 40; - bossA6->swork[33 + i] -= bossA6->unk_064; + if ((bossA6->dmgPart == i + 1) && (bossA6->actionState == 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 (i == 0) { - sp58.x = D_E16C50_801BF334[0]; - sp58.y = D_E16C50_801BF3C4[0]; + sp58.x = D_i3_801BF334[0]; + sp58.y = D_i3_801BF3C4[0]; sp58.z = bossA6->obj.pos.z; func_8007A6F0(&sp58, 0x29034003); } if (i == 1) { - sp58.x = D_E16C50_801BF364[0]; - sp58.y = D_E16C50_801BF3F4[0]; + sp58.x = D_i3_801BF364[0]; + sp58.y = D_i3_801BF3F4[0]; sp58.z = bossA6->obj.pos.z; func_8007A6F0(&sp58, 0x29034003); } if (i == 2) { - sp58.x = D_E16C50_801BF394[0]; - sp58.y = D_E16C50_801BF424[0]; + sp58.x = D_i3_801BF394[0]; + sp58.y = D_i3_801BF424[0]; sp58.z = bossA6->obj.pos.z; func_8007A6F0(&sp58, 0x29034003); } - if (bossA6->swork[33 + i] < 0) { - bossA6->swork[33 + i] = 0; + if (bossA6->swork[A6_SWK_33 + i] < 0) { + bossA6->swork[A6_SWK_33 + i] = 0; } } } } } -typedef struct { - f32 count; - Hitbox box[1]; -} JntHitbox; - -#ifdef NON_MATCHING -void func_E16C50_8018A464(Boss* bossA6, s32 arg1) { +void func_i3_8018A464(Boss* bossA6, s32 arg1) { s32 i; s32 j; - f32 temp_ft2; + f32 var_fs0; Vec3f spE0; + f32 temp1; + f32 temp2; + f32 temp3; + f32 temp4; + f32 temp5; + f32 temp6; + f32 temp7; - bossA6->info.hitbox[1 + 6 * (arg1 + 1) + 0] = bossA6->vwork[1 + arg1].z; - bossA6->info.hitbox[1 + 6 * (arg1 + 1) + 2] = bossA6->vwork[1 + arg1].y; - bossA6->info.hitbox[1 + 6 * (arg1 + 1) + 4] = bossA6->vwork[1 + arg1].x; - if ((D_E16C50_801C2250.unk_00[5] != 0) && (bossA6->timer_056 != 0)) { + 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; + + if ((D_i3_801C2250[A6_BSS_5] != 0) && (bossA6->timer_056 != 0)) { bossA6->timer_050 = 202; bossA6->timer_056 = 0; } - switch (bossA6->swork[18 + arg1]) { /* irregular */ + switch (bossA6->swork[A6_SWK_18 + arg1]) { /* irregular */ case 0: - Math_SmoothStepToF(&bossA6->fwork[25 + arg1], -90.0f, 0.05f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[22 + arg1], 0.0f, 0.1f, 10.0f, 0.00001f); + 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[33] != 0) { + if (bossA6->swork[A6_SWK_33] != 0) { for (i = 1; i < 12; i++) { - D_E16C50_801BEE90[i] = 3.0f; - D_E16C50_801BEEC0[i] = 3.0f; - if ((bossA6->swork[6] == 0) && (bossA6->unk_04E != 3)) { - bossA6->swork[6] = 20; - D_E16C50_801BEE00[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f; - if (D_E16C50_801BEE00[0].y < -20.0f) { - D_E16C50_801BEE00[0].y = -20.0f; + D_i3_801BEE90[i] = 3.0f; + D_i3_801BEEC0[i] = 3.0f; + if ((bossA6->swork[A6_SWK_6] == 0) && (bossA6->actionState != 3)) { + bossA6->swork[A6_SWK_6] = 20; + D_i3_801BEE00[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f; + if (D_i3_801BEE00[0].y < -20.0f) { + D_i3_801BEE00[0].y = -20.0f; } - if (D_E16C50_801BEE00[0].y > 20.0f) { - D_E16C50_801BEE00[0].y = 20.0f; + if (D_i3_801BEE00[0].y > 20.0f) { + D_i3_801BEE00[0].y = 20.0f; } - D_E16C50_801BF3C4[0] = D_E16C50_801BEE00[0].y; - } else if (!(bossA6->swork[6] & 3)) { - temp_ft2 = D_E16C50_801BEE00[i].y; - D_E16C50_801BEE00[i].y = D_E16C50_801BF3C4[i - 1]; - D_E16C50_801BF3C4[i] = temp_ft2; + D_i3_801BF3C4[0] = D_i3_801BEE00[0].y; + } else if (!(bossA6->swork[A6_SWK_6] & 3)) { + D_i3_801BF3C4[i] = D_i3_801BEE00[i].y; + D_i3_801BEE00[i].y = D_i3_801BF3C4[i - 1]; + // temp_ft2; } - if (bossA6->swork[9] == 0) { - if ((D_E16C50_801BEE00[0].y < -20.0f) || (D_E16C50_801BEE00[0].y > 20.0f)) { - for (j = 0; j < 12; j++) { - Math_SmoothStepToF(&D_E16C50_801BEE00[j].x, 0.0f, 0.5f, 100.0f, 0.001f); + 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++) { + Math_SmoothStepToF(&D_i3_801BEE00[i].x, 0.0f, 0.5f, 100.0f, 0.001f); } } else { - bossA6->swork[9] = 30; - D_E16C50_801BEE00[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f; + bossA6->swork[A6_SWK_9] = 30; + D_i3_801BEE00[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f; } - D_E16C50_801BF334[0] = D_E16C50_801BEE00[0].x; - } else if (!(bossA6->swork[9] & 7)) { - temp_ft2 = D_E16C50_801BEE00[i].y; - D_E16C50_801BEE00[i].y = D_E16C50_801BF334[i - 1]; - D_E16C50_801BF334[i] = temp_ft2; + D_i3_801BF334[0] = D_i3_801BEE00[0].x; + } else if (!(bossA6->swork[A6_SWK_9] & 7)) { + 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_E16C50_801BED70[i].y, D_E16C50_801BEE00[i].y, 0.05f, - D_E16C50_801BEEC0[i], 0.001f); - Math_SmoothStepToF(&D_E16C50_801BED70[i].x, D_E16C50_801BEE00[i].x, 0.05f, - D_E16C50_801BEE90[i], 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEE90[i], 1.0f, 0.03f, 0.05f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEEC0[i], 1.0f, 0.03f, 0.05f, 0.001f); + Math_SmoothStepToF(&D_i3_801BED70[i].y, D_i3_801BEE00[i].y, 0.05f, D_i3_801BEEC0[i], + 0.001f); + Math_SmoothStepToF(&D_i3_801BED70[i].x, D_i3_801BEE00[i].x, 0.05f, D_i3_801BEE90[i], + 0.001f); + Math_SmoothStepToF(&D_i3_801BEE90[i], 1.0f, 0.03f, 0.05f, 0.001f); + Math_SmoothStepToF(&D_i3_801BEEC0[i], 1.0f, 0.03f, 0.05f, 0.001f); } } break; case 1: /* switch 1 */ - if (bossA6->swork[34] != 0) { + if (bossA6->swork[A6_SWK_34] != 0) { for (i = 1; i < 12; i++) { - D_E16C50_801BF010[i] = 3.0f; - D_E16C50_801BF040[i] = 3.0f; - if (bossA6->swork[7] == 0) { - bossA6->swork[7] = 20; - D_E16C50_801BEF80[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f; - if (D_E16C50_801BEF80[0].y < -20.0f) { - D_E16C50_801BEF80[0].y = -20.0f; + 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_ZeroOne() - 0.5f) * 720.0f; + if (D_i3_801BEF80[0].y < -20.0f) { + D_i3_801BEF80[0].y = -20.0f; } - if (D_E16C50_801BEF80[0].y > 20.0f) { - D_E16C50_801BEF80[0].y = 20.0f; + if (D_i3_801BEF80[0].y > 20.0f) { + D_i3_801BEF80[0].y = 20.0f; } - D_E16C50_801BF3F4[0] = D_E16C50_801BEF80[0].y; - } else if (!(bossA6->swork[7] & 3)) { - temp_ft2 = D_E16C50_801BEE00[i].y; - D_E16C50_801BEE00[i].y = D_E16C50_801BF3F4[i - 1]; - D_E16C50_801BF3F4[i] = temp_ft2; + D_i3_801BF3F4[0] = D_i3_801BEF80[0].y; + } else if (!(bossA6->swork[A6_SWK_7] & 3)) { + D_i3_801BF3F4[i] = D_i3_801BEF80[i].y; + D_i3_801BEF80[i].y = D_i3_801BF3F4[i - 1]; } - if (bossA6->swork[10] == 0) { - if ((D_E16C50_801BEF80[0].y < -20.0f) || (D_E16C50_801BEF80[0].y > 20.0f)) { - for (j = 0; j < 12; j++) { - Math_SmoothStepToF(&D_E16C50_801BEF80[j].x, 0.0f, 0.5f, 100.0f, 0.001f); + 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++) { + Math_SmoothStepToF(&D_i3_801BEF80[i].x, 0.0f, 0.5f, 50.0f, 0.001f); } } else { - bossA6->swork[10] = 30; - D_E16C50_801BEF80[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f; + bossA6->swork[A6_SWK_10] = 30; + D_i3_801BEF80[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f; } - D_E16C50_801BF364[0] = D_E16C50_801BEF80[0].x; - } else if (!(bossA6->swork[10] & 7)) { - temp_ft2 = D_E16C50_801BEF80[i].y; - D_E16C50_801BEF80[i].y = D_E16C50_801BF364[i - 1]; - D_E16C50_801BF364[i] = temp_ft2; + D_i3_801BF364[0] = D_i3_801BEF80[0].x; + } else if (!(bossA6->swork[A6_SWK_10] & 7)) { + D_i3_801BF364[i] = D_i3_801BEF80[i].x; + D_i3_801BEF80[i].x = D_i3_801BF364[i - 1]; } } for (i = 0; i < 12; i++) { - Math_SmoothStepToF(&D_E16C50_801BEEF0[i].y, D_E16C50_801BEF80[i].y, 0.05f, - D_E16C50_801BF040[i], 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEEF0[i].x, D_E16C50_801BEF80[i].x, 0.05f, - D_E16C50_801BF010[i], 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF010[i], 1.0f, 0.03f, 0.05f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF040[i], 1.0f, 0.03f, 0.05f, 0.001f); + Math_SmoothStepToF(&D_i3_801BEEF0[i].y, D_i3_801BEF80[i].y, 0.05f, D_i3_801BF040[i], + 0.001f); + Math_SmoothStepToF(&D_i3_801BEEF0[i].x, D_i3_801BEF80[i].x, 0.05f, D_i3_801BF010[i], + 0.001f); + Math_SmoothStepToF(&D_i3_801BF010[i], 1.0f, 0.03f, 0.05f, 0.001f); + Math_SmoothStepToF(&D_i3_801BF040[i], 1.0f, 0.03f, 0.05f, 0.001f); } } break; case 2: /* switch 1 */ - if (bossA6->swork[35] != 0) { + if (bossA6->swork[A6_SWK_35] != 0) { for (i = 1; i < 12; i++) { - D_E16C50_801BF190[i] = 3.0f; - D_E16C50_801BF1C0[i] = 3.0f; - if (bossA6->swork[8] == 0) { - bossA6->swork[8] = 20; - D_E16C50_801BF100[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f; - if (D_E16C50_801BF100[0].y < -20.0f) { - D_E16C50_801BF100[0].y = -20.0f; + 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_ZeroOne() - 0.5f) * 720.0f; + if (D_i3_801BF100[0].y < -20.0f) { + D_i3_801BF100[0].y = -20.0f; } - if (D_E16C50_801BF100[0].y > 20.0f) { - D_E16C50_801BF100[0].y = 20.0f; + if (D_i3_801BF100[0].y > 20.f) { + D_i3_801BF100[0].y = 20.0f; } - D_E16C50_801BF424[0] = D_E16C50_801BF100[0].y; - } else if (!(bossA6->swork[8] & 3)) { - temp_ft2 = D_E16C50_801BEE00[i].y; - D_E16C50_801BEE00[i].y = D_E16C50_801BF424[i - 1]; - D_E16C50_801BF424[i] = temp_ft2; + D_i3_801BF424[0] = D_i3_801BF100[0].y; + } else if (!(bossA6->swork[A6_SWK_8] & 3)) { + D_i3_801BF424[i] = D_i3_801BF100[i].y; + D_i3_801BF100[i].y = D_i3_801BF424[i - 1]; + // temp_ft2; } - if (bossA6->swork[11] == 0) { - if ((D_E16C50_801BF100[0].y < -20.0f) || (D_E16C50_801BF100[0].y > 20.0f)) { - for (j = 0; j < 12; j++) { - Math_SmoothStepToF(&D_E16C50_801BF100[j].x, 0.0f, 0.5f, 100.0f, 0.001f); + 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++) { + Math_SmoothStepToF(&D_i3_801BF100[i].x, 0.0f, 0.5f, 50.0f, 0.001f); } } else { - bossA6->swork[11] = 30; - D_E16C50_801BF100[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f; + bossA6->swork[A6_SWK_11] = 30; + D_i3_801BF100[0].x = (Rand_ZeroOne() - 0.4f) * 30.0f; } - D_E16C50_801BF394[0] = D_E16C50_801BF100[0].x; - } else if (!(bossA6->swork[11] & 7)) { - temp_ft2 = D_E16C50_801BF100[i].y; - D_E16C50_801BF100[i].y = D_E16C50_801BF394[i - 1]; - D_E16C50_801BF394[i] = temp_ft2; + D_i3_801BF394[0] = D_i3_801BF100[0].x; + } else if (!(bossA6->swork[A6_SWK_11] & 7)) { + 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_E16C50_801BF070[i].y, D_E16C50_801BF100[i].y, 0.05f, - D_E16C50_801BF1C0[i], 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF070[i].x, D_E16C50_801BF100[i].x, 0.05f, - D_E16C50_801BF190[i], 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF190[i], 1.0f, 0.03f, 0.05f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF1C0[i], 1.0f, 0.03f, 0.05f, 0.001f); + Math_SmoothStepToF(&D_i3_801BF070[i].y, D_i3_801BF100[i].y, 0.05f, D_i3_801BF1C0[i], + 0.001f); + Math_SmoothStepToF(&D_i3_801BF070[i].x, D_i3_801BF100[i].x, 0.05f, D_i3_801BF190[i], + 0.001f); + Math_SmoothStepToF(&D_i3_801BF190[i], 1.0f, 0.03f, 0.05f, 0.001f); + Math_SmoothStepToF(&D_i3_801BF1C0[i], 1.0f, 0.03f, 0.05f, 0.001f); } } break; } - if ((bossA6->unk_04E >= 3) && (bossA6->fwork[0] == 0.0f) && - ((bossA6->swork[33] != 0) || (bossA6->swork[34] != 0) || (bossA6->swork[35] != 0)) && - (D_E16C50_801C2250.unk_00[5] == 0)) { - f32 var_fs0 = 0.5f; - if (bossA6->swork[25] < 2) { + if ((bossA6->actionState >= 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)) && + (D_i3_801C2250[A6_BSS_5] == 0)) { + var_fs0 = 0.5f; + if (bossA6->swork[A6_SWK_25] < 2) { var_fs0 = 0.7f; } - if (!(gFrameCount & 31) && (Rand_ZeroOne() < var_fs0) && (D_E16C50_801C2250.unk_00[5] == 0) && - (bossA6->swork[33 + arg1] != 0)) { - if ((Rand_ZeroOne() < 0.2f) || (bossA6->swork[25] < 2)) { - if (bossA6->swork[18] == 0) { - bossA6->swork[18] = 1; + if (!(gFrameCount & 31) && (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; } - if (bossA6->swork[19] == 0) { - bossA6->swork[19] = 1; + if (bossA6->swork[A6_SWK_19] == 0) { + bossA6->swork[A6_SWK_19] = 1; } - if (bossA6->swork[20] == 0) { - bossA6->swork[20] = 1; + if (bossA6->swork[A6_SWK_20] == 0) { + bossA6->swork[A6_SWK_20] = 1; } - bossA6->swork[12] = 30; - if (bossA6->swork[33] != 0) { - bossA6->swork[13] = bossA6->swork[12] + 50; + bossA6->swork[A6_SWK_12] = 30; + if (bossA6->swork[A6_SWK_33] != 0) { + bossA6->swork[A6_SWK_13] = bossA6->swork[A6_SWK_12] + 50; } else { - bossA6->swork[13] = 30; + bossA6->swork[A6_SWK_13] = 30; } - if (bossA6->swork[34] != 0) { - bossA6->swork[14] = bossA6->swork[13] + 50; + if (bossA6->swork[A6_SWK_34] != 0) { + bossA6->swork[A6_SWK_14] = bossA6->swork[A6_SWK_13] + 50; } else { - bossA6->swork[14] = bossA6->swork[13]; + bossA6->swork[A6_SWK_14] = bossA6->swork[A6_SWK_13]; } } else { for (i = 0; i < 3; i++) { - ; - if ((i == (gFrameCount & 15)) && (bossA6->swork[18 + i] == 0)) { - bossA6->swork[12 + i] = 15; - bossA6->swork[18 + i] = 1; + if ((i == (gFrameCount & 15)) && (bossA6->swork[A6_SWK_18 + i] == 0)) { + bossA6->swork[A6_SWK_12 + i] = 15; + bossA6->swork[A6_SWK_18 + i] = 1; i = 3; } } @@ -1188,161 +1481,161 @@ void func_E16C50_8018A464(Boss* bossA6, s32 arg1) { } break; case 1: - D_E16C50_801C2250.unk_00[5] = 50; + D_i3_801C2250[A6_BSS_5] = 50; for (i = 0; i < 12; i++) { if (arg1 == 0) { - D_E16C50_801BEE00[i].y = 0.0f; - D_E16C50_801BEE00[i].x = i * -3.0f; - Math_SmoothStepToF(&D_E16C50_801BED70[i].x, D_E16C50_801BEE00[i].x, 0.1f, 10.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BED70[i].y, D_E16C50_801BEE00[i].y, 0.1f, 10.0f, 0.001f); + D_i3_801BEE00[i].x = i * -3.0f; + D_i3_801BEE00[i].y = 0.0f; + 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_E16C50_801BEE00[i].y = 0.0f; - D_E16C50_801BEE00[i].x = i * -3.0f; - Math_SmoothStepToF(&D_E16C50_801BEEF0[i].x, D_E16C50_801BEF80[i].x, 0.1f, 10.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEEF0[i].y, D_E16C50_801BEF80[i].y, 0.1f, 10.0f, 0.001f); + 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_E16C50_801BEE00[i].y = 0.0f; - D_E16C50_801BEE00[i].x = i * -3.0f; - Math_SmoothStepToF(&D_E16C50_801BF070[i].x, D_E16C50_801BF100[i].x, 0.1f, 10.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF070[i].y, D_E16C50_801BF100[i].y, 0.1f, 10.0f, 0.001f); + D_i3_801BF100[i].x = i * -3.0f; + D_i3_801BF100[i].y = 0.0f; + Math_SmoothStepToF(&D_i3_801BF070[i].x, D_i3_801BF100[i].x, 0.1f, 10.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BF070[i].y, D_i3_801BF100[i].y, 0.1f, 10.0f, 0.001f); } } - if (bossA6->swork[12 + i] == 0) { - bossA6->swork[12 + i] = 40.0f - ((20.0f - ((bossA6->fwork[3] * -1.0f) / 150.0f)) * 3.0f); + 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 (arg1 == 0) { - spE0.x = D_E16C50_801BF334[0]; - spE0.y = D_E16C50_801BF3C4[0]; + spE0.x = D_i3_801BF334[0]; + spE0.y = D_i3_801BF3C4[0]; spE0.z = bossA6->obj.pos.z; func_8007A6F0(&spE0, 0x29034065); } if (arg1 == 1) { - spE0.x = D_E16C50_801BF364[0]; - spE0.y = D_E16C50_801BF3F4[0]; + spE0.x = D_i3_801BF364[0]; + spE0.y = D_i3_801BF3F4[0]; spE0.z = bossA6->obj.pos.z; func_8007A6F0(&spE0, 0x29034065); } if (arg1 == 2) { - spE0.x = D_E16C50_801BF394[0]; - spE0.y = D_E16C50_801BF424[0]; + spE0.x = D_i3_801BF394[0]; + spE0.y = D_i3_801BF424[0]; spE0.z = bossA6->obj.pos.z; func_8007A6F0(&spE0, 0x29034065); } - bossA6->swork[18 + i] = 2; + bossA6->swork[A6_SWK_18 + arg1] = 2; } break; case 2: - D_E16C50_801C2250.unk_00[5] = 50; - Math_SmoothStepToF(&bossA6->fwork[25 + arg1], 0.0f, 0.4f, 100.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[22 + arg1], - 420.0f - ((20.0f - ((bossA6->fwork[3] * -1.0f) / 150.0f)) * 20.0f), 0.3f, 100.0f, + 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, 0.00001f); - if ((bossA6->swork[12 + i] == 0) || (bossA6->swork[7 + i] != 0)) { - bossA6->swork[12 + i] = 0; + if ((bossA6->swork[A6_SWK_12 + arg1] == 0) || (bossA6->swork[A6_SWK_3 + arg1] != 0)) { + bossA6->swork[A6_SWK_18 + arg1] = 0; for (i = 0; i < 12; i++) { if (arg1 == 0) { - D_E16C50_801BEE90[i] = 0.0f; - D_E16C50_801BEEC0[i] = 0.0f; + D_i3_801BEE90[i] = 0.0f; + D_i3_801BEEC0[i] = 0.0f; } if (arg1 == 1) { - D_E16C50_801BF010[i] = 0.0f; - D_E16C50_801BF040[i] = 0.0f; + D_i3_801BF010[i] = 0.0f; + D_i3_801BF040[i] = 0.0f; } if (arg1 == 2) { - D_E16C50_801BF190[i] = 0.0f; - D_E16C50_801BF1C0[i] = 0.0f; + D_i3_801BF190[i] = 0.0f; + D_i3_801BF1C0[i] = 0.0f; } } } for (i = 0; i < 12; i++) { if (arg1 == 0) { - D_E16C50_801BEE00[i].y = 0.0f; - D_E16C50_801BEE00[i].x = D_E16C50_801BF494[i]; - Math_SmoothStepToF(&D_E16C50_801BED70[i].y, D_E16C50_801BEE00[i].y, 0.3f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801BED70[i].x, D_E16C50_801BEE00[i].x, 0.3f, 100.0f, 0.00001f); + D_i3_801BEE00[i].y = 0.0f; + D_i3_801BEE00[i].x = D_i3_801BF494[i]; + 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_E16C50_801BEF80[i].y = 0.0f; - D_E16C50_801BEF80[i].x = D_E16C50_801BF494[i]; - Math_SmoothStepToF(&D_E16C50_801BEEF0[i].y, D_E16C50_801BEF80[i].y, 0.3f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801BEEF0[i].x, D_E16C50_801BEF80[i].x, 0.3f, 100.0f, 0.00001f); + 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_E16C50_801BF100[i].y = 0.0f; - D_E16C50_801BF100[i].x = D_E16C50_801BF494[i]; - Math_SmoothStepToF(&D_E16C50_801BF070[i].y, D_E16C50_801BF100[i].y, 0.3f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_E16C50_801BF070[i].x, D_E16C50_801BF100[i].x, 0.3f, 100.0f, 0.00001f); + D_i3_801BF100[i].y = 0.0f; + D_i3_801BF100[i].x = D_i3_801BF494[i]; + Math_SmoothStepToF(&D_i3_801BF070[i].y, D_i3_801BF100[i].y, 0.3f, 100.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BF070[i].x, D_i3_801BF100[i].x, 0.3f, 100.0f, 0.001f); } } break; case 3: for (i = 0; i < 12; i++) { - Math_SmoothStepToF(&D_E16C50_801BEE00[i].y, 0.0f, 0.5f, 50.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEE00[i].x, 0.0f, 0.5f, 50.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEF80[i].y, 0.0f, 0.5f, 50.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BEF80[i].x, 0.0f, 0.5f, 50.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF100[i].y, 0.0f, 0.5f, 50.0f, 0.001f); - Math_SmoothStepToF(&D_E16C50_801BF100[i].x, 0.0f, 0.5f, 50.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BEE00[i].y, 0.0f, 0.5f, 50.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BEE00[i].x, 0.0f, 0.5f, 50.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BEF80[i].y, 0.0f, 0.5f, 50.0f, 0.001f); + Math_SmoothStepToF(&D_i3_801BEF80[i].x, 0.0f, 0.5f, 50.0f, 0.001f); + 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[18] = bossA6->swork[19] = bossA6->swork[20] = 4; - bossA6->fwork[28] = bossA6->fwork[10] = bossA6->fwork[11] = bossA6->fwork[12] = bossA6->fwork[19] = - bossA6->fwork[20] = bossA6->fwork[21] = bossA6->fwork[13] = bossA6->fwork[14] = bossA6->fwork[15] = - bossA6->fwork[22] = bossA6->fwork[23] = bossA6->fwork[24] = 0.0f; - bossA6->fwork[25] = bossA6->fwork[26] = bossA6->fwork[27] = -90.0f; + 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; + + 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_E16C50_801BEE00[i].x = 0.0f; - D_E16C50_801BEE00[i].y = 0.0f; - D_E16C50_801BED70[i].x = 0.0f; - D_E16C50_801BED70[i].y = 0.0f; - D_E16C50_801BEEC0[i] = D_E16C50_801BEE90[i] = 3.0f; + D_i3_801BEE00[i].x = 0.0f; + D_i3_801BEE00[i].y = 0.0f; + D_i3_801BED70[i].x = 0.0f; + D_i3_801BED70[i].y = 0.0f; + D_i3_801BEEC0[i] = D_i3_801BEE90[i] = 3.0f; - D_E16C50_801BEF80[i].x = 0.0f; - D_E16C50_801BEF80[i].y = 0.0f; - D_E16C50_801BEEF0[i].x = 0.0f; - D_E16C50_801BEEF0[i].y = 0.0f; - D_E16C50_801BF010[i] = 3.0f; - D_E16C50_801BF040[i] = 3.0f; + D_i3_801BEF80[i].x = 0.0f; + D_i3_801BEF80[i].y = 0.0f; + D_i3_801BEEF0[i].x = 0.0f; + D_i3_801BEEF0[i].y = 0.0f; + D_i3_801BF040[i] = D_i3_801BF010[i] = 3.0f; + 3.0f; - D_E16C50_801BF100[i].x = 0.0f; - D_E16C50_801BF100[i].y = 0.0f; - D_E16C50_801BF070[i].x = 0.0f; - D_E16C50_801BF070[i].y = 0.0f; - D_E16C50_801BF190[i] = 3.0f; - D_E16C50_801BF1C0[i] = 3.0f; + D_i3_801BF100[i].x = 0.0f; + D_i3_801BF100[i].y = 0.0f; + D_i3_801BF070[i].x = 0.0f; + D_i3_801BF070[i].y = 0.0f; + D_i3_801BF1C0[i] = D_i3_801BF190[i] = 3.0f; + 3.0f; } break; } } -#else -void func_E16C50_8018A464(Boss* bossA6, s32 arg1); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/fox_a6/func_E16C50_8018A464.s") -#endif -void func_E16C50_8018B9BC(Boss* bossA6) { +void func_i3_8018B9BC(Boss* bossA6) { s32 i; s32 j; Vec3f sp94; Vec3f sp88; - if (D_E16C50_801C2250.unk_00[0] == 0) { + if (D_i3_801C2250[A6_BSS_0] == 0) { for (i = 3, j = 15; j < 18; j++, i++) { - if (bossA6->swork[j] != 0) { + if (bossA6->swork[A6_SWK_0 + j] != 0) { if ((D_8017812C != 0) && (gPlayerShots[15].unk_64 > 0)) { - bossA6->swork[j] -= bossA6->unk_064; - } else if (i + 1 == bossA6->unk_066) { - bossA6->swork[j] -= bossA6->unk_064; - if ((D_E16C50_801C2250.unk_00[25] == 0) && (bossA6->swork[25] == 1) && (Rand_ZeroOne() < 0.4f)) { - D_E16C50_801C2250.unk_00[10]++; - D_E16C50_801C2250.unk_00[10] &= 1; - D_E16C50_801C2250.unk_00[25] = 20; + 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)) { + D_i3_801C2250[A6_BSS_10]++; + D_i3_801C2250[A6_BSS_10] &= 1; + D_i3_801C2250[A6_BSS_25] = 20; } } Audio_PlaySfx(0x29033064, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); - if (bossA6->swork[j] <= 0) { - bossA6->swork[j] = 0; - Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[1 + i], &sp94); + 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_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; @@ -1352,19 +1645,20 @@ void func_E16C50_8018B9BC(Boss* bossA6) { func_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[15] == 0) && (bossA6->swork[16] == 0) && (bossA6->swork[17] == 0)) { + if ((bossA6->swork[A6_SWK_15] == 0) && (bossA6->swork[A6_SWK_16] == 0) && + (bossA6->swork[A6_SWK_17] == 0)) { Audio_KillSfx(&bossA6->sfxPos); - if (bossA6->swork[25] != 0) { - bossA6->swork[25]--; - if (bossA6->swork[25] != 0) { - bossA6->unk_060 -= 60; + 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[25] != 0) { + if (bossA6->swork[A6_SWK_25] != 0) { bossA6->timer_058 = 50; } else { bossA6->timer_054 = 30; - bossA6->fwork[32] = 20.0f; + bossA6->fwork[A6_FWK_32] = 20.0f; } } } @@ -1372,15 +1666,15 @@ void func_E16C50_8018B9BC(Boss* bossA6) { } } -void func_E16C50_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 arg5, s32 arg6, f32 arg7) { +void func_i3_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 arg5, s32 arg6, f32 arg7) { s32 i; Vec3f sp90 = { 0.0f, 0.0f, 0.0f }; - if (D_E16C50_801C22F0.unk_24 != 0.0f) { + if (D_i3_801C22F0.unk_24 != 0.0f) { RCP_SetupDL(&gMasterDisp, 0x17); - if (D_E16C50_801C22F0.unk_24 != 255.0f) { + if (D_i3_801C22F0.unk_24 != 255.0f) { RCP_SetupDL(&gMasterDisp, 0x47); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_E16C50_801C22F0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); } else if (arg4 != 0) { RCP_SetupDL(&gMasterDisp, 0x1B); if (arg7 < 18.0f) { @@ -1425,7 +1719,7 @@ void func_E16C50_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4 } } -void func_E16C50_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { +void func_i3_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { s32 i; Vec3f spB0 = { 0.0f, 0.0f, 0.0f }; f32 spAC; @@ -1441,7 +1735,7 @@ void func_E16C50_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) Matrix_Push(&gCalcMatrix); Matrix_Copy(gCalcMatrix, &gIdentityMatrix); GCGM_BACK(); - Matrix_RotateZ(gCalcMatrix, (D_E16C50_801C22F0.unk_34 + arg1) * M_DTOR, 1); + 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); @@ -1456,8 +1750,8 @@ void func_E16C50_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_E16C50_801C22F0.r[arg4], (s32) D_E16C50_801C22F0.g[arg4], - (s32) D_E16C50_801C22F0.b[arg4], 255); + 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); @@ -1482,7 +1776,7 @@ void func_E16C50_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) } #ifdef NON_MATCHING -void func_E16C50_8018C54C(Boss* bossA6) { +void func_i3_8018C54C(Boss* bossA6) { Vec3f spD0[30]; Vec3f spC4; Vec3f spB8; @@ -1490,19 +1784,19 @@ void func_E16C50_8018C54C(Boss* bossA6) { s32 i; s32 j; - if (bossA6->unk_04E == 0) { + if (bossA6->actionState == 0) { RCP_SetupDL(&gMasterDisp, 0x31); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_E16C50_801C22F0.unk_24); + 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[0x21] * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, bossA6->fwork[A6_FWK_33] * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); - } else if (D_E16C50_801C22F0.unk_24 != 0.0f) { + } else if (D_i3_801C22F0.unk_24 != 0.0f) { Animation_GetFrameData(&D_6018994, 0, spD0); - if (D_E16C50_801C22F0.unk_24 != 255.0f) { + if (D_i3_801C22F0.unk_24 != 255.0f) { RCP_SetupDL(&gMasterDisp, 0x47); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_E16C50_801C22F0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); spAC.x = 0.0f; if ((gFrameCounter & 1) == 0) { spAC.x = 0.0f; @@ -1513,136 +1807,138 @@ void func_E16C50_8018C54C(Boss* bossA6) { 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, gFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, bossA6->fwork[0x22], bossA6->fwork[0x23], 1.0f, 1); + Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, 1); Matrix_RotateZ(gGfxMatrix, -(f32) gFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, bossA6->fwork[0x22], bossA6->fwork[0x23], 1.0f, 1); + Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, 1); } else { RCP_SetupDL(&gMasterDisp, 0x1B); if (bossA6->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_E16C50_801C22F0.unk_28[0], - (s32) D_E16C50_801C22F0.unk_28[2], (s32) D_E16C50_801C22F0.unk_28[1], 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_i3_801C22F0.unk_28[0], (s32) D_i3_801C22F0.unk_28[2], + (s32) D_i3_801C22F0.unk_28[1], 255); } } - spD0[3].z -= bossA6->fwork[0]; - spD0[4].z -= bossA6->fwork[0]; - spD0[5].z -= bossA6->fwork[0]; + 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_6018BA0, spD0, NULL, NULL, &bossA6->index, &gIdentityMatrix); if (bossA6->unk_3F8 >= 1.0f) { for (i = 0; i < 3; i++) { - if ((bossA6->swork[33 + i] == 0) && (bossA6->unk_04E != 3) && (D_E16C50_801C2250.unk_00[2 + i] == 0) && - !(gFrameCount & 3) && (bossA6->swork[0x1B + i] != 0) && (D_80177854 != 0x64)) { + if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->actionState != 3) && + (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && !(gFrameCount & 3) && (bossA6->swork[A6_SWK_27 + i] != 0) && + (D_80177854 != 0x64)) { 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_MultVec3f(gCalcMatrix, &bossA6->vwork[1 + i], &spC4); + Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1 + i], &spC4); func_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 (D_E16C50_801C2250.unk_00[0x1A] == 0) { + if (D_i3_801C2250[A6_BSS_26] == 0) { func_8007A6F0(&spB8, 0x2903B009); } - D_E16C50_801C2250.unk_00[0x1A]++; - D_E16C50_801C2250.unk_00[0x1A] &= 1; - bossA6->swork[0x1B + i] -= 1; - if (bossA6->swork[0x1B + i] <= 0) { - bossA6->swork[0x12 + i] = 4; - bossA6->swork[0x26 + i] = 1; - bossA6->fwork[10 + i] = bossA6->fwork[19 + i] = bossA6->fwork[13 + i] = bossA6->fwork[22 + i] = - 0.0f; - bossA6->fwork[25 + i] = -90.0f; + 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 + i] = 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; for (j = 0; j < 12; j++) { if (i == 0) { - D_E16C50_801BED70[j].x = 0.0f; - D_E16C50_801BED70[j].y = 0.0f; - D_E16C50_801BEE00[j].x = 0.0f; - D_E16C50_801BEE00[j].y = 0.0f; - D_E16C50_801BEE90[j] = 3.0f; - D_E16C50_801BEEC0[j] = 3.0f; + D_i3_801BED70[j].x = 0.0f; + D_i3_801BED70[j].y = 0.0f; + D_i3_801BEE00[j].x = 0.0f; + D_i3_801BEE00[j].y = 0.0f; + D_i3_801BEE90[j] = 3.0f; + D_i3_801BEEC0[j] = 3.0f; } if (i == 1) { - D_E16C50_801BEEF0[j].x = 0.0f; - D_E16C50_801BEEF0[j].y = 0.0f; - D_E16C50_801BEF80[j].x = 0.0f; - D_E16C50_801BEF80[j].y = 0.0f; - D_E16C50_801BF010[j] = 3.0f; - D_E16C50_801BF040[j] = 3.0f; + D_i3_801BEEF0[j].x = 0.0f; + D_i3_801BEEF0[j].y = 0.0f; + D_i3_801BEF80[j].x = 0.0f; + D_i3_801BEF80[j].y = 0.0f; + D_i3_801BF010[j] = 3.0f; + D_i3_801BF040[j] = 3.0f; } if (i == 2) { - D_E16C50_801BF070[j].x = 0.0f; - D_E16C50_801BF070[j].y = 0.0f; - D_E16C50_801BF100[j].x = 0.0f; - D_E16C50_801BF100[j].y = 0.0f; - D_E16C50_801BF190[j] = 3.0f; - D_E16C50_801BF1C0[j] = 3.0f; + D_i3_801BF070[j].x = 0.0f; + D_i3_801BF070[j].y = 0.0f; + D_i3_801BF100[j].x = 0.0f; + D_i3_801BF100[j].y = 0.0f; + D_i3_801BF190[j] = 3.0f; + D_i3_801BF1C0[j] = 3.0f; } } } } } - func_E16C50_8018BCD4(D_E16C50_801BED70, 0.0f, bossA6->fwork[0x19], &bossA6->vwork[1], bossA6->swork[0] & 1, - bossA6->fwork[0xA] + bossA6->fwork[0x13], (s32) bossA6->swork[0x1B], bossA6->fwork[0]); - func_E16C50_8018BCD4(D_E16C50_801BEEF0, -120.0f, bossA6->fwork[0x1A], &bossA6->vwork[2], - bossA6->swork[1] & 1, bossA6->fwork[0xB] + bossA6->fwork[0x14], - (s32) bossA6->swork[0x1C], bossA6->fwork[0]); - func_E16C50_8018BCD4(D_E16C50_801BF070, 120.0f, bossA6->fwork[0x1B], &bossA6->vwork[3], - bossA6->swork[2] & 1, bossA6->fwork[0xC] + bossA6->fwork[0x15], - (s32) bossA6->swork[0x1D], bossA6->fwork[0]); - if ((bossA6->swork[0xF] != 0) && (bossA6->unk_04E >= 3) && (D_E16C50_801C22F0.unk_24 == 255.0f) && - (D_E16C50_801C2250.unk_00[0] == 0)) { - func_E16C50_8018C0D0(D_E16C50_801BF1F0, 0.0f, &bossA6->vwork[4], bossA6->fwork[0], 0); + func_i3_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]); + func_i3_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]); + func_i3_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->actionState >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && + (D_i3_801C2250[A6_BSS_0] == 0)) { + func_i3_8018C0D0(D_i3_801BF1F0, 0.0f, &bossA6->vwork[A6_VWK_4], bossA6->fwork[A6_FWK_0], 0); } - if ((bossA6->swork[0x10] != 0) && (bossA6->unk_04E >= 3) && (D_E16C50_801C22F0.unk_24 == 255.0f) && - (D_E16C50_801C2250.unk_00[0] == 0)) { - func_E16C50_8018C0D0(D_E16C50_801BF220, -120.0f, &bossA6->vwork[5], bossA6->fwork[0], 1); + if ((bossA6->swork[A6_SWK_16] != 0) && (bossA6->actionState >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && + (D_i3_801C2250[A6_BSS_0] == 0)) { + func_i3_8018C0D0(D_i3_801BF220, -120.0f, &bossA6->vwork[A6_VWK_5], bossA6->fwork[A6_FWK_0], 1); } - if ((bossA6->swork[0x11] != 0) && (bossA6->unk_04E >= 3) && (D_E16C50_801C22F0.unk_24 == 255.0f) && - (D_E16C50_801C2250.unk_00[0] == 0)) { - func_E16C50_8018C0D0(D_E16C50_801BF250, 120.0f, &bossA6->vwork[6], bossA6->fwork[0], 2); + if ((bossA6->swork[A6_SWK_17] != 0) && (bossA6->actionState >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && + (D_i3_801C2250[A6_BSS_0] == 0)) { + func_i3_8018C0D0(D_i3_801BF250, 120.0f, &bossA6->vwork[A6_VWK_6], bossA6->fwork[A6_FWK_0], 2); } - if (bossA6->swork[0x19] != 0) { - j = bossA6->swork[0x19] - 1; + if (bossA6->swork[A6_SWK_25] != 0) { + j = bossA6->swork[A6_SWK_25] - 1; if ((bossA6->timer_058 != 0) && !(bossA6->timer_058 & 3)) { Audio_PlaySfx(0x29034003, &bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } if (bossA6->timer_058 == 1) { - if (bossA6->swork[0x19] == 2) { + if (bossA6->swork[A6_SWK_25] == 2) { func_800BA808(gMsg_ID_7085, RCID_FALCO); - } else if (bossA6->swork[0x19] == 1) { + } else if (bossA6->swork[A6_SWK_25] == 1) { func_800BA808(gMsg_ID_7086, RCID_SLIPPY); } } - if (bossA6->swork[0x16] != D_E16C50_801BF310[j]) { - if (bossA6->swork[0x16] < D_E16C50_801BF310[j]) { - bossA6->swork[0x16]++; + 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]++; } else { - bossA6->swork[0x16]--; + bossA6->swork[A6_SWK_22]--; } } - if (bossA6->swork[0x17] != D_E16C50_801BF31C[j]) { - if (bossA6->swork[0x17] < D_E16C50_801BF31C[j]) { - bossA6->swork[0x17]++; + 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]++; } else { - bossA6->swork[0x17]--; + bossA6->swork[A6_SWK_23]--; } } - if (bossA6->swork[0x18] != D_E16C50_801BF328[j]) { - if (bossA6->swork[0x18] < D_E16C50_801BF328[j]) { - bossA6->swork[0x18]++; + 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]++; } else { - bossA6->swork[0x18]--; + bossA6->swork[A6_SWK_24]--; } } } else { - Math_SmoothStepToF(&bossA6->fwork[0x1D], 0.0f, 1.0f, 10.0f, 0.0001f); - if ((bossA6->timer_054 == 0) && (bossA6->swork[0x24] == 4) && (D_E16C50_801C2250.unk_00[0x1F] == 0)) { + 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)) { func_800BA808(gMsg_ID_7087, 0x1E); - bossA6->swork[0x24] = 5; - D_E16C50_801C2250.unk_00[0x1F]++; - D_E16C50_801C2250.unk_00[0x1F] &= 1; + bossA6->swork[A6_SWK_36] = 5; + D_i3_801C2250[A6_BSS_31]++; + D_i3_801C2250[A6_BSS_31] &= 1; } } } @@ -1653,18 +1949,18 @@ void func_E16C50_8018C54C(Boss* bossA6) { if (bossA6->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_E16C50_801C22F0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_601B2B0); Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x47); - if (D_E16C50_801C22F0.unk_24 != 255.0f) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, bossA6->swork[0x16], bossA6->swork[0x17], bossA6->swork[0x18], - (s32) D_E16C50_801C22F0.unk_28[-1]); + 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]); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, bossA6->swork[0x16], bossA6->swork[0x17], bossA6->swork[0x18], - (s32) bossA6->fwork[0x1D]); + 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_SetGfxMtx(&gMasterDisp); @@ -1673,12 +1969,12 @@ void func_E16C50_8018C54C(Boss* bossA6) { } } #else -void func_E16C50_8018C54C(Boss* bossA6); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/fox_a6/func_E16C50_8018C54C.s") +void func_i3_8018C54C(Boss* bossA6); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018C54C.s") #endif -void func_E16C50_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, - f32 zRot) { +void func_i3_8018D3CC(s32 arg0, 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++) { @@ -1706,7 +2002,7 @@ void func_E16C50_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 } } -void func_E16C50_8018D4E0(Actor* actor) { +void func_i3_8018D4E0(Actor* actor) { s32 i; func_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 0x14); @@ -1719,7 +2015,7 @@ void func_E16C50_8018D4E0(Actor* actor) { func_8007A6F0(&actor->obj.pos, 0x2903B009); } -void func_E16C50_8018D5C8(void) { +void func_i3_8018D5C8(void) { s32 i = 0; Actor_Initialize(&gActors[i]); @@ -1735,7 +2031,7 @@ void func_E16C50_8018D5C8(void) { Audio_PlaySfx(0x11030010, &gActors[i].sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } -void func_E16C50_8018D694(Actor* actor, s32 arg1) { +void func_i3_8018D694(Actor* actor, s32 arg1) { 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 }, @@ -1759,7 +2055,7 @@ void func_E16C50_8018D694(Actor* actor, s32 arg1) { Audio_PlaySfx(0x31000011, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } -void func_E16C50_8018D804(Actor* actor, s32 arg1) { +void func_i3_8018D804(Actor* actor, s32 arg1) { Vec3f sp2C[3] = { { -200.0f, 0.0f, -500.0f }, { 200.0f, 30.0f, -600.0f }, @@ -1780,7 +2076,7 @@ void func_E16C50_8018D804(Actor* actor, s32 arg1) { Audio_PlaySfx(0x3100000C, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } -void func_E16C50_8018D920(Vec3f* arg0) { +void func_i3_8018D920(Vec3f* arg0) { f32 sp6C = arg0->x - arg0->x; f32 sp68 = arg0->y - arg0->y; f32 sp64 = arg0->z - 1000.0f - arg0->z; @@ -1795,10 +2091,10 @@ void func_E16C50_8018D920(Vec3f* arg0) { sp50.y = 0.0f; sp50.z = 100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp50, &sp44); - func_E16C50_8018D3CC(100, arg0->x, arg0->y, arg0->z, sp44.x, sp44.y, sp44.z, sp5C, sp60, 0.0f); + func_i3_8018D3CC(100, arg0->x, arg0->y, arg0->z, sp44.x, sp44.y, sp44.z, sp5C, sp60, 0.0f); } -void func_E16C50_8018DA58(Actor* actor) { +void func_i3_8018DA58(Actor* actor) { Vec3f sp5C; Vec3f sp50; f32 sp4C; @@ -1888,7 +2184,7 @@ void func_E16C50_8018DA58(Actor* actor) { actor->obj.rot.z = -actor->unk_0F4.z; } -void func_E16C50_8018DF74(Player* player) { +void func_i3_8018DF74(Player* player) { Vec3f sp74; Vec3f sp68; Vec3f sp5C; @@ -1902,24 +2198,24 @@ void func_E16C50_8018DF74(Player* player) { D_80177A80 = 0; player->unk_1D0 = 1; Rand_SetSeed(1, 29000, 9876); - func_E16C50_8018D694(&gActors[1], 0); - func_E16C50_8018D694(&gActors[2], 1); - func_E16C50_8018D694(&gActors[6], 2); - func_E16C50_8018D694(&gActors[7], 3); - func_E16C50_8018D694(&gActors[8], 4); - func_E16C50_8018D5C8(); + func_i3_8018D694(&gActors[1], 0); + func_i3_8018D694(&gActors[2], 1); + func_i3_8018D694(&gActors[6], 2); + func_i3_8018D694(&gActors[7], 3); + func_i3_8018D694(&gActors[8], 4); + func_i3_8018D5C8(); player->pos.x = 0.0f; player->pos.y = 350.0f; player->pos.z = 16000.0f; player->unk_0D0 = 30.0f; if (gTeamShields[1] > 0) { - func_E16C50_8018D804(&gActors[3], 0); + func_i3_8018D804(&gActors[3], 0); } if (gTeamShields[2] > 0) { - func_E16C50_8018D804(&gActors[4], 1); + func_i3_8018D804(&gActors[4], 1); } if (gTeamShields[3] > 0) { - func_E16C50_8018D804(&gActors[5], 2); + func_i3_8018D804(&gActors[5], 2); } gActors[0].fwork[0] = 20.0f; gActors[3].fwork[0] = 30.0f; @@ -1931,7 +2227,7 @@ void func_E16C50_8018DF74(Player* player) { D_80177A48[3] = 0.001f; /* fallthrough */ case 1: - Math_SmoothStepToF(&gActors->obj.pos.y, 0.0f, 0.01f, 10.0f, 0.001f); + Math_SmoothStepToF(&gActors[0].obj.pos.y, 0.0f, 0.01f, 10.0f, 0.001f); if (D_80177A80 < 490) { sp74.x = 0.0f; sp74.y = 0.0f; @@ -2012,25 +2308,25 @@ void func_E16C50_8018DF74(Player* player) { sp5C.x = player->pos.x; sp5C.y = player->pos.y; sp5C.z = player->pos.z; - func_E16C50_8018D920(&sp5C); + func_i3_8018D920(&sp5C); break; case 176: if (gTeamShields[1] > 0) { - func_E16C50_8018D920(&gActors[3].obj.pos); + func_i3_8018D920(&gActors[3].obj.pos); } break; case 187: if (gTeamShields[2] > 0) { - func_E16C50_8018D920(&gActors[4].obj.pos); + func_i3_8018D920(&gActors[4].obj.pos); } break; case 198: if (gTeamShields[3] > 0) { - func_E16C50_8018D920(&gActors[5].obj.pos); + func_i3_8018D920(&gActors[5].obj.pos); } break; case 199: - func_E16C50_8018D4E0(&gActors[1]); + func_i3_8018D4E0(&gActors[1]); break; case 210: func_800BA808(gMsg_ID_7006, RCID_CAIMAN_AREA6); @@ -2087,7 +2383,7 @@ void func_E16C50_8018DF74(Player* player) { Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[1], 50000.0f, 0.001f); } -void func_E16C50_8018EA88(Actor* actor) { +void func_i3_8018EA88(Actor* actor) { Actor_Initialize(actor); actor->obj.status = 2; actor->obj.id = OBJ_ACTOR_195; @@ -2109,7 +2405,7 @@ void func_E16C50_8018EA88(Actor* actor) { Object_SetInfo(&actor->info, actor->obj.id); } -void func_E16C50_8018EB3C(Actor* actor) { +void func_i3_8018EB3C(Actor* actor) { Player* player = &gPlayer[0]; Actor_Initialize(actor); @@ -2126,7 +2422,7 @@ void func_E16C50_8018EB3C(Actor* actor) { Audio_PlaySfx(0x31024059, &actor->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } -void func_E16C50_8018EC38(Actor* actor, s32 arg1) { +void func_i3_8018EC38(Actor* actor, s32 arg1) { Vec3f sp2C[3] = { { -150.0f, 40.0f, 75.0f }, { 150.0f, 40.0f, 150.0f }, @@ -2153,7 +2449,7 @@ void func_E16C50_8018EC38(Actor* actor, s32 arg1) { } #ifdef NON_MATCHING -void func_E16C50_8018ED78(Player* player) { +void func_i3_8018ED78(Player* player) { s32 i; Vec3f spf90; f32 sp8C; @@ -2212,9 +2508,9 @@ void func_E16C50_8018ED78(Player* player) { D_801779C0 = gBosses[0].obj.pos.z + D_80177D20; D_80177A48[0] = 0.04f; if (D_80177A80 == 140) { - func_E16C50_8018EA88(&gActors[4]); - func_E16C50_8018EA88(&gActors[5]); - func_E16C50_8018EA88(&gActors[6]); + func_i3_8018EA88(&gActors[4]); + func_i3_8018EA88(&gActors[5]); + func_i3_8018EA88(&gActors[6]); gActors[4].fwork[4] = 0.5f; } if (D_80177A80 >= 200) { @@ -2271,10 +2567,10 @@ void func_E16C50_8018ED78(Player* player) { player->unk_110 = player->unk_034 = player->unk_12C = player->unk_130 = player->unk_4D8 = 0.0f; D_8015F984 = (D_80177D20 * 0.00004f) + 0.5f; - func_E16C50_8018EC38(&gActors[1], 0); - func_E16C50_8018EC38(&gActors[2], 1); - func_E16C50_8018EC38(&gActors[3], 2); - func_E16C50_8018EB3C(&gActors[0]); + func_i3_8018EC38(&gActors[1], 0); + func_i3_8018EC38(&gActors[2], 1); + func_i3_8018EC38(&gActors[3], 2); + func_i3_8018EB3C(&gActors[0]); D_80177A48[5] = 300.0f; D_80177A48[4] = 0.0f; D_80177A48[9] = 50.0f; @@ -2343,7 +2639,7 @@ void func_E16C50_8018ED78(Player* player) { D_80178358 = 255; D_8017835C = 8; if (D_80178340 == 255) { - D_800D3180[3] = Play_CheckMedalStatus(300) + 1; + D_800D3180[LEVEL_AREA_6] = Play_CheckMedalStatus(300) + 1; for (i = 1; i < 6; i++) { D_80177C38[i] = gTeamShields[i]; D_801778F0[i] = gSavedTeamShields[i]; @@ -2358,7 +2654,7 @@ void func_E16C50_8018ED78(Player* player) { func_8001CA24(0); Audio_KillSfx(&player->unk_460); func_800A6148(); - gNextGameState = 7; + gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; func_80088564(); } @@ -2432,6 +2728,6 @@ void func_E16C50_8018ED78(Player* player) { Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0001f); } #else -void func_E16C50_8018ED78(Player* player); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_E16C50/fox_a6/func_E16C50_8018ED78.s") +void func_i3_8018ED78(Player* player); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018ED78.s") #endif diff --git a/src/overlays/ovl_i3/fox_i3.c b/src/overlays/ovl_i3/fox_i3.c new file mode 100644 index 00000000..e2522168 --- /dev/null +++ b/src/overlays/ovl_i3/fox_i3.c @@ -0,0 +1,7 @@ +#include "global.h" + +static s32 D_i3_801BECA0 = 0; +static s32 D_i3_801C2240; + +void func_i3_80187520(s32 arg0, void* arg1) { +} diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c new file mode 100644 index 00000000..30d92819 --- /dev/null +++ b/src/overlays/ovl_i3/fox_zo.c @@ -0,0 +1,4907 @@ +#include "global.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.599991f, 197.599991f }, { 904.8f, 145.59999f }, { 0.0f, 140.4f } }, +// { +// HITBOX_UNK_2, +// { 40.0f, 0.0f, 0.0f }, +// { { -561.6f, 119.6f }, { 600.6f, 319.8f }, { 338.0f, 104.0f } }, +// }, +// { +// HITBOX_UNK_2, +// { 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.599991f }, { 0.0f, 189.799988f } }, +// { { 26.0f, 754.0f }, { 140.4f, 267.8f }, { 0.0f, 215.799988f } }, +// { { -556.39996f, 260.0f }, { 491.4f, 226.2f }, { 0.0f, 179.4f } }, +// { { -213.2f, 200.2f }, { 473.199982f, 231.4f }, { 613.6f, 187.2f } }, +// { { -213.2f, 200.2f }, { 473.199982f, 231.4f }, { -613.6f, 187.2f } }, +// { { -351.0f, 694.199951f }, { 33.8f, 208.0f }, { 572.0f, 306.8f } }, +// { { -351.0f, 694.199951f }, { 33.8f, 208.0f }, { -572.0f, 306.8f } }, +// { { -896.99994f, 244.4f }, { 863.199951f, 171.599991f }, { 0.0f, 93.6f } }, +// }; + +typedef struct { + f32 id; + Vec3f tilt; + Hitbox b; +} TiltHitbox; + +#define LIMB_DESTROYED 1000 + +#define ZO_HITBOX_COUNT ((s32) (bossZO)->info.hitbox[0]) +#define ZO_HIT_0(bossZO) ((Hitbox*) ((bossZO)->info.hitbox + 1)) +#define ZO_HIT_1(bossZO) ((Hitbox*) (ZO_HIT_0(bossZO) + 1)) +#define ZO_HIT_2(bossZO) ((Hitbox*) (ZO_HIT_1(bossZO) + 1)) +#define ZO_HIT_3(bossZO) ((TiltHitbox*) (ZO_HIT_2(bossZO) + 1)) +#define ZO_HIT_4(bossZO) ((TiltHitbox*) (ZO_HIT_3(bossZO) + 1)) +#define ZO_HIT_5(bossZO) ((Hitbox*) (ZO_HIT_4(bossZO) + 1)) +#define ZO_HIT_6(bossZO) ((Hitbox*) (ZO_HIT_5(bossZO) + 1)) +#define ZO_HIT_7(bossZO) ((Hitbox*) (ZO_HIT_6(bossZO) + 1)) +#define ZO_HIT_8(bossZO, index) ((Hitbox*) ((f32*) (ZO_HIT_7(bossZO) + 1) + 6 * (index))) +#define ZO_HIT_10(bossZO, index) ((Hitbox*) ((f32*) (ZO_HIT_8(bossZO, 0) + 2) + 6 * (index))) +#define ZO_HIT_12(bossZO) ((Hitbox*) (ZO_HIT_10(bossZO, 0) + 2)) + +void func_8007EE68(s32, Vec3f*, Vec3f*, Vec3f*, Vec3f*, f32); +void func_80081BEC(f32, f32, f32, f32, s32); +void func_8008377C(f32, f32, f32, f32, f32); +void func_i3_801A7750(void); +void func_i3_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot); +void func_i3_801989FC(Boss* bossZO); +void func_i3_80198BE8(Boss* bossZO, s32 arg1); +void func_i3_80198ECC(Boss* bossZO); +void func_i3_80198F3C(Boss* bossZO, s32 arg1, s32 arg2); +void func_i3_8019907C(Boss* bossZO); +void func_i3_8019914C(Boss* bossZO, s32 arg1); +void func_i3_801991D0(Boss* bossZO, s32 arg1); +void func_i3_80199394(Boss* bossZO, s32 arg1); +void func_i3_80199470(Boss* bossZO, s32 arg1); +void func_i3_8019962C(Boss* bossZO, f32 arg1); + +extern Gfx D_6002E10[]; +extern Gfx D_6004380[]; +extern Gfx D_6006360[]; +extern Limb* D_600E7D8[]; +extern Gfx D_6013330[]; +extern Gfx D_6017950[]; +extern Gfx D_60181E0[]; +extern AnimationHeader D_6018550; +extern Limb* D_601863C[]; +extern Gfx D_6018660[]; +extern AnimationHeader D_60195EC; +extern Limb* D_6019738[]; +extern AnimationHeader D_601996C; +extern Limb* D_6019E18[]; +extern Gfx D_6019EB0[]; +extern Gfx D_601A340[]; +extern AnimationHeader D_601AA48; +extern Limb* D_601AB14[]; +extern AnimationHeader D_601AFB8; +extern Limb* D_601B184[]; +extern Gfx D_601BCC0[]; +extern Gfx D_601C590[]; +extern Gfx D_601D680[]; +extern AnimationHeader D_601FBC4; +extern Limb* D_601FC90[]; +extern AnimationHeader D_6021ABC; +extern Limb* D_6021B88[]; +extern Gfx D_6023D50[]; +extern Gfx D_6025E60[]; +extern f32 D_602C028[]; +extern Gfx D_60012A0[]; +extern Gfx D_60239E0[]; +extern Gfx D_6023730[]; + +// 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 unk_104; +// /* 272 */ Vec3f unk_110; +// /* 284 */ Vec3f unk_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 unk_1B4; +// /* 448 */ char pad1C0[152]; +// } UnkStruct_1C24E8; /* size = 600 */ + +typedef enum { + /* 0 */ ZO_LIMB_0, + /* 1 */ ZO_LIMB_1, + /* 2 */ ZO_LIMB_2, + /* 3 */ ZO_LIMB_3, + /* 4 */ ZO_LIMB_4, + /* 5 */ ZO_LIMB_5, + /* 6 */ ZO_LIMB_6, + /* 7 */ ZO_LIMB_7, + /* 8 */ ZO_LIMB_8, + /* 9 */ ZO_LIMB_9, + /* 10 */ ZO_LIMB_10, + /* 11 */ ZO_LIMB_11, + /* 12 */ ZO_LIMB_12, + /* 13 */ ZO_LIMB_13, + /* 14 */ ZO_LIMB_14, + /* 15 */ ZO_LIMB_15, + /* 16 */ ZO_LIMB_16, + /* 17 */ ZO_LIMB_17, + /* 18 */ ZO_LIMB_18, + /* 19 */ ZO_LIMB_19, + /* 20 */ ZO_LIMB_20, + /* 21 */ ZO_LIMB_21, + /* 22 */ ZO_LIMB_22, + /* 23 */ ZO_LIMB_23, + /* 24 */ ZO_LIMB_24, + /* 25 */ ZO_LIMB_25, + /* 26 */ ZO_LIMB_26, + /* 27 */ ZO_LIMB_27, + /* 28 */ ZO_LIMB_28, + /* 29 */ ZO_LIMB_29, + /* 30 */ ZO_LIMB_30, + /* 31 */ ZO_LIMB_31, + /* 32 */ ZO_LIMB_32, + /* 33 */ ZO_LIMB_33, + /* 34 */ ZO_LIMB_34, + /* 35 */ ZO_LIMB_35, + /* 36 */ ZO_LIMB_36, + /* 37 */ ZO_LIMB_37, + /* 38 */ ZO_LIMB_38, + /* 39 */ ZO_LIMB_39, + /* 40 */ ZO_LIMB_MAX, +} ZoLimbs; + +typedef enum { + /* 0 */ ZO_BSF_0, + /* 1 */ ZO_BSF_1, + /* 2 */ ZO_BSF_2, + /* 3 */ ZO_BSF_3, + /* 4 */ ZO_BSF_4, + /* 5 */ ZO_BSF_5, + /* 6 */ ZO_BSF_6, + /* 7 */ ZO_BSF_7, + /* 8 */ ZO_BSF_8, + /* 9 */ ZO_BSF_9, + /* 10 */ ZO_BSF_10, + /* 11 */ ZO_BSF_11, + /* 12 */ ZO_BSF_12, + /* 13 */ ZO_BSF_13, + /* 14 */ ZO_BSF_14, + /* 15 */ ZO_BSF_15, + /* 16 */ ZO_BSF_16, + /* 17 */ ZO_BSF_17, + /* 18 */ ZO_BSF_18, + /* 19 */ ZO_BSF_19, + /* 20 */ ZO_BSF_20, + /* 21 */ ZO_BSF_21, + /* 22 */ ZO_BSF_22, + /* 23 */ ZO_BSF_23, + /* 24 */ ZO_BSF_24, + /* 25 */ ZO_BSF_25, + /* 26 */ ZO_BSF_26, + /* 27 */ ZO_BSF_27, + /* 28 */ ZO_BSF_28, + /* 29 */ ZO_BSF_29_X, + /* 30 */ ZO_BSF_29_Y, + /* 31 */ ZO_BSF_29_Z, + /* 32 */ ZO_BSF_32_X, + /* 33 */ ZO_BSF_32_Y, + /* 34 */ ZO_BSF_32_Z, + /* 35 */ ZO_BSF_35, + /* 36 */ ZO_BSF_36, + /* 37 */ ZO_BSF_37_X, + /* 38 */ ZO_BSF_37_Y, + /* 39 */ ZO_BSF_37_Z, + /* 40 */ ZO_BSF_40_X, + /* 41 */ ZO_BSF_40_Y, + /* 42 */ ZO_BSF_40_Z, + /* 43 */ ZO_BSF_43_X, + /* 44 */ ZO_BSF_43_Y, + /* 45 */ ZO_BSF_43_Z, + /* 46 */ ZO_BSF_46_X, + /* 47 */ ZO_BSF_46_Y, + /* 48 */ ZO_BSF_46_Z, + /* 49 */ ZO_BSF_49_X, + /* 50 */ ZO_BSF_49_Y, + /* 51 */ ZO_BSF_49_Z, + /* 52 */ ZO_BSF_52_X, + /* 53 */ ZO_BSF_52_Y, + /* 54 */ ZO_BSF_52_Z, + /* 55 */ ZO_BSF_55_X, + /* 56 */ ZO_BSF_55_Y, + /* 57 */ ZO_BSF_55_Z, + /* 58 */ ZO_BSF_58, + /* 59 */ ZO_BSF_59, + /* 60 */ ZO_BSF_60_X, + /* 61 */ ZO_BSF_60_Y, + /* 62 */ ZO_BSF_60_Z, + /* 63 */ ZO_BSF_63, + /* 64 */ ZO_BSF_64, + /* 65 */ ZO_BSF_65_X, + /* 66 */ ZO_BSF_65_Y, + /* 67 */ ZO_BSF_65_Z, + /* 68 */ ZO_BSF_68_X, + /* 69 */ ZO_BSF_68_Y, + /* 70 */ ZO_BSF_68_Z, + /* 71 */ ZO_BSF_71_X, + /* 72 */ ZO_BSF_71_Y, + /* 73 */ ZO_BSF_71_Z, + /* 74 */ ZO_BSF_74, + /* 75 */ ZO_BSF_75, + /* 76 */ ZO_BSF_76, + /* 77 */ ZO_BSF_77, + /* 78 */ ZO_BSF_78, + /* 79 */ ZO_BSF_79, + /* 80 */ ZO_BSF_80, + /* 81 */ ZO_BSF_81, + /* 82 */ ZO_BSF_82, + /* 83 */ ZO_BSF_83, + /* 84 */ ZO_BSF_84, + /* 85 */ ZO_BSF_85, + /* 86 */ ZO_BSF_86, + /* 87 */ ZO_BSF_87, + /* 88 */ ZO_BSF_88, + /* 89 */ ZO_BSF_89, + /* 90 */ ZO_BSF_90, + /* 91 */ ZO_BSF_91, + /* 92 */ ZO_BSF_92, + /* 93 */ ZO_BSF_93_X, + /* 94 */ ZO_BSF_93_Y, + /* 95 */ ZO_BSF_93_Z, + /* 96 */ ZO_BSF_96_X, + /* 97 */ ZO_BSF_96_Y, + /* 98 */ ZO_BSF_96_Z, + /* 99 */ ZO_BSF_99_X, + /* 100 */ ZO_BSF_99_Y, + /* 101 */ ZO_BSF_99_Z, + /* 102 */ ZO_BSF_102_X, + /* 103 */ ZO_BSF_102_Y, + /* 104 */ ZO_BSF_102_Z, + /* 105 */ ZO_BSF_105, + /* 106 */ ZO_BSF_106_X, + /* 107 */ ZO_BSF_106_Y, + /* 108 */ ZO_BSF_106_Z, + /* 109 */ ZO_BSF_109_X, + /* 110 */ ZO_BSF_109_Y, + /* 111 */ ZO_BSF_109_Z, + /* 112 */ ZO_BSF_112, + /* 113 */ ZO_BSF_113, + /* 114 */ ZO_BSF_114, + /* 115 */ ZO_BSF_115, + /* 116 */ ZO_BSF_116, + /* 117 */ ZO_BSF_117, + /* 118 */ ZO_BSF_118, + /* 119 */ ZO_BSF_119, + /* 120 */ ZO_BSF_120, + /* 121 */ ZO_BSF_121, + /* 122 */ ZO_BSF_122, + /* 123 */ ZO_BSF_123, + /* 124 */ ZO_BSF_124, + /* 125 */ ZO_BSF_125, + /* 126 */ ZO_BSF_126, + /* 127 */ ZO_BSF_127, + /* 128 */ ZO_BSF_128, + /* 129 */ ZO_BSF_129, + /* 130 */ ZO_BSF_130, + /* 131 */ ZO_BSF_131, + /* 132 */ ZO_BSF_132, + /* 133 */ ZO_BSF_133, + /* 134 */ ZO_BSF_134, + /* 135 */ ZO_BSF_135, + /* 136 */ ZO_BSF_136, + /* 137 */ ZO_BSF_137, + /* 138 */ ZO_BSF_138, + /* 139 */ ZO_BSF_139, + /* 140 */ ZO_BSF_140, + /* 141 */ ZO_BSF_141, + /* 142 */ ZO_BSF_142, + /* 143 */ ZO_BSF_143, + /* 144 */ ZO_BSF_144, + /* 145 */ ZO_BSF_145, + /* 146 */ ZO_BSF_146, + /* 147 */ ZO_BSF_147, + /* 148 */ ZO_BSF_148, + /* 149 */ ZO_BSF_149, + /* 150 */ ZO_BSF_MAX, +} BossZObsfwork; + +typedef enum { + /* 0 */ ZO_BSS_0, + /* 1 */ ZO_BSS_1, + /* 2 */ ZO_BSS_2, + /* 3 */ ZO_BSS_3, + /* 4 */ ZO_BSS_4, + /* 5 */ ZO_BSS_5, + /* 6 */ ZO_BSS_6, + /* 7 */ ZO_BSS_7, + /* 8 */ ZO_BSS_8, + /* 9 */ ZO_BSS_9, + /* 10 */ ZO_BSS_10, + /* 11 */ ZO_BSS_11, + /* 12 */ ZO_BSS_12, + /* 13 */ ZO_BSS_13, + /* 14 */ ZO_BSS_14, + /* 15 */ ZO_BSS_15, + /* 16 */ ZO_BSS_16, + /* 17 */ ZO_BSS_17, + /* 18 */ ZO_BSS_18, + /* 19 */ ZO_BSS_19, + /* 20 */ ZO_BSS_20, + /* 21 */ ZO_BSS_21, + /* 22 */ ZO_BSS_22, + /* 23 */ ZO_BSS_23, + /* 24 */ ZO_BSS_24, + /* 25 */ ZO_BSS_25, + /* 26 */ ZO_BSS_26, + /* 27 */ ZO_BSS_27, + /* 28 */ ZO_BSS_28, + /* 29 */ ZO_BSS_29, + /* 30 */ ZO_BSS_30, + /* 31 */ ZO_BSS_31, + /* 32 */ ZO_BSS_32, + /* 33 */ ZO_BSS_33, + /* 34 */ ZO_BSS_34, + /* 35 */ ZO_BSS_35, + /* 36 */ ZO_BSS_36, + /* 37 */ ZO_BSS_37, + /* 38 */ ZO_BSS_38, + /* 39 */ ZO_BSS_39, + /* 40 */ ZO_BSS_40, + /* 41 */ ZO_BSS_41, + /* 42 */ ZO_BSS_42, + /* 43 */ ZO_BSS_43, + /* 44 */ ZO_BSS_44, + /* 45 */ ZO_BSS_45, + /* 46 */ ZO_BSS_46, + /* 47 */ ZO_BSS_47, + /* 48 */ ZO_BSS_48, + /* 49 */ ZO_BSS_49, + /* 50 */ ZO_BSS_50, + /* 51 */ ZO_BSS_51, + /* 52 */ ZO_BSS_52, + /* 53 */ ZO_BSS_53, + /* 54 */ ZO_BSS_54, + /* 55 */ ZO_BSS_55, + /* 56 */ ZO_BSS_56, + /* 57 */ ZO_BSS_57, + /* 58 */ ZO_BSS_58, + /* 59 */ ZO_BSS_59, + /* 60 */ ZO_BSS_60, + /* 61 */ ZO_BSS_61, + /* 62 */ ZO_BSS_62, + /* 63 */ ZO_BSS_63, + /* 64 */ ZO_BSS_64, + /* 65 */ ZO_BSS_65, + /* 66 */ ZO_BSS_66, + /* 67 */ ZO_BSS_67, + /* 68 */ ZO_BSS_68, + /* 69 */ ZO_BSS_69, + /* 70 */ ZO_BSS_MAX, +} BossZObsswork; + +typedef enum { + /* 0 */ ZO_SWK_0, + /* 1 */ ZO_SWK_1, + /* 2 */ ZO_SWK_2, + /* 3 */ ZO_SWK_3, + /* 4 */ ZO_SWK_4, + /* 5 */ ZO_SWK_5, + /* 6 */ ZO_SWK_6, + /* 7 */ ZO_SWK_7, + /* 8 */ ZO_SWK_8, + /* 9 */ ZO_SWK_9, + /* 10 */ ZO_SWK_10, + /* 11 */ ZO_SWK_11, + /* 12 */ ZO_SWK_12, + /* 13 */ ZO_SWK_13, + /* 14 */ ZO_SWK_14, + /* 15 */ ZO_SWK_15, + /* 16 */ ZO_SWK_16, + /* 17 */ ZO_SWK_17, + /* 18 */ ZO_SWK_18, + /* 19 */ ZO_SWK_19, + /* 20 */ ZO_SWK_20, + /* 21 */ ZO_SWK_21, + /* 22 */ ZO_SWK_22, + /* 23 */ ZO_SWK_23, + /* 24 */ ZO_SWK_24, + /* 25 */ ZO_SWK_25, + /* 26 */ ZO_SWK_26, + /* 27 */ ZO_SWK_27, + /* 28 */ ZO_SWK_28, + /* 29 */ ZO_SWK_29, + /* 30 */ ZO_SWK_30, + /* 31 */ ZO_SWK_31, + /* 32 */ ZO_SWK_32, + /* 33 */ ZO_SWK_33, + /* 34 */ ZO_SWK_34, + /* 35 */ ZO_SWK_35, + /* 36 */ ZO_SWK_36, + /* 37 */ ZO_SWK_37, + /* 38 */ ZO_SWK_38, + /* 39 */ ZO_SWK_39, + /* 40 */ ZO_SWK_MAX, +} BossZOswork; + +typedef enum { + /* 0 */ ZO_FWK_0, + /* 1 */ ZO_FWK_1, + /* 2 */ ZO_FWK_2, + /* 3 */ ZO_FWK_3, + /* 4 */ ZO_FWK_4, + /* 5 */ ZO_FWK_5, + /* 6 */ ZO_FWK_6, + /* 7 */ ZO_FWK_7, + /* 8 */ ZO_FWK_8, + /* 9 */ ZO_FWK_9, + /* 10 */ ZO_FWK_10, + /* 11 */ ZO_FWK_11, + /* 12 */ ZO_FWK_12, + /* 13 */ ZO_FWK_13, + /* 14 */ ZO_FWK_14, + /* 15 */ ZO_FWK_15, + /* 16 */ ZO_FWK_16, + /* 17 */ ZO_FWK_17, + /* 18 */ ZO_FWK_18, + /* 19 */ ZO_FWK_19, + /* 20 */ ZO_FWK_20, + /* 21 */ ZO_FWK_21, + /* 22 */ ZO_FWK_22, + /* 23 */ ZO_FWK_23, + /* 24 */ ZO_FWK_24, + /* 25 */ ZO_FWK_25, + /* 26 */ ZO_FWK_26, + /* 27 */ ZO_FWK_27, + /* 28 */ ZO_FWK_28, + /* 29 */ ZO_FWK_29, + /* 30 */ ZO_FWK_30, + /* 31 */ ZO_FWK_31, + /* 32 */ ZO_FWK_32, + /* 33 */ ZO_FWK_33, + /* 34 */ ZO_FWK_34, + /* 35 */ ZO_FWK_35, + /* 36 */ ZO_FWK_36, + /* 37 */ ZO_FWK_37, + /* 38 */ ZO_FWK_38, + /* 39 */ ZO_FWK_39, + /* 40 */ ZO_FWK_40, + /* 41 */ ZO_FWK_41, + /* 42 */ ZO_FWK_42, + /* 43 */ ZO_FWK_43, + /* 44 */ ZO_FWK_44, + /* 45 */ ZO_FWK_45, + /* 46 */ ZO_FWK_46, + /* 47 */ ZO_FWK_47, + /* 48 */ ZO_FWK_48, + /* 49 */ ZO_FWK_49, + /* 50 */ ZO_FWK_MAX, +} BossZOfwork; + +typedef enum { + /* 0 */ ZO_VWK_0, + /* 1 */ ZO_VWK_1, + /* 2 */ ZO_VWK_2, + /* 3 */ ZO_VWK_3, + /* 4 */ ZO_VWK_4, + /* 5 */ ZO_VWK_5, + /* 6 */ ZO_VWK_6, + /* 7 */ ZO_VWK_7, + /* 8 */ ZO_VWK_8, + /* 9 */ ZO_VWK_9, + /* 10 */ ZO_VWK_10, + /* 11 */ ZO_VWK_11, + /* 12 */ ZO_VWK_12, + /* 13 */ ZO_VWK_13, + /* 14 */ ZO_VWK_14, + /* 15 */ ZO_VWK_15, + /* 16 */ ZO_VWK_16, + /* 17 */ ZO_VWK_17, + /* 18 */ ZO_VWK_18, + /* 19 */ ZO_VWK_19, + /* 20 */ ZO_VWK_20, + /* 21 */ ZO_VWK_21, + /* 22 */ ZO_VWK_22, + /* 23 */ ZO_VWK_23, + /* 24 */ ZO_VWK_24, + /* 25 */ ZO_VWK_25, + /* 26 */ ZO_VWK_26, + /* 27 */ ZO_VWK_27, + /* 28 */ ZO_VWK_28, + /* 29 */ ZO_VWK_29, + /* 30 */ ZO_VWK_30, + /* 31 */ ZO_VWK_31, + /* 32 */ ZO_VWK_32, + /* 33 */ ZO_VWK_33, + /* 34 */ ZO_VWK_34, + /* 35 */ ZO_VWK_35, + /* 36 */ ZO_VWK_36, + /* 37 */ ZO_VWK_37, + /* 38 */ ZO_VWK_38, + /* 39 */ ZO_VWK_39, + /* 40 */ ZO_VWK_40, + /* 41 */ ZO_VWK_41, + /* 42 */ ZO_VWK_42, + /* 43 */ ZO_VWK_43, + /* 44 */ ZO_VWK_44, + /* 45 */ ZO_VWK_45, + /* 46 */ ZO_VWK_46, + /* 47 */ ZO_VWK_47, + /* 48 */ ZO_VWK_48, + /* 49 */ ZO_VWK_49, + /* 50 */ ZO_VWK_MAX, +} BossZOvwork; + +s32 sZoLimbTimers[ZO_LIMB_MAX]; +s32 sZoSwork[ZO_BSS_MAX]; +f32 sZoFwork[ZO_BSF_MAX]; + +void func_i3_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 = + Math_Atan2F(gPlayer[0].camEye.x - actor->obj.pos.x, gPlayer[0].camEye.z - (actor->obj.pos.z + D_80177D20)) * + 180.0f / M_PI; + temp = + sqrtf(SQ(gPlayer[0].camEye.z - (actor->obj.pos.z + D_80177D20)) + SQ(gPlayer[0].camEye.x - actor->obj.pos.x)); + actor->obj.rot.x = -Math_Atan2F(gPlayer[0].camEye.y - actor->obj.pos.y, temp) * 180.0f / M_PI; +} + +void func_i3_80190028(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 arg6, f32 scale, s32 arg8, + s32 arg9) { + Actor_Initialize(actor); + actor->obj.status = 2; + actor->obj.id = OBJ_ACTOR_189; + actor->unk_0B8 = arg6; + actor->scale = scale; + actor->unk_048 = arg9; + 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->gravity = 0.5f; + + Object_SetInfo(&actor->info, actor->obj.id); +} + +void func_i3_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--) { + if (gActors[i].obj.status == 0) { + func_i3_80190028(&gActors[i], pos, rot, xVel, yVel, zVel, arg6, scale, arg8, arg9); + break; + } + } +} + +s32 func_i3_8019019C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + GSGM_BACK(); + if ((limbIndex >= 4) && (limbIndex < 10)) { + GCGM_BACK(); + } + return false; +} + +void func_i3_80190204(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; + Actor* this = thisx; + + if (this->unk_0B8 == 1) { + switch (limbIndex) { + case 0: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); + break; + case 1: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[12]); + break; + case 2: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[13]); + break; + case 3: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); + break; + case 4: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); + break; + case 5: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); + break; + case 6: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[6]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); + break; + case 7: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[7]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[18]); + break; + case 8: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[8]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[19]); + break; + case 9: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[9]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[20]); + break; + case 10: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[10]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[21]); + break; + } + } +} + +void func_i3_80190430(Actor* actor) { + Vec3f sp30[30]; + + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Animation_GetFrameData(&D_600E5EC, actor->unk_0B6, sp30); + Animation_DrawSkeleton(3, D_600E7D8, sp30, func_i3_8019019C, func_i3_80190204, actor, gCalcMatrix); +} + +void func_i3_801904CC(Actor* actor) { + Vec3f spA4; + Vec3f sp98; + s32 i; + + switch (actor->unk_0B8) { + case 0: + actor->unk_0CE = 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); + 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->unk_0B8 = 5; + break; + case 1: + for (i = 0; i < 11; i++) { + func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 11], (Rand_ZeroOne() - 0.5f) * 20.0f, + Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 41, actor->scale, 200, i); + } + actor->unk_044 = 0; + func_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 4.0f); + func_8007A6F0(&actor->obj.pos, 0x29018036); + break; + } + actor->unk_0B6++; + if (Animation_GetFrameCount(&D_600E5EC) < actor->unk_0B6) { + actor->unk_0B6 = 0; + } + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + if (actor->unk_0B8 > 0) { + actor->timer_0C6 = 15; + actor->unk_0CE -= actor->unk_0D6; + Audio_PlaySfx(0x29033037, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + if (actor->unk_0CE <= 0) { + actor->unk_0CE = 0; + actor->unk_0B8 = 1; + } + } + } +} + +void func_i3_80190790(Actor* actor) { + s32 pad[2]; + f32 temp1; + PosRot* temp2; + Vec3f sp44; + Vec3f sp38; + s32 i; + Actor* sp30; + + actor->unk_04E++; + if (actor->unk_04E >= 200) { + actor->unk_04E = 0; + } + actor->fwork[0] += 4.0f; + actor->vel.y = __sinf(actor->fwork[0] * M_DTOR) * 20.0f; + actor->unk_0F4.x = -actor->vel.y * 2.5f; + actor->fwork[1] += 5.0f; + actor->unk_0F4.z = __sinf(actor->fwork[1] * M_DTOR) * 30.0f; + for (i = 0, sp30 = gActors; i < 60; i++, sp30++) { + if ((sp30->obj.status == 2) && (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)); + 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 = 0; + actor->iwork[0]++; + } + break; + } + } + Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); + 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_801782C4[actor->unk_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; +} + +void func_i3_80190A00(Actor* actor) { + f32 sp2C; + s32 sp28; + + if ((actor->timer_0C0 == 0) && + func_800A73E4(&sp2C, &sp28, actor->obj.pos.x, actor->obj.pos.y - 50.0f, actor->obj.pos.z)) { + func_8008377C(actor->obj.pos.x, sp2C, actor->obj.pos.z + 150.0f, 0.0f, 1.7f); + if (actor->vel.y >= 0.0f) { + Audio_PlaySfx(0x1983201A, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x19832019, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + actor->timer_0C0 = 30; + } + func_i3_80190790(actor); + if (actor->unk_0D0 != 0) { + actor->unk_0D0 = 0; + Audio_PlaySfx(0x29121007, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } +} + +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] = { + 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_60012A0, D_60239E0, D_6023730 }; + +void func_i3_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_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_SetGfxMtx(&gMasterDisp); + RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + if (arg7 != 0) { + RCP_SetupDL_64(); + GPC(40, 40, 255, 255); + } + GDL(D_i3_801BF5A8[arg6]); + Matrix_Pop(&gGfxMatrix); +} + +typedef struct { + f32 count; + Hitbox boxes[1]; +} JntHitbox; + +void func_i3_80190D0C(Actor* actor) { + Hitbox* var_s2 = (((JntHitbox*) SEGMENTED_TO_VIRTUAL(D_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->unk_04E) % 200; + temp_s0 = &D_801782C4[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; + func_i3_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_80177854 != 100) { + Math_SmoothStepToF(&temp_s0->pos.y, actor->fwork[2], 1.0f, 10.0f, 0.0f); + } + } +} + +void func_i3_80190F08(Actor* actor) { + func_i3_80190D0C(actor); +} + +void func_i3_80190F28(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; + Actor* this = thisx; + + if (this->unk_0B8 == 3) { + switch (limbIndex) { + case 0: + Matrix_MultVec3f(gCalcMatrix, &sp2C, this->vwork); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[3]); + return; + case 1: + Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[1]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[4]); + return; + case 2: + Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[5]); + break; + } + } +} + +void func_i3_80191010(Actor* actor) { + Vec3f sp8C; + Vec3f sp80; + f32 sp7C; + s32 i; + f32 var_fs0; + s32 sp70; + + switch (actor->unk_0B8) { + case 0: + actor->fwork[3] = actor->obj.rot.x; + actor->fwork[1] = (Rand_ZeroOne() - 0.5f) * 1000.0f; + actor->unk_0CE = 10; + actor->timer_0BC = 30; + actor->scale = 5.0f; + actor->gravity = 1.0f; + actor->obj.rot.x = 315.0f; + actor->unk_0B8++; + break; + case 1: + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + 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->unk_0B8++; + break; + case 2: + if (actor->timer_0BC == 0) { + actor->obj.rot.z += 30.0f; + if (actor->unk_0B6 > 0) { + actor->unk_0B6--; + } + } else { + if (actor->unk_0B6 < Animation_GetFrameCount(&D_601AA48)) { + actor->unk_0B6++; + } + } + var_fs0 = 5.0f; + if (actor->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->sfxPos); + } + if (func_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_PlaySfx(0x1983201A, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x19832019, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + actor->timer_0C0 = 10; + actor->iwork[0] += 1; + func_8008377C(actor->obj.pos.x, sp7C, actor->obj.pos.z, 0.0f, 0.7f); + } + break; + case 3: + for (i = 0; i < 3; i++) { + func_i3_801900FC(&actor->vwork[i], &actor->vwork[3 + i], (Rand_ZeroOne() - 0.5f) * 20.0f, + Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 42, actor->scale, 200, i); + } + actor->unk_044 = 4; + func_80066254(actor); + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); + Audio_PlaySfx(0x2903A008, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007A6F0(&actor->obj.pos, 0x29018036); + break; + } + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + actor->timer_0C6 = 15; + actor->unk_0CE -= actor->unk_0D6; + if (actor->unk_0CE <= 0) { + actor->unk_0CE = 0; + actor->unk_0B8 = 3; + } + } +} + +void func_i3_801914C4(Actor* actor) { + Vec3f sp38[20]; + + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + GCGM_BACK(); + Animation_GetFrameData(&D_601AA48, actor->unk_0B6, sp38); + Animation_DrawSkeleton(3, D_601AB14, sp38, NULL, func_i3_80190F28, actor, gCalcMatrix); + GSGM_BACK(); +} + +void func_i3_801915A4(Actor* actor) { + s32 i; + Actor* var_a2; + + actor->unk_0CE = 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 == 0) { + Actor_Initialize(var_a2); + var_a2->obj.status = 1; + 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); + actor->iwork[0] = i; + break; + } + } + if (i >= 60) { + var_a2->obj.status = 0; + } +} + +void func_i3_80191680(Actor* actor) { + f32 sp64; + f32 sp60; + f32 sp5C; + f32 sp58; + f32 sp54; + Vec3f sp48; + Vec3f sp3C; + Actor* sp38; + + if (actor->obj.pos.z < actor->fwork[0]) { + actor->unk_0B8 = 1; + } + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + actor->timer_0C6 = 15; + actor->unk_0CE -= actor->unk_0D6; + Audio_PlaySfx(0x29033037, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + if (actor->unk_0CE <= 0) { + actor->unk_0CE = actor->unk_044 = 0; + func_80066254(actor); + actor->unk_0B8 = 1; + Audio_PlaySfx(0x29018036, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + } + actor->unk_0B6++; + if (actor->unk_0B6 >= Animation_GetFrameCount(&D_40057AC)) { + actor->unk_0B6 = 0; + } + if (actor->timer_0BC == 0) { + actor->timer_0BC = 30; + actor->fwork[1] = gPlayer[0].pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f); + actor->fwork[2] = gPlayer[0].pos.y + 50.0f + (Rand_ZeroOne() * 200.0f); + actor->fwork[3] = gPlayer[0].unk_138 - 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; + sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C)); + sp38 = &gActors[actor->iwork[0]]; + if ((actor->unk_0B8 != 0) || (sp38->obj.status == 0)) { + actor->timer_0CA[0] = 0; + actor->info.unk_1C = 0.0f; + sp54 += 180.0f; + if (sp54 > 360.0f) { + sp54 -= 360.0f; + } + if (actor->timer_0C6 == 0) { + actor->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); + 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, 0); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + 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 (sp38->iwork[0] == (actor->index + 1)) { + if (actor->unk_0B8 == 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 (!(gFrameCount & 0xF) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 100.0f)) { + func_80081BEC(actor->fwork[4], actor->fwork[5], actor->fwork[6], 1.0f, 0); + } + } else { + sp38->vel.y -= 1.0f; + } + } +} + +void func_i3_80191B4C(Actor* actor) { + Animation_GetFrameData(&D_40057AC, actor->unk_0B6, actor->vwork); + Animation_DrawSkeleton(1, D_40058B8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); +} + +void func_i3_80191BB8(Actor* actor) { +} + +void func_i3_80191BC4(Actor* actor) { + f32 sp4C; + s32 sp48; + + if ((actor->vel.y != 0.0f) && (actor->iwork[1] == 0)) { + actor->iwork[1] = 1; + Audio_PlaySfx(0x2900201D, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + if (func_800A73E4(&sp4C, &sp48, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && (actor->unk_0B8 == 0)) { + func_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 20.0f, 7); + func_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->sfxPos); + actor->iwork[0] = 0; + func_8007A6F0(&actor->obj.pos, 0x1903001D); + } + actor->fwork[0] += 10.0f; + func_i3_8018FF50(actor); + if (!(gFrameCount & 1)) { + func_8007C484(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x, + ((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.y, + ((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, + (Rand_ZeroOne() * 0.05f) + 0.05f, 0); + } +} + +void func_i3_80191DB0(Actor* actor) { + RCP_SetupDL_40(); + GDL(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); +} + +void func_i3_80191E94(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; + Actor* this = thisx; + + if (this->unk_0B8 == 4) { + switch (limbIndex) { + case 1: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[6]); + return; + case 2: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[7]); + return; + case 3: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[8]); + return; + case 4: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); + return; + case 8: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[10]); + return; + case 9: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); + break; + } + } +} + +void func_i3_80191FFC(Actor* actor) { + Vec3f sp30[20]; + + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Animation_GetFrameData(&D_60195EC, actor->unk_0B6, sp30); + Animation_DrawSkeleton(3, D_6019738, sp30, NULL, func_i3_80191E94, actor, gCalcMatrix); +} + +void func_i3_80192094(Actor* actor) { + s32 i; + f32 spB8; + f32 temp_fs0; + f32 spB0; + f32 temp_fs1; + f32 temp_fs0_2; + f32 spA4; + s32 spA0; + Vec3f sp94; + Vec3f sp88; + 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].unk_138 - 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) && + (func_800A73E4(&spB8, &spA0, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { + func_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_PlaySfx(0x1983201A, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x19832019, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + } + switch (actor->unk_0B8) { + case 0: + actor->unk_0B8++; + actor->vel.y = 20.0f; + actor->scale = 2.0f; + break; + case 1: + actor->unk_0B6++; + if (actor->unk_0B6 >= Animation_GetFrameCount(&D_60195EC)) { + actor->unk_0B6 = 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->sfxPos); + } + } + if (actor->unk_0B6 == 25) { + actor->fwork[2] = 0.0f; + actor->vel.y = 0.0f; + actor->iwork[1] = 0; + actor->fwork[3] = 150.0f; + actor->unk_0B8++; + } + break; + case 2: + if (actor->iwork[1] >= 21) { + actor->iwork[0] = 0; + actor->unk_0B8 = 3; + actor->vel.y = 50.0f; + if (actor->unk_0B6 == 51) { + actor->unk_0B8 = 1; + actor->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, 0); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, actor->fwork[2] * M_DTOR, 1); + sp70.x = 0.0f; + sp70.y = actor->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; + sp70.x = 0.0f; + sp70.y = 0.0f; + sp70.z = 100.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp88); + func_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]++; + } + 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->unk_0B6++; + if (actor->unk_0B6 == 51) { + actor->fwork[2] = 0.0f; + actor->vel.y = 0.0f; + actor->iwork[1] = 0; + actor->unk_0B8 = 2; + actor->fwork[3] = 150.0f; + } + break; + case 4: + for (i = 0; i < 6; i++) { + func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 6], (Rand_ZeroOne() - 0.5f) * 40.0f, + Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 20.0f, 44, actor->scale, 200, i); + } + actor->unk_044 = 5; + func_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); + break; + } + if ((actor->unk_0D0 != 0) && (actor->unk_0B8 < 3)) { + if (actor->unk_0D0 != 1) { + func_80077240(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5); + gHitCount += 6; + D_80177850 = 15; + if (actor->unk_0D0 && actor->unk_0D0) {} + actor->unk_0B8 = 4; + } + actor->unk_0D0 = 0; + } +} + +void func_i3_801926F4(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; + Actor* this = thisx; + + if (this->unk_0B8 == 2) { + switch (limbIndex) { + case 1: + Matrix_MultVec3f(gCalcMatrix, &sp24, this->vwork); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[5]); + return; + case 2: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[6]); + return; + case 3: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[7]); + return; + case 4: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[8]); + return; + case 5: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); + break; + } + } +} + +void func_i3_80192834(Actor* actor) { + Vec3f sp84; + Vec3f sp78; + f32 sp74; + s32 sp70; + s32 i; + + switch (actor->unk_0B8) { + case 0: + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, 5.497787f, 1); + 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->unk_0CE = 10; + actor->unk_0B8++; + 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; + } + if (actor->obj.pos.y < -50.0f) { + Object_Kill(&actor->obj, &actor->sfxPos); + } + if (actor->vel.y > 0.0f) { + if (actor->unk_0B6 < 17) { + actor->unk_0B6++; + } + } else { + if (actor->unk_0B6 < Animation_GetFrameCount(&D_6021ABC)) { + actor->unk_0B6++; + } + } + actor->obj.rot.x += 20.0f; + actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f); + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + actor->unk_0CE -= actor->unk_0D6; + if (actor->unk_0CE <= 0) { + actor->unk_0CE = 0; + actor->unk_0B8++; + } + } + break; + case 2: + for (i = 0; i < 5; i++) { + func_i3_801900FC(&actor->vwork[i], &actor->vwork[5 + i], (Rand_ZeroOne() - 0.5f) * 20.0f, + Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 43, actor->scale, 200, i); + } + actor->unk_044 = 0; + func_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); + func_8007A6F0(&actor->obj.pos, 0x29018036); + break; + } + if ((actor->iwork[0] == 0) && + (func_800A73E4(&sp74, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { + actor->iwork[0]++; + func_8008377C(actor->obj.pos.x, sp74, actor->obj.pos.z, 0.0f, 0.7f); + if (actor->vel.y >= 0.0f) { + Audio_PlaySfx(0x1983201A, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x19832019, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + } +} + +void func_i3_80192C18(Actor* actor) { + Vec3f sp28[20]; + + Animation_GetFrameData(&D_6021ABC, actor->unk_0B6, sp28); + Animation_DrawSkeleton(3, D_6021B88, sp28, NULL, func_i3_801926F4, actor, gCalcMatrix); +} + +void func_i3_80192C84(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; + Actor* this = thisx; + + if (this->unk_0B8 == 3) { + switch (limbIndex) { + case 1: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); + return; + case 2: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[10]); + return; + case 3: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); + return; + case 4: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[12]); + return; + case 5: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[13]); + return; + case 6: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); + return; + case 7: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[6]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); + return; + case 8: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[7]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); + return; + case 13: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[8]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); + break; + } + } +} + +void func_i3_80192E64(Actor* actor) { + s32 i; + Vec3f sp80; + Vec3f sp74; + f32 sp70; + s32 sp6C; + + switch (actor->unk_0B8) { + case 0: + actor->obj.pos.y = 380.0f; + actor->unk_0B8 = 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->unk_0B6++; + if (actor->unk_0B6 == 5) { + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + 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->unk_0B8 = 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->unk_0B6 < Animation_GetFrameCount(&D_601AFB8)) { + actor->unk_0B6++; + } else { + actor->unk_0B6 = 0; + actor->timer_0BC = 30; + actor->unk_0B8 = 1; + } + break; + case 3: + for (i = 0; i < 9; i++) { + func_i3_801900FC(&actor->vwork[i], &actor->vwork[9 + i], (Rand_ZeroOne() - 0.5f) * 40.0f, + Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 20.0f, 59, actor->scale, 200, i); + } + actor->unk_044 = 7; + func_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + func_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->unk_0B8 != 0) && (actor->unk_0B8 != 3)) { + func_80077240(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); + gHitCount += 3; + D_80177850 = 15; + if ((actor->unk_0D0) && (actor->unk_0D0)) {} // fake + actor->unk_0B8 = 3; + } + } else { + Audio_PlaySfx(0x29121007, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + actor->unk_0D0 = 0; + } + if (func_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); + } +} + +void func_i3_80193240(Actor* actor) { + Vec3f sp28[30]; + + Animation_GetFrameData(&D_601AFB8, actor->unk_0B6, sp28); + Animation_DrawSkeleton(2, D_601B184, sp28, NULL, func_i3_80192C84, actor, gCalcMatrix); +} + +s32 D_i3_801BF5F0[6] = { + 20, 40, 20, 20, 10, 10, +}; +f32 D_i3_801BF608[6] = { + -45.0f, 0.0f, -45.0f, 0.0f, -45.0f, 0.0f, +}; + +void func_i3_801932AC(Boss* bossZO) { + s32 i; + + D_80178284 = 1; + gBossFrameCount = 0; + bossZO->vel.z = -40.0f; + for (i = 0; i < ZO_LIMB_MAX; i++) { + sZoLimbTimers[i] = 0; + } + for (i = 0; i < ZO_BSS_MAX; i++) { + sZoSwork[i] = 0; + } + for (i = 0; i < ZO_BSF_MAX; i++) { + sZoFwork[i] = 0.0f; + } + sZoFwork[ZO_BSF_32_X] = sZoFwork[ZO_BSF_99_X] = sZoFwork[ZO_BSF_60_X] = sZoFwork[ZO_BSF_52_X] = + 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_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_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; + + sZoSwork[ZO_BSS_8] = 40; + sZoSwork[ZO_BSS_9] = 40; + sZoSwork[ZO_BSS_10] = 40; + 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; + + sZoFwork[ZO_BSF_28] = -2600.0f; + sZoFwork[ZO_BSF_1] = -130.0f; + sZoFwork[ZO_BSF_11] = 130.0f; + + sZoFwork[ZO_BSF_26] = 30.0f; + sZoFwork[ZO_BSF_23] = 30.0f; + + sZoSwork[ZO_BSS_43] = 255; + sZoSwork[ZO_BSS_44] = 255; + sZoFwork[ZO_BSF_25] = 0.0f; + bossZO->timer_050 = 200; + bossZO->timer_052 = 280; + sZoSwork[ZO_BSS_37] = 255; + for (i = 0; i < 2; i++) { + Actor_Initialize(&gActors[i]); + gActors[i].obj.status = 1; + 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; + Object_SetInfo(&gActors[i].info, gActors[i].obj.id); + } + func_800182F4(0x102800FF); + func_800182F4(0x112800FF); + + 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; +} + +void func_i3_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; + + 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_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + func_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); +} + +void func_i3_801937D8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { + Vec3f sp2C; + Vec3f sp20; + + Effect_Initialize(effect); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0); + 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 = 1; + 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_ZeroOne() - 0.5f) * 20.0f; + effect->unk_78 = 100; + effect->unk_7A = 14; + effect->obj.rot.z = Rand_ZeroOne() * 360.0f; + Object_SetInfo(&effect->info, effect->obj.id); +} + +void func_i3_80193908(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { + if (gEffects[i].obj.status == 0) { + func_i3_801937D8(&gEffects[i], xPos, yPos, zPos, yRot); + break; + } + } +} + +void func_i3_80193970(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { + Vec3f sp2C; + Vec3f sp20; + + Effect_Initialize(effect); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0); + 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 = 1; + 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_ZeroOne() - 0.5f) * 200.0f; + effect->obj.rot.z = Rand_ZeroOne() * 360.0f; + effect->unk_4E = 1; + effect->unk_78 = 100; + effect->unk_7A = 13; + Object_SetInfo(&effect->info, effect->obj.id); +} + +void func_i3_80193A98(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 == 0) { + func_i3_80193970(&gEffects[i], xPos, yPos, zPos, yRot, arg5); + break; + } + } +} + +void func_i3_80193B08(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale) { + f32 temp_ft2; + + Effect_Initialize(effect); + effect->obj.status = 1; + 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_ZeroOne() - 0.5f) * 5.0f; + effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f; + effect->unk_48 = 3; + if (Rand_ZeroOne() < 0.5f) { + effect->unk_48 = -effect->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_ZeroOne() * 360.0f; + if (scale == 6.0f) { + effect->vel.z = gPlayer[0].vel.z * 0.6f; + } + Object_SetInfo(&effect->info, effect->obj.id); +} + +void func_i3_80193C5C(f32 xPos, f32 yPos, f32 zPos, f32 scale) { + s32 i; + + for (i = 80; i >= 0; i--) { + if (gEffects[i].obj.status == 0) { + func_i3_80193B08(&gEffects[i], xPos, yPos, zPos, scale); + break; + } + } +} + +f32 func_i3_80193CC8(s32 arg0) { + f32 var_fv1 = arg0 * 0.5f; + + if (var_fv1 > 8.0f) { + var_fv1 = 8.0f; + } + return var_fv1; +} + +s32 func_i3_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Boss* this = thisx; + f32 temp; + + if (sZoLimbTimers[limbIndex] == LIMB_DESTROYED) { + *dList = NULL; + } + GSGM_BACK(); + if (sZoSwork[ZO_BSS_37] != 255) { + RCP_SetupDL_46(); + GPC(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); + } + switch (limbIndex) { + case ZO_LIMB_1: + if (sZoFwork[ZO_BSF_0] == 0.0f) { + rot->x += sZoFwork[ZO_BSF_112]; + rot->y += sZoFwork[ZO_BSF_112]; + rot->z += sZoFwork[ZO_BSF_112]; + } else { + rot->z += sZoFwork[ZO_BSF_0]; + } + /* fallthrough */ + case ZO_LIMB_12: + GCGM_BACK(); + break; + + case ZO_LIMB_2: + rot->x += -sZoFwork[ZO_BSF_114] + sZoFwork[ZO_BSF_1]; + rot->y += -sZoFwork[ZO_BSF_114]; + rot->z += -sZoFwork[ZO_BSF_114] + sZoFwork[ZO_BSF_83]; + + pos->x += sZoFwork[ZO_BSF_84]; + pos->y += sZoFwork[ZO_BSF_85]; + break; + + case ZO_LIMB_4: + case ZO_LIMB_16: + rot->x += sZoFwork[ZO_BSF_2]; + break; + + case ZO_LIMB_5: + rot->x += -sZoFwork[ZO_BSF_115]; + rot->y += -sZoFwork[ZO_BSF_115]; + rot->z += -sZoFwork[ZO_BSF_115] + sZoFwork[ZO_BSF_3]; + break; + + case ZO_LIMB_6: + rot->x += sZoFwork[ZO_BSF_4]; + rot->z += sZoFwork[ZO_BSF_90]; + + pos->x += sZoFwork[ZO_BSF_91]; + pos->y += sZoFwork[ZO_BSF_92]; + break; + + case ZO_LIMB_7: + rot->x -= sZoFwork[ZO_BSF_116]; + rot->y -= sZoFwork[ZO_BSF_116]; + rot->z -= sZoFwork[ZO_BSF_116]; + + pos->x += sZoFwork[ZO_BSF_6]; + break; + + case ZO_LIMB_18: + rot->x += -sZoFwork[ZO_BSF_116]; + rot->y += -sZoFwork[ZO_BSF_116]; + rot->z += -sZoFwork[ZO_BSF_116] + sZoFwork[ZO_BSF_5]; + break; + + case ZO_LIMB_8: + rot->z += sZoFwork[ZO_BSF_7]; + rot->y += -sZoFwork[ZO_BSF_8]; + break; + + case ZO_LIMB_9: + rot->z += sZoFwork[ZO_BSF_9]; + rot->y += -sZoFwork[ZO_BSF_10]; + break; + + case ZO_LIMB_10: + rot->x += sZoFwork[ZO_BSF_11] + sZoFwork[ZO_BSF_113]; + rot->y += -sZoFwork[ZO_BSF_113]; + rot->z += sZoFwork[ZO_BSF_80] + sZoFwork[ZO_BSF_113]; + + pos->x += sZoFwork[ZO_BSF_81]; + pos->y += sZoFwork[ZO_BSF_82]; + break; + + case ZO_LIMB_11: + rot->x += -sZoFwork[ZO_BSF_117]; + rot->y += -sZoFwork[ZO_BSF_117]; + rot->z += -sZoFwork[ZO_BSF_117]; + + pos->x += sZoFwork[ZO_BSF_13]; + break; + + case ZO_LIMB_19: + rot->x += -sZoFwork[ZO_BSF_117]; + rot->y += -sZoFwork[ZO_BSF_117]; + rot->z += -sZoFwork[ZO_BSF_117] + sZoFwork[ZO_BSF_12]; + break; + + case ZO_LIMB_15: + rot->x += sZoFwork[ZO_BSF_14] - sZoFwork[ZO_BSF_19] - this->obj.rot.y + sZoFwork[ZO_BSF_112]; + rot->y += sZoFwork[ZO_BSF_112]; + rot->z += sZoFwork[ZO_BSF_86] + sZoFwork[ZO_BSF_112]; + + pos->x += sZoFwork[ZO_BSF_87]; + pos->y += sZoFwork[ZO_BSF_88]; + break; + + case ZO_LIMB_21: + rot->x += -sZoFwork[ZO_BSF_116] + sZoFwork[ZO_BSF_15]; + rot->y += -sZoFwork[ZO_BSF_116]; + rot->z += -sZoFwork[ZO_BSF_116]; + break; + + case ZO_LIMB_22: + pos->x += sZoFwork[ZO_BSF_17] + this->fwork[ZO_FWK_1]; + break; + + case ZO_LIMB_23: + rot->x += -sZoFwork[ZO_BSF_117] + sZoFwork[ZO_BSF_16]; + rot->y += -sZoFwork[ZO_BSF_117]; + rot->z += -sZoFwork[ZO_BSF_117]; + break; + + case ZO_LIMB_24: + pos->x += sZoFwork[ZO_BSF_18] + this->fwork[ZO_FWK_2]; + break; + + case ZO_LIMB_25: + rot->x += sZoFwork[ZO_BSF_19]; + + pos->y += sZoFwork[ZO_BSF_105]; + break; + } + return false; +} + +void func_i3_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f spB4; + Boss* this = 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 }; + Vec3f sp80 = { 0.0f, 0.0f, 0.0f }; + Vec3f sp74 = { 210.0f, -50.0f, 0.0f }; + Vec3f sp68 = { 50.0f, 70.0f, 0.0f }; + Vec3f sp5C = { 166.0f, -174.0f, -25.0f }; + Vec3f sp50 = { 166.0f, -174.0f, 25.0f }; + Vec3f sp44 = { 50.0f, 0.0f, 0.0f }; + Vec3f sp38 = { 150.0f, 0.0f, 0.0f }; + Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; + Vec3f sp20 = { 0.0f, 0.0f, 0.0f }; + f32 var_fv1; + + switch (limbIndex) { + case ZO_LIMB_2: + Matrix_MultVec3f(gCalcMatrix, &spA4, &spB4); + sZoFwork[ZO_BSF_32_X] = spB4.x; + 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) { + var_fv1 = 1.0f; + } + sp74.z = fabsf(sZoFwork[ZO_BSF_4] / 10.0f) * var_fv1; + Matrix_MultVec3f(gCalcMatrix, &sp74, &spB4); + sZoFwork[ZO_BSF_60_X] = spB4.x; + 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; + sZoFwork[ZO_BSF_37_Y] = spB4.y; + sZoFwork[ZO_BSF_37_Z] = spB4.z; + Matrix_MultVec3f(gCalcMatrix, &sp80, &spB4); + sZoFwork[ZO_BSF_46_X] = spB4.x; + sZoFwork[ZO_BSF_46_Y] = spB4.y; + sZoFwork[ZO_BSF_46_Z] = spB4.z; + Matrix_MultVec3f(gCalcMatrix, &sp5C, &spB4); + sZoFwork[ZO_BSF_68_X] = spB4.x; + 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; + sZoFwork[ZO_BSF_40_Y] = spB4.y; + sZoFwork[ZO_BSF_40_Z] = spB4.z; + Matrix_MultVec3f(gCalcMatrix, &sp80, &spB4); + sZoFwork[ZO_BSF_49_X] = spB4.x; + sZoFwork[ZO_BSF_49_Y] = spB4.y; + sZoFwork[ZO_BSF_49_Z] = spB4.z; + Matrix_MultVec3f(gCalcMatrix, &sp50, &spB4); + sZoFwork[ZO_BSF_71_X] = spB4.x; + 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; + sZoFwork[ZO_BSF_55_Y] = spB4.y; + sZoFwork[ZO_BSF_55_Z] = spB4.z; + break; + } +} + +void func_i3_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); + Animation_DrawSkeleton(3, D_6019E18, bossZO->vwork, func_i3_80193D08, func_i3_80194394, bossZO, gCalcMatrix); +} + +f32 D_i3_801BF6BC[2] = { -600.0f, -3400.0f }; +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 +void func_i3_80194A84(Boss* bossZO) { + f32 sp134; + s32 sp130; + s32 i; + s16 var_s0; + s32 sp124; + f32 sp120; + f32 sp11C; + f32 sp118; + f32 sp114; + f32 sp110; + f32 sp10C; + f32 sp108; + f32 sp104; + f32 sp100; + f32 spFC; + s32 dmgType; + s32* temp2; + f32* temp3; + Vec3f spE4; + Vec3f spD8; + Vec3f spCC; + Vec3f spC0; + Vec3f spB4; + Vec3f spA8 = { 615.0f, 532.0f, -80.0f }; + Vec3f sp9C = { -615.0f, 532.0f, -80.0f }; + Vec3f sp90 = { 0.0f, 0.0f, 0.0f }; + Vec3f sp84 = { 0.0f, 0.0f, 0.0f }; + Vec3f sp78; + Vec3f sp6C; + Vec3f sp60 = { 0.0f, 0.0f, 40.0f }; + + gBossFrameCount++; + if ((bossZO->actionState != 0) || ((bossZO->actionState == 0) && (bossZO->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); + } + 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, sZoFwork[ZO_BSF_28] + (gPlayer[0].camEye.z - D_80177D20), 0.1f, + sZoFwork[ZO_BSF_27], 0.00001f); + } + if (!(gFrameCount & 3)) { + 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) { + sZoSwork[ZO_BSS_43] = 360 - sZoSwork[ZO_BSS_43]; + } + sZoSwork[ZO_BSS_43] *= 2; + sZoSwork[ZO_BSS_43] = 255 - sZoSwork[ZO_BSS_43]; + if (sZoSwork[ZO_BSS_43] < 0) { + sZoSwork[ZO_BSS_43] = 0; + } + func_i3_80193A98(sZoFwork[ZO_BSF_102_X], sZoFwork[ZO_BSF_102_Y], sZoFwork[ZO_BSF_102_Z], bossZO->obj.rot.y, + sZoSwork[ZO_BSS_43]); + sZoSwork[ZO_BSS_44] = 255; + } else { + sZoSwork[ZO_BSS_44] = (s32) bossZO->obj.rot.y - 180.0f; + if (sZoSwork[ZO_BSS_44] < 0) { + sZoSwork[ZO_BSS_44] = -sZoSwork[ZO_BSS_44]; + } + sZoSwork[ZO_BSS_44] *= 20; + sZoSwork[ZO_BSS_44] = 255 - sZoSwork[ZO_BSS_44]; + if (sZoSwork[ZO_BSS_44] < 0) { + sZoSwork[ZO_BSS_44] = 0; + } + func_i3_80193A98(sZoFwork[ZO_BSF_99_X], sZoFwork[ZO_BSF_99_Y], sZoFwork[ZO_BSF_99_Z], bossZO->obj.rot.y, + sZoSwork[ZO_BSS_44]); + sZoSwork[ZO_BSS_43] = 255; + } + } + if (((bossZO->actionState == 2) || (bossZO->actionState == 3) || (bossZO->actionState == 8)) && + (gPlayer[0].timer_220 == 2)) { + if (bossZO->swork[ZO_SWK_8] == 0) { + func_800BA808(gMsg_ID_6068, RCID_BOSS_ZONESS); + } + bossZO->swork[ZO_SWK_8]++; + if (bossZO->swork[ZO_SWK_8] >= 5) { + bossZO->swork[ZO_SWK_8] = 0; + } + } + if ((bossZO->swork[ZO_SWK_9] == 0) && (bossZO->actionState >= 2) && (bossZO->health != 0)) { + if (bossZO->swork[ZO_SWK_10] == 0) { + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 50.0f, 0.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 46.0f, 19.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 35.0f, 35.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 19.0f, 46.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); + } else { + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -50.0f, 0.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -46.0f, 19.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -35.0f, 35.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -19.0f, 46.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); + } + bossZO->swork[ZO_SWK_9] = 20; + bossZO->swork[ZO_SWK_11] += 1; + bossZO->swork[ZO_SWK_11] &= 1; + if (bossZO->swork[ZO_SWK_11] == 0) { + bossZO->swork[ZO_SWK_9] = 100; + bossZO->swork[ZO_SWK_10] += 1; + bossZO->swork[ZO_SWK_10] &= 1; + } + } + if (bossZO->swork[ZO_SWK_9] != 0) { + bossZO->swork[ZO_SWK_9]--; + } + switch (bossZO->actionState) { /* switch 1 */ + case 0: /* switch 1 */ + if ((!(gFrameCount & 7) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) && + ((bossZO->swork[ZO_SWK_12] < 7) || (bossZO->timer_050 == 43))) { + D_801779A8[0] = 20.0f; + if (func_800A73E4(&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) { + sp100 = 5.0f; + spFC = 3.0f; + if (sZoSwork[ZO_BSS_55] == 0) { + func_8001D444(0, 0x8016, 0, 255); + sZoSwork[ZO_BSS_55] = 1; + } + func_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, 3.0f); + func_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, 3.0f); + } + func_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, sp100, spFC); + if (bossZO->timer_050 == 43) { + Audio_PlaySfx(0x1983201A, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x19832019, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + bossZO->swork[ZO_SWK_12]++; + } + } + if ((bossZO->timer_050 < 43) && (bossZO->timer_050 >= 31)) { + D_801779A8[0] = 20.0f; + } + 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) { + func_800BA808(gMsg_ID_6069, RCID_BOSS_ZONESS); + bossZO->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; + sZoFwork[ZO_BSF_77] = 0.0f; + bossZO->swork[ZO_SWK_13] = 1; + bossZO->actionState = 1; + } + } + break; + case 1: /* switch 1 */ + Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); + func_i3_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) && !(gFrameCount & 3)) { + if (sZoSwork[ZO_BSS_9] != 0) { + func_i3_80193908(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], + bossZO->obj.rot.y); + } + if (sZoSwork[ZO_BSS_10] != 0) { + func_i3_80193908(sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y], sZoFwork[ZO_BSF_32_Z], + bossZO->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; + if ((sZoSwork[ZO_BSS_7] == 1) && (sZoSwork[ZO_BSS_19] == 0)) { + sZoFwork[ZO_BSF_74] = 230.0f; + sZoFwork[ZO_BSF_75] = -230.0f; + func_800BA808(gMsg_ID_6071, RCID_BOSS_ZONESS); + } + if ((sZoSwork[ZO_BSS_7] == 1) && (sZoSwork[ZO_BSS_25] != 0) && (sZoSwork[ZO_BSS_29] == 0) && + (sZoSwork[ZO_BSS_19] != 0)) { + func_800BA808(gMsg_ID_6081, RCID_PEPPY); + sZoSwork[ZO_BSS_34] = 333; + } + if ((sZoSwork[ZO_BSS_7] == 1) && (sZoSwork[ZO_BSS_25] == 0) && (sZoSwork[ZO_BSS_19] != 0)) { + func_800BA808(gMsg_ID_6072, RCID_BOSS_ZONESS); + sZoSwork[ZO_BSS_34] = 333; + sZoSwork[ZO_BSS_25]++; + } + if (sZoSwork[ZO_BSS_7] >= 2) { + sZoSwork[ZO_BSS_7] = 0; + bossZO->timer_050 = 0; + sZoFwork[ZO_BSF_77] = 0.0f; + bossZO->swork[ZO_SWK_4] = 1000; + bossZO->actionState = 3; + if (sZoSwork[ZO_BSS_19] == 0) { + bossZO->timer_050 = 30; + bossZO->swork[ZO_SWK_4] = 0; + bossZO->actionState = 2; + } + } + } + } + break; + case 2: /* switch 1 */ + if (bossZO->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); + 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->actionState = 3; + } + } + break; + case 3: /* switch 1 */ + 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)->x.offset = 0.0f; + ZO_HIT_12(bossZO)->x.size = 93.6f; + } + Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); + if (bossZO->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); + } + 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, + sZoFwork[ZO_BSF_79], 0.00001f); + } + } else { + bossZO->timer_058 = 100; + sZoFwork[ZO_BSF_20] = 5.0f; + sZoFwork[ZO_BSF_78] = 2.0f; + + sZoFwork[ZO_BSF_21] = sZoFwork[ZO_BSF_79] = 0.0f; + sZoSwork[ZO_BSS_21]++; + if (sZoSwork[ZO_BSS_21] >= 2) { + sZoSwork[ZO_BSS_21] = 0; + } + } + if ((bossZO->swork[ZO_SWK_4] == 0) && ((sZoSwork[ZO_BSS_9] != 0) || (sZoSwork[ZO_BSS_10] != 0))) { + func_i3_80198ECC(bossZO); + } + if ((sZoSwork[ZO_BSS_32] == 0) && (sZoSwork[ZO_BSS_34] == 1) && (sZoSwork[ZO_BSS_24] == 0)) { + func_800BA808(gMsg_ID_6080, RCID_PEPPY); + sZoSwork[ZO_BSS_34] = 500; + } + if (sZoSwork[ZO_BSS_4] == 0) { + sZoSwork[ZO_BSS_4] = 100; + func_i3_801989FC(bossZO); + } + 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; + func_800BA808(gMsg_ID_6078, RCID_BOSS_ZONESS); + } + if (bossZO->timer_056 == 0) { + bossZO->timer_056 = 100; + bossZO->swork[ZO_SWK_1] += 1; + bossZO->swork[ZO_SWK_1] &= 1; + } + bossZO->fwork[ZO_FWK_5] += 4.0f; + bossZO->vel.x = __cosf(bossZO->fwork[ZO_FWK_5] * M_DTOR) * 40.0f; + Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_7], + Math_RadToDeg(Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x, + (D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] + + (gPlayer[0].camEye.z - D_80177D20)) - + bossZO->obj.pos.z)), + 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; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spCC); + var_s0 = 0; + bossZO->vel.z = spCC.z - D_80177D08; + if (bossZO->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; + } + 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, 0); + Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, 1); + 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]; + Matrix_MultVec3f(gCalcMatrix, &spE4, &spC0); + sp10C = Math_RadToDeg(Math_Atan2F(spC0.x, spC0.z)); + sp110 = Math_RadToDeg(-Math_Atan2F(spC0.y, sqrtf((spC0.x * spC0.x) + (spC0.z * spC0.z)))); + if ((sp10C > 40.0f) && (sp10C < 180.0f)) { + sp10C = 40.0f; + } + if ((sp10C < 320.0f) && (sp10C > 180.0f)) { + sp10C = 320.0f; + } + if ((sp110 > 10.0f) && (sp110 < 180.0f)) { + sp110 = 10.0f; + } + 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].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)))); + if ((sp104 > 40.0f) && (sp104 < 180.0f)) { + sp104 = 40.0f; + } + if ((sp104 < 320.0f) && (sp104 > 180.0f)) { + sp104 = 320.0f; + } + if ((sp108 > 10.0f) && (sp108 < 180.0f)) { + sp108 = 10.0f; + } + 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); + func_i3_80198BE8(bossZO, 0); + func_i3_80198BE8(bossZO, 1); + } + break; + case 4: /* switch 1 */ + if (bossZO->swork[ZO_SWK_15] == 0) { + D_80178340 = 0; + D_80178354 = 0; + D_80178350 = 0; + D_80178348 = 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); + if ((sZoSwork[ZO_BSS_11] == 0) && (sZoLimbTimers[ZO_LIMB_7] != LIMB_DESTROYED)) { + func_i3_80198F3C(bossZO, 0, 46); + if (sZoFwork[ZO_BSF_17] > -400.0f) { + sZoFwork[ZO_BSF_17] -= 10.0f; + } else { + Audio_KillSfx(&bossZO->sfxPos); + if (bossZO->obj.rot.z > 359.0f) { + if (sZoSwork[ZO_BSS_13] != 0) { + func_i3_8019907C(bossZO); + } else { + func_i3_8019914C(bossZO, 0); + } + } + } + } + if ((sZoSwork[ZO_BSS_12] == 0) && (sZoLimbTimers[ZO_LIMB_11] != LIMB_DESTROYED)) { + func_i3_80198F3C(bossZO, 1, 49); + if (sZoFwork[ZO_BSF_18] > -400.0f) { + sZoFwork[ZO_BSF_18] -= 10.0f; + } else { + Audio_KillSfx(&bossZO->sfxPos); + if (bossZO->obj.rot.z < 1.0f) { + if (sZoSwork[ZO_BSS_13] != 0) { + func_i3_8019907C(bossZO); + } else { + func_i3_8019914C(bossZO, 1); + } + } + } + } + break; + case 5: /* switch 1 */ + 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); + switch (sZoSwork[ZO_BSS_16]) { /* switch 3; irregular */ + case 0: /* switch 3 */ + if (sZoSwork[ZO_BSS_13] != 0) { + func_i3_8019962C(bossZO, 180.0f); + if (bossZO->obj.rot.y == 180.0f) { + if ((sZoSwork[ZO_BSS_11] == 0) && (sZoLimbTimers[ZO_LIMB_7] != LIMB_DESTROYED)) { + func_i3_801991D0(bossZO, 0); + } else { + func_i3_801991D0(bossZO, 1); + } + } + } else { + if (sZoSwork[ZO_BSS_36] == 0) { + sZoSwork[ZO_BSS_36]++; + sZoFwork[ZO_BSF_77] = 0.0f; + } + func_i3_8019962C(bossZO, 0.0f); + if (bossZO->obj.rot.y == 0.0f) { + if (sZoSwork[ZO_BSS_11] == 0) { + func_i3_8019914C(bossZO, 0); + } + if (sZoSwork[ZO_BSS_12] == 0) { + func_i3_8019914C(bossZO, 1); + } + } + } + break; + case 1: /* switch 3 */ + func_i3_80199470(bossZO, 0); + break; + case 2: /* switch 3 */ + func_i3_80199470(bossZO, 1); + break; + case 3: /* switch 3 */ + if (sZoSwork[ZO_BSS_13] != 0) { + if (bossZO->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) { + func_i3_8019962C(bossZO, 0.0f); + if (bossZO->obj.rot.y == 0.0f) { + sZoSwork[ZO_BSS_16] = 0; + bossZO->swork[ZO_SWK_4] = 1000; + bossZO->actionState = 3; + } + } + } + } else { + if (sZoSwork[ZO_BSS_36] == 0) { + sZoSwork[ZO_BSS_36]++; + sZoFwork[ZO_BSF_77] = 0.0f; + } + func_i3_8019962C(bossZO, 0.0f); + if (bossZO->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->actionState = 3; + } + } + break; + } + break; + case 6: /* switch 1 */ + D_801779A8[0] = 20.0f; + if (D_80178480 == 0) { + D_80178348 = D_80178350 = D_80178354 = 255; + D_80178340 = D_80178358 = 255; + D_80178358 = 0; + D_8017835C = 25; + D_80178480 = (Rand_ZeroOne() * 20.0f) + 20.0f; + } + if (D_80178480 == 29) { + D_80178348 = D_80178350 = D_80178354 = D_80178340 = 0; + } + if (!(gFrameCount & 3)) { + spE4.x = ((Rand_ZeroOne() - 0.5f) * 300.0f) + bossZO->obj.pos.x; + spE4.y = ((Rand_ZeroOne() - 0.5f) * 200.0f) + (bossZO->obj.pos.y + 600.0f); + spE4.z = bossZO->obj.pos.z - 50.0f; + spD8.x = bossZO->obj.rot.x; + spD8.y = Math_ModF(((Rand_ZeroOne() - 0.5f) * 60.0f) + 360.0f, 360.0f); + spD8.z = bossZO->obj.rot.z; + for (i = 0; i < 5; i++) { + func_i3_801900FC(&spE4, &spD8, (Rand_ZeroOne() - 0.5f) * 30.0f, (Rand_ZeroOne() - 0.5f) * 20.0f, + (Rand_ZeroOne() - 0.5f) * 30.0f, 4, 1.0f, + (Rand_ZeroOne() * 15.0f) + (bossZO->unk_3F8 * 10.0f), 0); + } + } + bossZO->vel.x = 0.0f; + Math_SmoothStepToF(&bossZO->obj.pos.x, 0.0f, 0.1f, 5.0f, 0.00001f); + if (!(gFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + sZoLimbTimers[ZO_LIMB_36] = 15; + sZoLimbTimers[ZO_LIMB_25] = 15; + } + func_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_8007D0E0(((Rand_ZeroOne() - 0.5f) * 200.0f) + sZoFwork[ZO_BSF_55_X], + ((Rand_ZeroOne() - 0.2f) * 800.0f) + sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], 10.0f); + if (bossZO->timer_050 == 30) { + func_800BA808(gMsg_ID_6079, RCID_BOSS_ZONESS); + } + if (bossZO->timer_050 == 0) { + gEffects[98].obj.status = gEffects[99].obj.status = 0; + sZoFwork[ZO_BSF_25] = -1000.0f; + sZoFwork[ZO_BSF_23] = 10.0f; + gShowBossHealth = 0; + func_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)) { + D_80177A80 = 0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + 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; + } + if (gPlayer[0].unk_0E8 < 0.0f) { + gPlayer[0].unk_0E8 += 360.0f; + } + gPlayer[0].unk_114 = 0.0f; + func_8004319C(gPlayer, bossZO->obj.pos.x, 0.0f, bossZO->obj.pos.z); + } + bossZO->timer_050 = 70; + sZoSwork[ZO_BSS_5] = 0; + D_80178348 = D_80178350 = D_80178354 = D_80178340 = 0; + func_80042EC0(bossZO); + bossZO->actionState = 7; + } + break; + case 7: /* switch 1 */ + D_801779A8[0] = 20.0f; + if (!(gFrameCount & 7) && + (func_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) { + func_8008377C(((Rand_ZeroOne() - 0.5f) * 500.0f) + bossZO->obj.pos.x, sp134 - 300.0f, + ((Rand_ZeroOne() - 0.5f) * 3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f); + } + if ((bossZO->timer_050 == 0) || (bossZO->obj.pos.y < -800.0f)) { + Object_Kill(&bossZO->obj, &bossZO->sfxPos); + } + break; + case 8: /* switch 1 */ + if (sZoSwork[ZO_BSS_18] != 0) { + if ((sZoSwork[ZO_BSS_27] != 2) && (bossZO->swork[ZO_SWK_5] == 0) && (bossZO->swork[ZO_SWK_6] < 2) && + ((sZoSwork[ZO_BSS_33] == 0) || (sZoSwork[ZO_BSS_33] >= 30))) { + sZoSwork[ZO_BSS_18]--; + } + func_i3_8019962C(bossZO, 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)) { + 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)) { + if (sZoSwork[ZO_BSS_33] == 0) { + func_800BA808(gMsg_ID_6077, RCID_BOSS_ZONESS); + sZoSwork[ZO_BSS_27] = 3; + } + sZoSwork[ZO_BSS_33]++; + if (sZoSwork[ZO_BSS_33] > 30) { + sZoSwork[ZO_BSS_33] = 30; + if (sZoSwork[ZO_BSS_20] == 0) { + sZoSwork[ZO_BSS_20] = 1; + } + } + } + } + if ((sZoSwork[ZO_BSS_27] == 0) && (sZoSwork[ZO_BSS_18] == 400) && (sZoSwork[ZO_BSS_8] != 0)) { + func_800BA808(gMsg_ID_6074, RCID_BOSS_ZONESS); + sZoSwork[ZO_BSS_27] = 1; + bossZO->swork[ZO_SWK_6] = 30; + } + if ((sZoSwork[ZO_BSS_26] == 0) && (sZoSwork[ZO_BSS_18] == 200) && (sZoSwork[ZO_BSS_27] == 3)) { + func_800BA808(gMsg_ID_6075, RCID_BOSS_ZONESS); + sZoSwork[ZO_BSS_26]++; + bossZO->timer_050 = 100; + } + if ((bossZO->timer_050 == 0) && (sZoSwork[ZO_BSS_26] != 0)) { + bossZO->timer_050 = 50; + sZoFwork[ZO_BSF_37_X] = (Rand_ZeroOne() - 0.3f) * 1100.0f; + sZoFwork[ZO_BSF_40_X] = (Rand_ZeroOne() - 0.7f) * 800.0f; + func_i3_801989FC(bossZO); + } + } else { + if (sZoSwork[ZO_BSS_28] == 0) { + func_800BA808(gMsg_ID_6073, RCID_BOSS_ZONESS); + sZoSwork[ZO_BSS_28]++; + } + sZoFwork[ZO_BSF_25] = 0.0f; + sZoFwork[ZO_BSF_23] = 3.0f; + bossZO->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; + + sZoFwork[ZO_BSF_16]; + for (i = 0; i < 2; i++) { + func_i3_80199394(bossZO, i); + } + bossZO->timer_050 = 100; + bossZO->actionState = 0; + } + break; + } + 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; + 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 ((!(gFrameCount & 0x3F) || (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]]; + if ((sZoSwork[ZO_BSS_22] == 0) && (Rand_ZeroOne() < 0.3f)) { + sZoSwork[ZO_BSS_23] = 100; + } + sZoSwork[ZO_BSS_22]++; + if (sZoSwork[ZO_BSS_22] >= 6) { + sZoSwork[ZO_BSS_22] = 0; + } + } + spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_65_X]; + 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->actionState >= 3) && (bossZO->actionState < 6)) { + Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, 1); + 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); + 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); + 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)))); + 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)))); + 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 ((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 ((sZoFwork[ZO_BSF_15] > 315.0f) || (sZoFwork[ZO_BSF_15] < 215.0f)) { + func_i3_801986FC(bossZO, 0, sp78.x, sp78.y, sp78.z, sZoFwork[ZO_BSF_5]); + } + if ((sZoFwork[ZO_BSF_16] < 45.0f) || (sZoFwork[ZO_BSF_16] > 145.0f)) { + func_i3_801986FC(bossZO, 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); + Math_SmoothStepToF(&sZoFwork[ZO_BSF_6], sZoFwork[ZO_BSF_35], 0.4f, 100.0f, 0.00001f); + 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; + sZoFwork[ZO_BSF_88] = 100000.0f; + } else { + sZoFwork[ZO_BSF_86] += 5.0f; + sZoFwork[ZO_BSF_87] -= 10.0f; + sZoFwork[ZO_BSF_88] += 20.0f; + func_8007D0E0(sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y], sZoFwork[ZO_BSF_43_Z], 5.0f); + if ((func_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)) { + func_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 30.0f, 0.0f, 2.0f); + sZoSwork[ZO_BSS_45]++; + } + } + } + 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; + } else { + sZoFwork[ZO_BSF_80] -= 5.0f; + sZoFwork[ZO_BSF_81] += 12.0f; + sZoFwork[ZO_BSF_82] -= 10.0f; + func_8007D0E0(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], 5.0f); + if ((func_800A73E4(&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_8008377C(sZoFwork[ZO_BSF_29_X], sp134, sZoFwork[ZO_BSF_29_Z] + 30.0f, 0.0f, 2.0f); + sZoSwork[ZO_BSS_46]++; + } + } + } + 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; + } else { + sZoFwork[ZO_BSF_83] -= 5.0f; + sZoFwork[ZO_BSF_84] += 12.0f; + sZoFwork[ZO_BSF_85] -= 10.0f; + func_8007D0E0(sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y], sZoFwork[ZO_BSF_32_Z], 5.0f); + if ((func_800A73E4(&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_8008377C(sZoFwork[ZO_BSF_32_X], sp134, sZoFwork[ZO_BSF_32_Z] + 30.0f, 0.0f, 2.0f); + sZoSwork[ZO_BSS_47]++; + } + } + } + if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) { + D_801779A8[0] = 20.0f; + if (!(gFrameCount & 1)) { + func_8007D0E0(((Rand_ZeroOne() - 0.5f) * 200.0f) + sZoFwork[ZO_BSF_52_X], + ((Rand_ZeroOne() - 0.5f) * 200.0f) + sZoFwork[ZO_BSF_52_Y], + ((Rand_ZeroOne() - 0.5f) * 100.0f) + sZoFwork[ZO_BSF_52_Z], 5.0f); + } + if (bossZO->swork[ZO_SWK_14] != 0) { + if (sZoLimbTimers[ZO_LIMB_5] == 0) { + sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = 15; + } + if (sZoSwork[ZO_BSS_52] == 0) { + sZoSwork[ZO_BSS_52] = 30; + } + } else { + sZoSwork[ZO_BSS_13] = 0; + if ((sZoFwork[ZO_BSF_92] < -700.0f) || (sZoFwork[ZO_BSF_91] < -400.0f)) { + sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = LIMB_DESTROYED; + sZoFwork[ZO_BSF_52_Z] = 100000.0f; + } else { + sZoFwork[ZO_BSF_90] -= 2.0f; + sZoFwork[ZO_BSF_91] -= 5.0f; + sZoFwork[ZO_BSF_92] -= 5.0f; + func_8007D0E0(sZoFwork[ZO_BSF_52_X], sZoFwork[ZO_BSF_52_Y], sZoFwork[ZO_BSF_52_Z], 5.0f); + if ((func_800A73E4(&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_8008377C(sZoFwork[ZO_BSF_52_X], sp134, sZoFwork[ZO_BSF_52_Z] + 100.0f, 0.0f, 2.0f); + sZoSwork[ZO_BSS_48]++; + } + } + } + } + if (bossZO->dmgType != DMG_NONE) { + dmgType = bossZO->dmgType; + bossZO->dmgType = DMG_NONE; + if (dmgType == DMG_BEAM) { + Audio_PlaySfx(0x29121007, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + switch (bossZO->dmgPart) { /* switch 2 */ + case 0: /* switch 2 */ + if ((sZoSwork[ZO_BSS_8] != 0) && (dmgType == DMG_BOMB) && + ((bossZO->actionState == 3) || (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_8] <= 0) { + sZoSwork[ZO_BSS_8] = 0; + sZoSwork[ZO_BSS_49] = 0; + bossZO->swork[ZO_SWK_5] = 30; + } + } + break; + case 3: /* switch 2 */ + if ((sZoSwork[ZO_BSS_9] != 0) && (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_9] <= 0) { + sZoSwork[ZO_BSS_9] = 0; + sZoSwork[ZO_BSS_50] = 0; + spD8.x = sZoFwork[ZO_BSF_29_X]; + spD8.y = sZoFwork[ZO_BSF_29_Y]; + spD8.z = sZoFwork[ZO_BSF_29_Z]; + func_8007A6F0(&spD8, 0x2903A008); + } + } + break; + case 4: /* switch 2 */ + if ((sZoSwork[ZO_BSS_10] != 0) && (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_10] <= 0) { + sZoSwork[ZO_BSS_10] = 0; + sZoSwork[ZO_BSS_51] = 0; + spD8.x = sZoFwork[ZO_BSF_32_X]; + spD8.y = sZoFwork[ZO_BSF_32_Y]; + spD8.z = sZoFwork[ZO_BSF_32_Z]; + func_8007A6F0(&spD8, 0x2903A008); + } + } + break; + case 5: /* switch 2 */ + if ((sZoSwork[ZO_BSS_9] != 0) && (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_9] <= 0) { + sZoSwork[ZO_BSS_9] = 0; + sZoSwork[ZO_BSS_50] = 0; + spD8.x = sZoFwork[ZO_BSF_29_X]; + spD8.y = sZoFwork[ZO_BSF_29_Y]; + spD8.z = sZoFwork[ZO_BSF_29_Z]; + func_8007A6F0(&spD8, 0x2903A008); + } + } + if ((sZoSwork[ZO_BSS_10] != 0) && (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_10] <= 0) { + sZoSwork[ZO_BSS_10] = 0; + sZoSwork[ZO_BSS_51] = 0; + spD8.x = sZoFwork[ZO_BSF_32_X]; + spD8.y = sZoFwork[ZO_BSF_32_Y]; + spD8.z = sZoFwork[ZO_BSF_32_Z]; + func_8007A6F0(&spD8, 0x2903A008); + } + } + /* fallthrough */ + case 6: /* switch 2 */ + if ((bossZO->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->actionState == 3)) { + sZoLimbTimers[ZO_LIMB_25] = sZoLimbTimers[ZO_LIMB_36] = 15; + bossZO->health -= bossZO->damage; + if (bossZO->health < 150) { + Audio_PlaySfx(0x2943500F, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x29034003, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + if (bossZO->health <= 0) { + D_8017796C = -1; + func_800182F4(0x102800FF); + func_800182F4(0x112800FF); + Audio_KillSfx(&bossZO->sfxPos); + Audio_PlaySfx(0x2940D09A, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + sZoSwork[ZO_BSS_8] = bossZO->health = sZoSwork[ZO_BSS_24] = 0; + bossZO->timer_050 = 100; + Audio_PlaySfx(0x2940D09A, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + sZoFwork[ZO_BSF_27] = 20.0f; + sZoFwork[ZO_BSF_26] = 50.0f; + sZoFwork[ZO_BSF_28] = -2600.0f; + bossZO->actionState = 6; + bossZO->fwork[ZO_FWK_4] = 1.0f; + } + } + break; + case 7: /* switch 2 */ + case 12: /* switch 2 */ + if ((sZoSwork[ZO_BSS_13] >= 2) && (bossZO->actionState == 5) && (dmgType == DMG_BOMB)) { + sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = 15; + sZoSwork[ZO_BSS_52] = 30; + sZoSwork[ZO_BSS_13] -= bossZO->damage; + if (sZoSwork[ZO_BSS_13] < 2) { + bossZO->swork[ZO_SWK_14] = 30; + sZoSwork[ZO_BSS_13] = 1; + func_800BA808(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_8007A6F0(&spD8, 0x2940983C); + } + } + break; + case 8 + 0: /* switch 2 */ + case 10 + 0: /* switch 2 */ + if ((sZoSwork[ZO_BSS_11] != 0) && (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_11] <= 0) { + sZoSwork[ZO_BSS_11] = 0; + D_80178480 = 30; + D_80178348 = D_80178350 = D_80178354 = 255; + D_80178340 = D_80178358 = 255; + D_80178358 = 0; + D_8017835C = 25; + bossZO->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_8007A6F0(&spD8, 0x2940983C); + sZoSwork[ZO_BSS_16] = 0; + ZO_HIT_8(bossZO, 0)->z.offset = ZO_HIT_10(bossZO, 0)->z.offset = 100000.0f; + bossZO->actionState = 4; + bossZO->fwork[ZO_FWK_9] = 330.0f; + } + } + break; + case 8 + 1: /* switch 2 */ + case 10 + 1: /* switch 2 */ + if ((sZoSwork[ZO_BSS_12] != 0) && (bossZO->actionState == 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; + if (sZoSwork[ZO_BSS_12] <= 0) { + sZoSwork[ZO_BSS_12] = 0; + D_80178480 = 30; + D_80178348 = D_80178350 = D_80178354 = 255; + D_80178340 = D_80178358 = 255; + D_80178358 = 0; + D_8017835C = 25; + bossZO->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_8007A6F0(&spCC, 0x2940983C); + sZoSwork[ZO_BSS_16] = 0; + ZO_HIT_8(bossZO, 1)->z.offset = ZO_HIT_10(bossZO, 1)->z.offset = 100000.0f; + bossZO->actionState = 4; + bossZO->fwork[ZO_FWK_9] = 30.0f; + } + } + break; + } + } + if (sZoSwork[ZO_BSS_0] != 0) { + sZoSwork[ZO_BSS_0]--; + } + if (sZoSwork[ZO_BSS_1] != 0) { + sZoSwork[ZO_BSS_1]--; + } + if (sZoSwork[ZO_BSS_2] != 0) { + sZoSwork[ZO_BSS_2]--; + } + if (sZoSwork[ZO_BSS_3] != 0) { + sZoSwork[ZO_BSS_3]--; + } + if (sZoSwork[ZO_BSS_4] != 0) { + sZoSwork[ZO_BSS_4]--; + } + if (sZoSwork[ZO_BSS_23] != 0) { + sZoSwork[ZO_BSS_23]--; + } + if (sZoSwork[ZO_BSS_34] != 0) { + sZoSwork[ZO_BSS_34]--; + } + if (sZoSwork[ZO_BSS_38] != 0) { + sZoSwork[ZO_BSS_38]--; + } + if (sZoSwork[ZO_BSS_39] != 0) { + sZoSwork[ZO_BSS_39]--; + } + if (sZoSwork[ZO_BSS_40] != 0) { + sZoSwork[ZO_BSS_40]--; + } + if (bossZO->swork[ZO_SWK_14] != 0) { + bossZO->swork[ZO_SWK_14]--; + } + if (bossZO->swork[ZO_SWK_4] != 0) { + bossZO->swork[ZO_SWK_4]--; + } + if (bossZO->swork[ZO_SWK_5] != 0) { + bossZO->swork[ZO_SWK_5]--; + } + if (bossZO->swork[ZO_SWK_15] != 0) { + bossZO->swork[ZO_SWK_15]--; + } + if (bossZO->swork[ZO_SWK_6] > 1) { + bossZO->swork[ZO_SWK_6]--; + } + for (sp124 = 0; sp124 < ZO_LIMB_MAX; sp124++) { + if ((sZoLimbTimers[sp124] > 0) && (sZoLimbTimers[sp124] < 200)) { + sZoLimbTimers[sp124]--; + } + } + for (sp124 = 0, temp2 = &sZoSwork[ZO_BSS_49]; sp124 < 6; sp124++, temp2++) { + if (*temp2 != 0) { + (*temp2)--; + } + } + if (bossZO->actionState < 4) { + spD8.x = sZoFwork[ZO_BSF_106_X]; + spD8.y = sZoFwork[ZO_BSF_106_Y]; + spD8.z = sZoFwork[ZO_BSF_106_Z]; + 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)) { + func_8007A6F0(&spD8, 0x29034003); + } + if ((sZoSwork[ZO_BSS_54] & 1) && (sZoSwork[ZO_BSS_12] != 0)) { + // if (gCalcMatrix) {} + func_8007A6F0(&spCC, 0x29034003); + } + } + 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_8007A6F0(&spD8, 0x2903300E); + } + 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_8007A6F0(&spD8, 0x2903300E); + } + 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_8007A6F0(&spD8, 0x29034003); + } + if (func_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); + bossZO->fwork[ZO_FWK_1] = __sinf(gFrameCount * 7.0f * M_DTOR) * 12.0f; + bossZO->fwork[ZO_FWK_2] = __cosf(gFrameCount * 9.0f * M_DTOR) * 12.0f; + bossZO->fwork[ZO_FWK_3] = __sinf(gFrameCount * 10.0f * M_DTOR) * 30.0f; + if ((bossZO->timer_054 == 0) && (sZoSwork[ZO_BSS_5] < 2)) { + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 50.0f, 0.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 46.0f, 19.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 35.0f, 35.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 19.0f, 46.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -50.0f, 0.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -46.0f, 19.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -35.0f, 35.0f, 5.0f); + func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -19.0f, 46.0f, 5.0f); + bossZO->timer_054 = 20; + sZoSwork[ZO_BSS_5]++; + } + } + if (gBossFrameCount == 530) { + func_800BA808(gMsg_ID_2225, RCID_SLIPPY); + } + if (gBossFrameCount == 686) { + gShowBossHealth = 1; + } + if (gBossFrameCount > 686) { + 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_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_601996C, 0, bossZO->vwork); + if (sZoSwork[ZO_BSS_38] != 0) { + sZoSwork[ZO_BSS_37] -= 10; + if (sZoSwork[ZO_BSS_37] < 0) { + sZoSwork[ZO_BSS_37] = 0; + } + } else { + sZoSwork[ZO_BSS_37] += 10; + if (sZoSwork[ZO_BSS_37] > 255) { + sZoSwork[ZO_BSS_37] = 255; + } + } + + for (sp124 = 0, temp2 = &sZoSwork[ZO_BSS_49], temp3 = &sZoFwork[ZO_BSF_112]; sp124 < 6; sp124++, temp2++, temp3++) { + if ((!(&gPlayer[0].pos)) && (!(&gPlayer[0].pos))) {} + *temp3 = __sinf(*temp2 * 50.0f * M_DTOR) * func_i3_80193CC8(*temp2); + } +} +#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/func_i3_80194A84.s") +#endif + +void func_i3_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot) { + Actor* sp6C; + Vec3f sp60 = { 0.0f, 0.0f, 50.0f }; + Vec3f sp54; + s32 sp50; + + if ((sZoSwork[ZO_BSS_0 + arg1] == 0) && (sZoSwork[ZO_BSS_11 + arg1] != 0)) { + sZoSwork[ZO_BSS_0 + arg1] = 70; + sp50 = arg1; + if (arg1 != 0) { + sp50 = -1; + } + if (sZoSwork[ZO_BSS_12 + sp50] == 0) { + sZoSwork[ZO_BSS_0 + arg1] = 40; + } + for (sp50 = 0, sp6C = gActors; sp50 < 60; sp50++, sp6C++) { + if (sp6C->obj.status == 0) { + D_801779A8[0] = 20.0f; + Actor_Initialize(sp6C); + sp6C->obj.status = 1; + sp6C->obj.id = OBJ_ACTOR_245; + sp6C->obj.pos.x = bossZO->obj.pos.x + xOff; + sp6C->obj.pos.y = bossZO->obj.pos.y + yOff; + sp6C->obj.pos.z = bossZO->obj.pos.z + zOff; + sp6C->unk_0CE = 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_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); + sp6C->vel.x = sp54.x; + sp6C->vel.y = sp54.y; + sp6C->vel.z = bossZO->vel.z + sp54.z; + Object_SetInfo(&sp6C->info, sp6C->obj.id); + sZoFwork[ZO_BSF_35 + arg1] = 40.0f; + Audio_PlaySfx(0x2903203B, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + for (sp50 = 0; sp50 < 4; sp50++) { + func_i3_80193C5C(sp6C->obj.pos.x + (sp54.x * 4.3f), sp6C->obj.pos.y + (sp54.y * 4.3f), + sp6C->obj.pos.z + (sp54.z * 4.3f) + 100.0f, 30.0f); + } + break; + } + } + } + if (sp50 >= 60) { + sp6C->obj.status = 0; + } +} + +void func_i3_801989FC(Boss* bossZO) { + s32 i; + Vec3f sp70 = { 0.0f, 0.0f, 20.0f }; + Vec3f sp64; + Actor* var_s0; + s32 j; + + for (i = 0; i < 2; i++) { + if (sZoSwork[ZO_BSS_11 + i] != 0) { + for (j = 0, var_s0 = gActors; j < 60; j++, var_s0++) { + if (var_s0->obj.status == 0) { + Actor_Initialize(var_s0); + var_s0->obj.status = 1; + var_s0->obj.id = OBJ_ACTOR_246; + var_s0->obj.pos.x = sZoFwork[ZO_BSF_37_X + 3 * i]; + var_s0->obj.pos.y = sZoFwork[ZO_BSF_37_Y + 3 * i]; + var_s0->obj.pos.z = sZoFwork[ZO_BSF_37_Z + 3 * i]; + var_s0->obj.rot.y = bossZO->obj.rot.y; + var_s0->timer_0BC = 300; + var_s0->unk_0CE = 10; + + Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, 1); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64); + var_s0->vel.x = sp64.x; + var_s0->vel.z = bossZO->vel.z + sp64.z; + Object_SetInfo(&var_s0->info, var_s0->obj.id); + Audio_PlaySfx(0x2903101B, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + break; + } + } + } + } +} + +void func_i3_80198BE8(Boss* bossZO, s32 arg1) { + s32 var_s1; + Effect* var_s0; + Vec3f sp3C = { 0.0f, 0.0f, 100.0f }; + Vec3f sp30; + + if ((sZoSwork[ZO_BSS_2 + arg1] == 0) && (sZoSwork[ZO_BSS_39 + arg1] == 0)) { + if ((arg1 == 0) && (sZoSwork[ZO_BSS_41] == 0)) { + Audio_PlaySfx(0x31034025, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + sZoSwork[ZO_BSS_2 + arg1] = 2; + sZoSwork[ZO_BSS_41 + arg1]++; + if (sZoSwork[ZO_BSS_41 + arg1] >= 11) { + sZoSwork[ZO_BSS_41 + arg1] = 0; + sZoSwork[ZO_BSS_39 + arg1] = 30; + if (arg1 == 1) { + func_8001A55C(&bossZO->sfxPos, 0x31034025); + } + } + for (var_s1 = 0, var_s0 = gEffects; var_s1 < 100; var_s1++, var_s0++) { + if (var_s0->obj.status == 0) { + Effect_Initialize(var_s0); + var_s0->obj.status = 1; + var_s0->obj.id = OBJ_EFFECT_398; + var_s0->timer_50 = 100; + var_s0->unk_4E = 1; + var_s0->scale2 = 1.0f; + var_s0->obj.rot.z = 30.0f; + var_s0->obj.pos.x = sZoFwork[ZO_BSF_93_X + 3 * arg1]; + var_s0->obj.pos.y = sZoFwork[ZO_BSF_93_Y + 3 * arg1]; + var_s0->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_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); + var_s0->vel.x = sp30.x; + var_s0->vel.y = sp30.y; + var_s0->vel.z = sp30.z - D_80177D08; + Object_SetInfo(&var_s0->info, var_s0->obj.id); + break; + } + } + if (var_s1 >= 60) { + var_s0->obj.status = 0; + } + } +} + +void func_i3_80198ECC(Boss* bossZO) { + sZoSwork[ZO_BSS_18] = 500; + bossZO->timer_050 = 100; + bossZO->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->actionState = 8; + bossZO->fwork[ZO_FWK_4] = 1.0f; +} + +void func_i3_80198F3C(Boss* bossZO, s32 arg1, s32 arg2) { + if ((!(gFrameCount & 7) && (Rand_ZeroOne() < 0.5f))) { + sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + 2 * arg1] = + sZoLimbTimers[ZO_LIMB_22 + 2 * arg1] = 15; + } + func_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + ((Rand_ZeroOne() - 0.5f) * 400.0f), + sZoFwork[ZO_BSF_1 + arg2] + (Rand_ZeroOne() - 0.2f) * 800.0f, sZoFwork[ZO_BSF_2 + arg2], 7.0f); + if (!(gFrameCount & 1)) { + func_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); + } +} + +void func_i3_8019907C(Boss* bossZO) { + if ((sZoSwork[ZO_BSS_9] == 0) && (sZoSwork[ZO_BSS_10] == 0)) { + if ((sZoSwork[ZO_BSS_31] == 0) && (sZoSwork[ZO_BSS_30] != 0)) { + func_800BA808(gMsg_ID_6082, RCID_PEPPY); + sZoSwork[ZO_BSS_34] = 333; + } + if (sZoSwork[ZO_BSS_30] == 0) { + func_800BA808(gMsg_ID_6076, RCID_BOSS_ZONESS); + sZoSwork[ZO_BSS_34] = 333; + sZoSwork[ZO_BSS_30]++; + } + sZoFwork[ZO_BSF_77] = 0.0f; + bossZO->actionState = 5; + + } else { + func_i3_80198ECC(bossZO); + } +} + +void func_i3_8019914C(Boss* bossZO, 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->actionState = 3; + if ((sZoSwork[ZO_BSS_11] == 0) && (sZoSwork[ZO_BSS_12] == 0)) { + bossZO->fwork[ZO_FWK_6] = bossZO->obj.pos.x; + sZoSwork[ZO_BSS_20] = sZoSwork[ZO_BSS_24] = 1; + } +} + +f32 D_i3_801BF73C[2] = { -80.0f, 80.0f }; + +void func_i3_801991D0(Boss* bossZO, 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; + sZoSwork[ZO_BSS_36] = 0; + sZoSwork[ZO_BSS_16] = arg1 + 1; + sZoFwork[ZO_BSF_77] = 0.0f; + } + } + + if (arg1 == 0) { + 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; + } 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; + } +} + +#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 func_i3_80199394(Boss* bossZO, 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; + sZoFwork[ZO_BSF_17 + arg1] = sZoFwork[ZO_BSF_77] = 0.0f; + sZoSwork[ZO_BSS_16] = 3; + Audio_PlaySfx(0x29433022, &bossZO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); +} + +void func_i3_80199470(Boss* bossZO, s32 arg1) { + if (sZoSwork[ZO_BSS_13] == 0) { + if (sZoFwork[ZO_BSF_17 + arg1] > -400.0f) { + sZoFwork[ZO_BSF_17 + arg1] -= 4.0f; + } else { + if (sZoSwork[ZO_BSS_36] == 0) { + sZoSwork[ZO_BSS_36]++; + sZoFwork[ZO_BSF_77] = 0.0f; + } + func_i3_8019962C(bossZO, 0.0f); + if (bossZO->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->actionState = 3; + if ((sZoSwork[ZO_BSS_11] == 0) && (sZoSwork[ZO_BSS_12] == 0)) { + sZoSwork[ZO_BSS_20] = sZoSwork[ZO_BSS_24] = 1; + } + func_i3_8019914C(bossZO, arg1); + } + } + } else if ((sZoSwork[ZO_BSS_13] != 1) && (bossZO->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) { + func_i3_80199394(bossZO, arg1); + } + } +} + +void func_i3_8019962C(Boss* bossZO, 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); +} + +void func_i3_8019969C(Actor* actor) { + s32 i; + + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0CE -= actor->unk_0D6; + if (actor->unk_0CE <= 0) { + actor->unk_0CE = 0; + for (i = 0; i < 5; i++) { + func_80079618(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x, + ((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.y, + ((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, 1.0f); + } + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5.0f); + actor->unk_044 = 5; + actor->unk_0D4 = 2; + actor->obj.pos.z -= 100.0f; + func_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007A6F0(&actor->obj.pos, 0x2903A008); + } + actor->unk_0D0 = 0; + } + actor->fwork[0] += 10.0f; + func_i3_8018FF50(actor); +} + +void func_i3_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_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_6017950); +} + +void func_i3_801998E0(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(effect); + effect->obj.status = 1; + effect->obj.id = OBJ_EFFECT_374; + effect->unk_4E = 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; + func_8007D0E0(xPos, yPos + 30.0f, zPos, 7.0f); + func_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); +} + +void func_i3_801999CC(f32 xPos, f32 yPos, f32 zPos) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { + if (gEffects[i].obj.status == 0) { + func_i3_801998E0(&gEffects[i], xPos, yPos, zPos); + break; + } + } +} + +void func_i3_80199A28(Actor* actor) { + f32 sp3C; + f32 sp38; + s32 sp34; + + actor->obj.rot.x += 5.0f; + switch (actor->unk_0B8) { /* irregular */ + case 0: + if (actor->unk_0CE == 0) { + actor->iwork[0]++; + actor->unk_0CE = 10; + actor->iwork[1] = 1; + actor->unk_0B8 = 2; + actor->fwork[0] = -50.0f; + } else { + actor->vel.y = 60.0f; + actor->gravity = 1.0f; + if (gBosses[0].obj.pos.y < 0.0f) { + actor->obj.pos.y = -100.0f; + } + actor->unk_0B8++; + } + break; + case 1: + if ((func_800A73E4(&sp3C, &sp34, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0) && + (actor->iwork[1] == 0)) { + func_8008377C(actor->obj.pos.x, sp3C, actor->obj.pos.z, 0.0f, 0.5f); + actor->iwork[1]++; + Audio_PlaySfx(0x19000020, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + Math_SmoothStepToF(&actor->vel.y, -60.0f, 0.5f, 5.0f, 0.00001f); + if (actor->obj.pos.y < -30.0f) { + actor->unk_0B8++; + actor->vel.y = 0.0f; + actor->gravity = 0.0f; + actor->fwork[0] = 0.0f; + } + break; + case 2: + actor->gravity = 1.0f; + if (func_800A73E4(&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; + if (Math_SmoothStepToF(&actor->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); + } + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + actor->unk_044 = 2; + func_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_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007A6F0(&actor->obj.pos, 0x1903400F); + } else { + if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 800.0f) || (actor->unk_0D0 != 0)) { + func_i3_801999CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007A6F0(&actor->obj.pos, 0x2903B009); + } + } + break; + } + if ((actor->timer_0BC == 0) && (actor->iwork[0] == 0)) { + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); + actor->unk_044 = 2; + actor->unk_0D4 = 2; + actor->obj.pos.y += 200.0f; + func_80066254(actor); + Object_Kill(&actor->obj, &actor->sfxPos); + } +} + +void func_i3_80199E24(Actor* actor) { + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_6025E60); +} + +void func_i3_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 func_i3_80199F10(Actor* actor) { + if (sZoSwork[ZO_BSS_13] == 0) { + actor->unk_0B8 = 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->sfxPos); + } + } + switch (actor->unk_0B8) { /* irregular */ + case 0: + actor->obj.rot.y += 2.0f; + func_i3_80199E9C(actor, 0.0f, 20.0f); + switch (sZoSwork[ZO_BSS_16]) { /* switch 1; irregular */ + case 1: /* switch 1 */ + actor->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; + Audio_PlaySfx(0x3100503E, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->unk_0B8++; + break; + case 2: /* switch 1 */ + actor->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; + Audio_PlaySfx(0x3100503E, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->unk_0B8++; + break; + } + break; + case 1: + if (gBosses[0].timer_052 != 0) { + actor->obj.rot.y += 2.0f; + func_i3_80199E9C(actor, actor->fwork[1], 20.0f); + } else { + switch (sZoSwork[ZO_BSS_16]) { + case 1: /* switch 2 */ + actor->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; + func_i3_80199E9C(actor, actor->fwork[1], 20.0f); + break; + case 2: /* switch 2 */ + actor->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; + func_i3_80199E9C(actor, actor->fwork[1], 20.0f); + break; + case 3: /* switch 2 */ + actor->obj.rot.y += 2.0f; + if (gBosses[0].timer_050 != 0) { + func_i3_80199E9C(actor, 0.0f, 10.0f); + } else { + actor->unk_0B8 = 0; + Audio_KillSfx(&actor->sfxPos); + } + break; + } + } + break; + } + if (actor->unk_0D0 != 0) { + if (actor->unk_0D0 == 1) { + Audio_PlaySfx(0x29121007, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + actor->unk_0D0 = 0; + } +} + +void func_i3_8019A1FC(Actor* actor) { + f32 var_fv0; + s32 var_s0; + s32 var_s1; + + 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); + RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + GCGM_BACK(); + if (((actor->unk_0B8 == 1) && (gBosses[0].timer_052 != 0)) || (actor->unk_0B8 == 0)) { + Matrix_RotateY(gGfxMatrix, gFrameCount * 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++) { + var_fv0 -= 117.0f; + } + if (var_s1 > 30) { + var_s1 = 30; + } + if ((var_s1 <= 0) || (actor->fwork[0] == 0)) { + 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_Push(&gGfxMatrix); + Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_6018660); + Matrix_Pop(&gGfxMatrix); + } +} + +void func_i3_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; + + sp3C = Math_Atan2F(sp4C, sp44); + sp40 = -Math_Atan2F(sp48, sqrtf(SQ(sp4C) + SQ(sp44))); + Matrix_RotateY(gCalcMatrix, sp3C, 0); + Matrix_RotateX(gCalcMatrix, sp40, 1); + 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; +} + +void func_i3_8019A5D4(Actor* actor) { + f32 sp4C; + f32 sp48; + f32 sp44; + s32 sp40; + f32 var_fa0; + f32 var_fv1; + + if ((gBosses[0].actionState == 6) || (gBosses[0].actionState == 7)) { + Audio_KillSfx(&actor->sfxPos); + actor->unk_0B8 = 10; + actor->vel.z = 40.0f; + } + actor->fwork[3] += 10.0f; + actor->fwork[1] = 70.0f; + switch (actor->unk_0B8) { + 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)) { + if ((sZoSwork[ZO_BSS_8] == 0) && (gBosses[0].actionState == 8)) { + var_fv1 = (Rand_ZeroOne() - 0.5f) * 3000.0f; + var_fa0 = 0.0f; + } else { + var_fv1 = 0.0f; + var_fa0 = 100.0f; + } + func_i3_8019A4E0(actor, gPlayer[0].pos.x + var_fv1, gPlayer[0].pos.y + var_fa0, gPlayer[0].pos.z, + 80.0f); + actor->vel.z -= D_80177D08; + func_i3_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); + func_i3_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); + func_i3_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_PlaySfx(0x2900403D, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->unk_0B8++; + } + break; + case 1: + if (actor->timer_0C0 != 0) { + D_801779A8[0] = 40.0f; + } + actor->iwork[0] = 0; + if (actor->timer_0BC == 0) { + actor->vel.x = 0.0f; + actor->vel.z = -D_80177D08; + actor->gravity = 5.0f; + actor->fwork[5] = actor->vel.y * -3.0f; + if (actor->obj.pos.y < -150.0f) { + actor->gravity = 0.0f; + Audio_PlaySfx(0x19003021, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->unk_0B8++; + } + } + break; + case 2: + if ((sZoSwork[ZO_BSS_8] == 0) && (gBosses[0].actionState == 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]; + 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]); + var_fa0 = sqrtf(SQ(sp4C) + SQ(sp48)) * 0.5f; + func_i3_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_80177D08; + } + if (func_80062DBC(&actor->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, 0.0f) != 0) { + actor->fwork[6] = 50.0f; + Audio_PlaySfx(0x19030003, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + 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; + } + if ((sp4C <= 30.0f) && (sp48 <= 30.0f)) { + actor->unk_0B8 = 0; + Audio_KillSfx(&actor->sfxPos); + Audio_PlaySfx(0x29433022, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->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; + } + break; + } + func_i3_8018FF50(actor); + if (actor->unk_0D0 != 0) { + if (actor->unk_0D0 == 1) { + Audio_PlaySfx(0x29121007, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + actor->unk_0D0 = 0; + } + if (!(gFrameCount & 7) && (actor->unk_0B8 != 0) && (actor->iwork[0] < 8) && + (func_800A73E4(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != 0)) { + func_8008377C(actor->obj.pos.x, sp44, actor->obj.pos.z, 0.0f, 0.7f); + actor->iwork[0]++; + if (actor->vel.y >= 0.0f) { + Audio_PlaySfx(0x1983201A, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x19832019, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + } +} + +void func_i3_8019ACCC(Actor* actor) { + f32 temp_fa0; + f32 temp_fa1; + f32 temp_fs0; + f32 temp_fs3; + f32 temp_fs4; + f32 temp_fs0_2; + f32 temp_fs1_2; + f32 temp_fs0_4; + f32 var_fs5; + s32 i; + f32 sp94; + s32 var_s4; + + var_fs5 = 90.0f; + Matrix_Pop(&gGfxMatrix); + Matrix_Push(&gGfxMatrix); + GSGM_BACK(); + if ((gBosses[0].actionState != 6) && (gBosses[0].actionState != 7)) { + RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + GCGM_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_fs3 = sqrtf(SQ(temp_fa0) + SQ(temp_fs0) + SQ(temp_fa1)); + temp_fs4 = Math_Atan2F(temp_fa0, temp_fa1); + temp_fs0_2 = -Math_Atan2F(temp_fs0, sqrtf(SQ(temp_fa0) + SQ(temp_fa1))); + var_s4 = temp_fs3 / 70.0f; + if (var_s4 > 50) { + var_s4 = 50; + } + if (var_s4 < 0) { + var_s4 = 0; + } + Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_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); + sp94 = (180.0f / var_s4) + 1.0f; + for (i = 0; i < var_s4; i++) { + temp_fs1_2 = __sinf(i * sp94 * M_DTOR) * actor->fwork[5]; + temp_fs0_4 = __cosf(i * sp94 * M_DTOR) * actor->fwork[5] * -0.25f; + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, actor->fwork[1], 1); + Matrix_Push(&gGfxMatrix); + Matrix_Translate(gGfxMatrix, 0.0f, temp_fs1_2, 0.0f, 1); + Matrix_RotateX(gGfxMatrix, M_DTOR * temp_fs0_4, 1); + 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_SetGfxMtx(&gMasterDisp); + GDL(D_6018660); + Matrix_Pop(&gGfxMatrix); + Matrix_Pop(&gGfxMatrix); + var_fs5 += 90.0f; + } + } + Matrix_Pop(&gGfxMatrix); + Matrix_Push(&gGfxMatrix); + Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_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_SetGfxMtx(&gMasterDisp); + RCP_SetupDL(&gMasterDisp, 70); + GPC(255, 255, 255, 255); + GDL(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); +} + +Vec3f D_i3_801BF744[3] = { + { 0.0f, 50.0f, -200.0f }, + { 0.0f, 50.0f, 200.0f }, + { 0.0f, 50.0f, 600.0f }, +}; +Vec3f D_i3_801BF768[3] = { + { 0.0f, 300.0f, 0.0f }, + { 0.0f, 300.0f, -200.0f }, + { 0.0f, 300.0f, 300.0f }, +}; +s32 D_i3_801BF78C[30] = { + 0, 7, 7, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 327, 324, 0, 322, 327, 0, 324, 324, 0, 336, 0, +}; +f32 D_i3_801BF804[8] = { 0.0f, 0.0f, 270.0f, 90.0f, 0.0f, 180.0f, 400.0f, 400.0f }; + +void func_i3_8019B1F0(Actor* actor) { + s32 temp_v1; + s32 var_s3; + s32 i; + s32 var_s6; + Vec3f sp84; + Vec3f sp78; + Vec3f sp6C; + + actor->obj.pos.y = 120.0f; + actor->scale = -1.0f; + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + sp78.x = sp78.y = 0.0f; + sp78.z = actor->obj.rot.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + actor->vel.x = sp6C.x; + actor->vel.z = sp6C.z; + actor->obj.rot.z = 0.0f; + + var_s3 = 1; + if (actor->obj.rot.x >= 100.0f) { + actor->unk_0B8 = 1; + actor->iwork[3] = actor->obj.rot.x / 100.0f; + 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++) { + if (gActors[i].obj.status == 0) { + if (actor->unk_0B8 == 0) { + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[var_s3], &sp84); + } else { + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[var_s3], &sp84); + } + Actor_Initialize(&gActors[i]); + gActors[i].obj.status = 1; + if (actor->unk_0B8 == 0) { + gActors[i].obj.id = OBJ_ACTOR_251; + gActors[i].iwork[3] = 777; + } else { + gActors[i].obj.id = OBJ_ACTOR_253; + } + gActors[i].obj.pos.x = actor->obj.pos.x + sp84.x; + gActors[i].obj.pos.y = actor->obj.pos.y + sp84.y; + gActors[i].obj.pos.z = actor->obj.pos.z + sp84.z; + ((s32*) &actor->iwork[7])[var_s3] = (s32) (actor->obj.rot.x * 3.0f) + var_s3; + gActors[i].obj.rot.y = actor->obj.rot.y; + gActors[i].iwork[0] = D_i3_801BF78C[((s32*) &actor->iwork[7])[var_s3]]; + gActors[i].iwork[1] = actor->index; + gActors[i].iwork[2] = var_s3; + Object_SetInfo(&gActors[i].info, gActors[i].obj.id); + if (actor->unk_0B8 != 0) { + gActors[i].unk_0B8 = 3; + if (D_i3_801BF804[actor->iwork[3]] >= 361.0f) { + gActors[i].obj.rot.x = actor->obj.rot.y; + } else { + temp_v1 = (actor->iwork[3] * 2) + var_s6; + gActors[i].obj.rot.x = D_i3_801BF804[temp_v1]; + } + var_s6++; + } + ((s32*) &actor->iwork[0])[var_s3] = i; + var_s3++; + } + } + actor->obj.rot.x = 0.0f; + Audio_PlaySfx(0x3100203A, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); +} + +void func_i3_8019B548(Actor* actor) { + f32 sp6C; + s32 sp68; + s32 i; + Vec3f sp58; + Actor* temp_s0; + + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + switch (actor->unk_0B8) { + case 0: + for (i = 1; i < 3; i++) { + temp_s0 = &gActors[((s32*) &actor->iwork[0])[i]]; + if ((temp_s0->obj.status != 0) && (temp_s0->iwork[1] == actor->index) && + (temp_s0->obj.id == OBJ_ACTOR_251)) { + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[i], &sp58); + temp_s0->obj.pos.x = actor->obj.pos.x + sp58.x; + temp_s0->obj.pos.y = actor->obj.pos.y + sp58.y; + temp_s0->obj.pos.z = actor->obj.pos.z + sp58.z; + } + } + break; + case 1: + for (i = 1; i < 3; i++) { + temp_s0 = &gActors[((s32*) &actor->iwork[0])[i]]; + if ((temp_s0->obj.status != 0) && (temp_s0->obj.id == OBJ_ACTOR_253) && + (temp_s0->iwork[1] == actor->index)) { + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[i], &sp58); + temp_s0->obj.pos.x = actor->obj.pos.x + sp58.x; + temp_s0->obj.pos.y = actor->obj.pos.y + sp58.y; + temp_s0->obj.pos.z = actor->obj.pos.z + sp58.z; + } + } + break; + } + if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f) && + func_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); + } +} + +void func_i3_8019B7DC(Actor* actor) { + GDL(D_6006360); +} + +void func_i3_8019B810(Actor* actor) { + if (actor->iwork[3] == 0) { + actor->iwork[0] = actor->obj.rot.z / 10.0f; + actor->obj.rot.z = 0.0f; + } + actor->unk_0CE = 30; +} + +s32 D_i3_801BF824[10] = { 1, 5, 9, 14, 15, 16, 17, 0, 13, 1000 }; +Vec3f D_i3_801BF84C[6] = { + { 5.0f, -10.0f, 0.0f }, { 10.0f, 0.0f, 0.0f }, { 5.0f, 10.0f, 0.0f }, + { -5.0f, -10.0f, 0.0f }, { -10.0f, 0.0f, 0.0f }, { -5.0f, 10.0f, 0.0f }, +}; + +void func_i3_8019B854(Actor* actor) { + s32 i; + s32 j; + Vec3f spB4; + Vec3f spA8 = { 0.0f, 0.0f, 0.0f }; + Vec3f sp9C; + + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + actor->timer_0C6 = 15; + actor->unk_0CE -= actor->unk_0D6; + Audio_PlaySfx(0x2903300E, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + switch (actor->unk_0B8) { + case 0: + if (actor->unk_0CE <= 0) { + actor->unk_0CE = 0; + actor->unk_0B8++; + } + break; + case 1: + for (i = 0; i < 6; i++) { + func_i3_801900FC(&actor->vwork[i], &actor->vwork[6 + i], (Rand_ZeroOne() - 0.5f) * 50.0f, + (Rand_ZeroOne() * 10.0f) + 20.0f, (Rand_ZeroOne() - 0.5f) * 50.0f, 39, actor->scale, + (Rand_ZeroOne() * 15.0f) + (actor->scale * 10.0f), i); + } + for (i = 0; i < 10; i++) { + func_80079618(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x, + ((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.y, + ((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, 2.0f); + } + for (i = 0; i < 3; i++) { + func_8007D0E0(actor->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 50.0f), + actor->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 50.0f) + 20.0f, + actor->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 30.0f), 10.0f + 2 * i); + } + actor->obj.pos.y += 100.0f; + if (D_i3_801BF824[actor->iwork[0]] < 1000) { + actor->unk_044 = D_i3_801BF824[actor->iwork[0]]; + func_80066254(actor); + } else { + if (D_i3_801BF824[actor->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; + sp9C.x = (Rand_ZeroOne() - 0.5f) * 10.0f; + sp9C.y = (Rand_ZeroOne() - 0.5f) * 10.0f; + sp9C.z = 50.0f; + func_8007EE68(353, &spB4, &spA8, &spA8, &sp9C, 1.0f); + } + } + actor->unk_044 = 0; + func_80066254(actor); + } + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007A6F0(&actor->obj.pos, 0x1903901C); + break; + } +} + +void func_i3_8019BC78(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; + Actor* this = thisx; + + if (this->unk_0B8 != 0) { + switch (limbIndex) { + case 1: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[6]); + break; + case 2: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[7]); + break; + case 3: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[8]); + break; + case 4: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); + break; + case 5: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[10]); + break; + case 6: + Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); + break; + } + } +} + +void func_i3_8019BDE0(Actor* actor) { + Vec3f sp28[20]; + + Animation_GetFrameData(&D_6018550, 0, sp28); + Animation_DrawSkeleton(3, D_601863C, sp28, NULL, func_i3_8019BC78, actor, gCalcMatrix); +} + +void func_i3_8019BE48(Actor* actor) { + Actor* pad; + f32 sp40; + f32 sp3C; + s32 sp38; + s32 i; + Actor* var_s0; + + switch (actor->unk_0B8) { /* irregular */ + case 0: + for (i = 0, var_s0 = gActors; i < 60; i++, var_s0++) { + if (var_s0->obj.status == 0) { + Actor_Initialize(var_s0); + var_s0->obj.status = 1; + var_s0->obj.id = OBJ_ACTOR_254; + var_s0->obj.pos.x = actor->obj.pos.x; + var_s0->obj.pos.y = actor->obj.pos.y; + var_s0->obj.pos.z = actor->obj.pos.z + 30.0f; + var_s0->fwork[0] = 230.0f; + var_s0->fwork[1] = 0.8f; + var_s0->fwork[2] = 1.0f; + var_s0->fwork[3] = 1.0f; + var_s0->iwork[0] = actor->index + 1; + Object_SetInfo(&var_s0->info, var_s0->obj.id); + actor->iwork[0] = i; + break; + } + } + if (i >= 60) { + var_s0->obj.status = 0; + } + actor->unk_0CE = 10; + actor->unk_0B8++; + break; + case 1: + if ((actor->unk_0D0 != 0) && (actor->unk_0CE != 0)) { + actor->unk_0D0 = 0; + actor->timer_0C6 = 15; + actor->unk_0CE -= actor->unk_0D6; + if (actor->unk_0CE <= 0) { + if (D_80161684 == 0) { + func_80077240(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); + gHitCount += 2; + if (actor->unk_0D0 && actor->unk_0D0) {} + } + actor->unk_0CE = actor->unk_044 = 0; + func_80066254(actor); + actor->unk_0B8++; + } + } + break; + case 2: + actor->timer_0C2 = 30000; + var_s0 = &gActors[actor->iwork[0]]; + + var_s0->iwork[0] = 777; + func_8008377C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f, 0.7f); + func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, 5.0f); + Object_Kill(&actor->obj, &actor->sfxPos); + func_8007A6F0(&actor->obj.pos, 0x29038033); + break; + } + if ((actor->unk_0B8 < 2) && + (func_800A73E4(&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) { + sp3C = 350.0f; + } + Math_SmoothStepToAngle(&actor->obj.rot.z, sp3C, 0.1f, 1.0f, 0); + var_s0 = &gActors[actor->iwork[0]]; + Math_SmoothStepToAngle(&var_s0->obj.rot.z, sp3C, 0.1f, 1.0f, 0); + var_s0->obj.pos.y = actor->obj.pos.y; + } +} + +void func_i3_8019C1CC(Actor* actor) { + GDL(D_6002E10); +} + +Vec3f D_i3_801BF8AC = { 230.0f, -50.0f, 0.0f }; +Vec3f D_i3_801BF8B8 = { 230.0f, -250.0f, 0.0f }; + +void func_i3_8019C200(Actor* actor) { + s32 i; + s32 sp38; + Vec3f sp2C; + Actor* var_a2; + + actor->scale = -1.0f; + if (actor->unk_0B8 != 3) { + actor->iwork[4] = fabsf(Math_ModF(actor->obj.rot.z, 10.0f)); + sp38 = fabsf(actor->obj.rot.z / 10.0f); + } else { + sp38 = actor->iwork[0]; + actor->unk_0B8 = 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; + } else { + actor->fwork[0] = 30.0f; + } + Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, 0); + 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_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp2C); + for (i = 0, var_a2 = gActors; i < 60; i++, var_a2++) { + if (var_a2->obj.status == 0) { + Actor_Initialize(var_a2); + var_a2->obj.status = 1; + var_a2->obj.id = OBJ_ACTOR_251; + var_a2->obj.pos.x = actor->obj.pos.x + sp2C.x; + var_a2->obj.pos.y = actor->obj.pos.y + sp2C.y + actor->fwork[2]; + var_a2->obj.pos.z = actor->obj.pos.z + sp2C.z + actor->fwork[0]; + var_a2->obj.rot.y = actor->obj.rot.y; + var_a2->iwork[0] = sp38; + var_a2->iwork[3] = 777; + Object_SetInfo(&var_a2->info, var_a2->obj.id); + actor->iwork[3] = i; + break; + } + } + if (i >= 60) { + var_a2->obj.status = 0; + } +} + +void func_i3_8019C454(Actor* actor) { + Vec3f sp34; + Actor* sp30; + + if ((actor->fwork[0] == 30.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 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_PlaySfx(0x1900001B, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + if (1) {} + } + Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, 0); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8AC, &sp34); + actor->fwork[1] = sp34.x; + actor->fwork[2] = actor->fwork[3] + sp34.y; + sp30 = &gActors[actor->iwork[3]]; + switch (actor->unk_0B8) { + case 0: + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp34); + if ((sp30->obj.status != 0) && (sp30->obj.id == OBJ_ACTOR_251)) { + sp30->obj.pos.x = actor->obj.pos.x + sp34.x; + sp30->obj.pos.y = actor->obj.pos.y + sp34.y + actor->fwork[2]; + sp30->obj.pos.z = actor->obj.pos.z + sp34.z; + } else { + actor->unk_0B8 = 1; + } + 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)) { + if (sp30->obj.id == OBJ_ACTOR_251) { + sp30->gravity = 1.0f; + } + actor->unk_0B8 = 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; + } + } + break; + } + break; + case 1: + actor->fwork[4] += 10.0f; + actor->fwork[4] = Math_ModF(actor->fwork[4], 360.0f); + break; + } + if (actor->fwork[0] >= 30.0f) { + actor->fwork[0] = 30.0f; + } + if (actor->fwork[0] <= -20.0f) { + actor->fwork[0] = -20.0f; + } + if (actor->fwork[3] >= 0) { + actor->fwork[3] = 0.0f; + } + if (actor->fwork[3] <= -450.0f) { + actor->fwork[3] = -450.0f; + } +} + +void func_i3_8019C83C(Actor* actor) { + f32 var_fv1; + s32 i; + s32 var_s1; + + Matrix_Push(&gGfxMatrix); + Matrix_RotateZ(gGfxMatrix, actor->fwork[0] * M_DTOR, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(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); + 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); + 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); + RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + Matrix_RotateY(gGfxMatrix, gFrameCount * M_DTOR, 1); + + var_fv1 = (fabsf(actor->fwork[3]) * 1.3f) + 50.0f; + for (var_s1 = 0; var_fv1 > 0.0f; var_s1++) { + var_fv1 -= 9.3f; + } + + if (var_s1 > 50) { + var_s1 = 50; + } + if (var_s1 <= 0) { + 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_Push(&gGfxMatrix); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_6018660); + Matrix_Pop(&gGfxMatrix); + } +} + +f32 D_i3_801BF8C4[2] = { 46.0f, 314.0f }; +f32 D_i3_801BF8CC[2] = { 23.0f, 337.0f }; + +void func_i3_8019CBEC(Actor* actor) { + actor->timer_0C2 = 30000; + switch (actor->unk_0B8) { + case 0: + actor->fwork[5] = D_i3_801BF8CC[gFrameCount & 1]; + if (D_80161684 != 0) { + actor->fwork[5] = D_i3_801BF8C4[gFrameCount & 1]; + actor->iwork[1] = 1; + } + actor->unk_0B8++; + 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); + } else { + Math_SmoothStepToAngle(&actor->fwork[4], actor->fwork[5], 0.1f, actor->fwork[6], 0.0001f); + } + if ((D_80161684 != 0) && (actor->iwork[1] == 0)) { + if (actor->fwork[5] < 300.0f) { + actor->fwork[5] = D_i3_801BF8C4[0]; + } else { + actor->fwork[5] = D_i3_801BF8C4[1]; + } + actor->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 (actor->iwork[0] == 777) { + actor->unk_0B8++; + } + 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->sfxPos); + } + } + break; + } + func_i3_8018FF50(actor); + actor->obj.rot.x = 0.0f; +} + +void func_i3_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; + + 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_SetGfxMtx(&gMasterDisp); + if (D_80161684 != 0) { + GPC(255, 191, 43, 255); + GEC(255, 0, 0, 255); + } else { + GPC(255, 255, 255, 255); + GEC(255, 255, 127, 255); + } + } else if (D_80161684 != 0) { + GPC(255, 191, 43, 50); + GEC(255, 0, 0, 255); + } else { + GPC(255, 255, 255, 50); + GEC(255, 255, 127, 255); + } + GDL(D_60181E0); +} + +#ifdef NON_MATCHING +void func_i3_8019D060(Actor* actor) { + s32 i; + Actor* sp18; + + for (i = 0, sp18 = gActors; i < 60; i++, sp18++) { + if (sp18->obj.status == 0) { + Actor_Initialize(sp18); + sp18->obj.status = 2; + sp18->obj.id = OBJ_ACTOR_247; + sp18->obj.pos.x = actor->obj.pos.x; + sp18->obj.pos.y = actor->obj.pos.y - 60.0f; + sp18->fwork[2] = sp18->obj.pos.y; + sp18->obj.pos.z = actor->obj.pos.z; + + sp18->unk_0B8 = 1; + + actor->unk_046 = i + 1; + Object_SetInfo(&sp18->info, sp18->obj.id); + sp18->info.hitbox = SEGMENTED_TO_VIRTUAL(D_602C028); + break; + } + } +} +#else +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D060.s") +#endif + +void func_i3_8019D15C(Actor* actor) { + Actor* temp_v0; + + if (actor->unk_0B8 == 0) { + if (actor->unk_0D0 != 0) { + actor->unk_0D0 = 0; + if (actor->unk_0D2 < 2) { + Audio_PlaySfx(0x1903001E, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + if ((actor->obj.pos.y + 268.0f) < actor->unk_0D8.y) { + actor->fwork[1] = 20.0f; + } else { + actor->fwork[1] = -20.0f; + } + Audio_PlaySfx(0x1903001F, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } else { + Audio_PlaySfx(0x29121007, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } + } + 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; + } + } + 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_KillSfx(&actor->sfxPos); + } + } +} + +s32 func_i3_8019D340(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Actor* this = thisx; + + switch (this->unk_0B8) { + case 0: + if (limbIndex == 1) { + pos->y -= 60.0f; + rot->z -= this->fwork[0]; + } + if (limbIndex == 3) { + *dList = NULL; + } + break; + case 1: + if (limbIndex != 3) { + *dList = NULL; + } + break; + } + return false; +} + +void func_i3_8019D3C4(Actor* actor) { + Vec3f sp28[10]; + + Animation_GetFrameData(&D_601FBC4, 0, sp28); + Animation_DrawSkeleton(1, D_601FC90, sp28, func_i3_8019D340, NULL, actor, &gIdentityMatrix); +} + +void func_i3_8019D428(Player* player) { + s32 sp2C; + + player->unk_088 += 10.0f; + player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.5f; + player->unk_0F4 += 3.0f; + player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 1.5f; + switch (player->unk_1D0) { /* irregular */ + case 0: + D_80177A80 = 0; + player->pos.z += 10000.0f; + player->camEye.x = D_80177978 = player->pos.x; + player->camEye.y = D_80177980 = (player->pos.y * player->unk_148) + 50.0f; + player->camEye.z = D_80177988 = 400.0f; + player->camAt.x = D_801779A0 = player->pos.x; + player->camAt.y = D_801779B8 = (player->pos.y * player->unk_148) + 20.0f - 230.0f; + player->camAt.z = D_801779C0 = 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); + if (D_80177A80 >= 230) { + Math_SmoothStepToF(&player->camAt.z, player->unk_138, 0.2f, 20000.0f, 0.0f); + } + sp2C = gControllerHold[gMainController].button; + gControllerHold[gMainController].button = gBoostButton[gMainController]; + player->timer_1F8 = 60; + player->unk_2BC = 1.0f; + func_800B2574(player); + if (D_80177A80 > 195) { + D_801779A8[0] = 50.0f; + } else { + D_801779A8[0] = 0.0f; + } + gControllerHold[gMainController].button = sp2C; + if (D_80177A80 >= 270) { + func_8001D444(0, 0x8006, 0, 255); + D_80177838 = 80; + player->state_1C8 = PLAYERSTATE_1C8_3; + player->unk_1D0 = 0; + player->timer_1F8 = 0; + player->timer_1FC = 0; + D_80178488 = 1; + } + break; + } + D_80177CE8 += 40.0f; +} + +#ifdef NON_MATCHING +// more use of temps and chain assigns +void func_i3_8019D76C(Player* player) { + f32 pad[4]; + s32 i; + Vec3f sp58; + Vec3f sp4C; + Actor* var_a0; + f32 temp_fa0; + f32 temp_ft5; + f32 pa2[2]; + + switch (player->unk_1D0) { + case 0: + case 10: + D_80177A80 = 0; + player->unk_4D8 = 0.0f; + player->unk_034 = 0.0f; + player->unk_0D0 = 40.0f; + player->unk_110 = 0.0f; + player->unk_12C = 0.0f; + player->unk_234 = 1; + 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; + D_80177978 = player->camEye.x; + D_80177980 = player->camEye.y; + D_80177988 = player->camEye.z; + D_801779A0 = player->camAt.x; + D_801779B8 = player->camAt.y; + D_801779C0 = player->camAt.z; + for (i = 10; i < 60; i++) { + if (gActors[i].unk_0B6 == 0) { + Object_Kill(&gActors[i].obj, &gActors[i].sfxPos); + } + } + Object_Kill(&gActors[2].obj, &gActors[2].sfxPos); + Object_Kill(&gActors[3].obj, &gActors[3].sfxPos); + Object_Kill(&gActors[4].obj, &gActors[4].sfxPos); + player->unk_1D0 = 1; + D_80177A48[0] = 0.05f; + if (Rand_ZeroOne() > 0.5f) { + D_80177A48[9] = -1.0f; + } else { + D_80177A48[9] = 1.0f; + } + break; + case 1: + D_80177CE8 += 30.0f; + Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); + Math_SmoothStepToF(&D_80177980, 250.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&D_801779B8, 240.0f, 1.0f, 20.0f, 0.0f); + temp_ft5 = Math_RadToDeg( + -Math_Atan2F(player->pos.x - gBosses[0].obj.pos.x, (player->pos.z - gBosses[0].obj.pos.z) * 0.05f)); + temp_fa0 = Math_SmoothStepToAngle(&player->unk_0E8, temp_ft5, 0.5f, 2.0f, 0.0001f) * 30.0f; + if (D_80177A80 >= 14) { + Math_SmoothStepToAngle(&player->unk_0EC, temp_fa0, 0.1f, 5.0f, 0.0001f); + } else if (temp_fa0 < 0.0f) { + player->unk_0EC -= 30.0f; + } else { + player->unk_0EC += 30.0f; + } + if (D_80177A80 >= 140) { + D_80178358 = 255; + D_80178348 = D_80178350 = D_80178354 = 255; + } + if (D_80177A80 == 160) { + player->unk_1D0++; + func_800A6148(); + func_8001CA24(0); + Audio_KillSfx(&player->unk_460); + D_80178340 = 250; + player->timer_1F8 = 20; + player->wings.unk_2C = 1; + player->unk_0D0 = 0.0f; + player->unk_0E4 = 0.0f; + player->unk_0E8 = 0.0f; + player->unk_0EC = 0.0f; + } + break; + case 2: /* switch 1 */ + D_80177CE8 += 60.0f; + if (player->timer_1F8 == 0) { + player->pos.x = 0.0f; + player->pos.y = 200.0f; + player->pos.z = -(D_80177D20 + 1500.0f); + player->unk_1D0++; + func_8001C8B8(0); + func_8001D444(0, 38, 0, 255); + D_80177A98 = 1; + func_800A6148(); + func_i3_801A7750(); + D_80177A48[1] = 0.0f; + D_80177A48[2] = 0.0f; + if (D_80161684 == 0) { + D_80177A48[1] = 330.0f; + player->camEye.x = 1350.0f; + + player->camAt.x = D_801779A0 = 1450.0f; + // 1350.0f; + D_80177A48[3] = 800.0f; + D_80177A48[4] = -0.15f; + D_80177A48[5] = -250.0f; + player->camEye.z = player->pos.z + D_80177D20 - 1780.0f; + } else { + player->camEye.x = -1500.0f; + player->camAt.x = D_801779A0 = -1500.0f; + D_80177A48[3] = -800.0f; + D_80177A48[4] = 0.2f; + D_80177A48[5] = 250.0f; + player->camEye.z = player->pos.z + D_80177D20 - 2000.0f; + } + player->camEye.y = 200.0f; + player->camAt.y = D_801779B8 = player->pos.y; + player->camAt.z = D_801779C0 = player->pos.z + D_80177D20; + D_80177A48[0] = 0.0f; + } + break; + case 3: /* switch 1 */ + D_80177CE8 += 60.0f; + D_80178358 = 0; + D_8017835C = 4; + D_80177A48[1] += D_80177A48[2]; + Matrix_RotateY(gCalcMatrix, D_80177A48[1] * M_DTOR, 0); + sp58.x = 0.0f; + sp58.y = 0.0f; + sp58.z = D_80177A48[3]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); + if (D_80177A80 < 1180) { + D_80177978 = sp4C.x; + D_80177980 = 200.0f + sp4C.y; + D_80177988 = player->pos.z + D_80177D20 + sp4C.z; + D_801779A0 = 0.0f; + D_801779B8 = player->pos.y; + D_801779C0 = D_80177A48[5] + (player->pos.z + D_80177D20); + Math_SmoothStepToF(&D_80177A48[5], 250.0f, 1.0f, 1.0f, 0.0f); + } else { + D_801779A0 = 0.0f; + D_801779B8 = player->pos.y; + D_801779C0 = player->pos.z + D_80177D20; + } + if (D_80177A80 >= 1181) { + player->unk_0D0 += 2.0f; + player->unk_0E4 += 0.1f; + Math_SmoothStepToF(&D_80177A48[2], 0.0f, 1.0f, 0.001f, 0); + player->unk_190 = 2.0f; + if (D_80161684 == 0) { + Math_SmoothStepToF(&D_80177A48[0], 1.0f, 1.0f, 0.025f, 0.0f); + } + } else { + Math_SmoothStepToF(&D_80177A48[2], D_80177A48[4], 1.0f, 0.001f, 0.0f); + Math_SmoothStepToF(&D_80177A48[0], 0.05f, 1.0f, 0.00005f, 0.0f); + } + if (D_80177A80 == 1300) { + func_800A6148(); + } + if (D_80177A80 >= 1271) { + D_80178358 = 255; + D_80178354 = 0; + D_80178350 = 0; + D_80178348 = 0; + D_8017835C = 8; + if (D_80178340 == 255) { + func_8001CA24(0); + func_8001DBD0(10); + player->state_1C8 = PLAYERSTATE_1C8_6; + player->timer_1F8 = 0; + D_8017837C = 4; + D_800D3180[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; + } + } + break; + } + (void) "Demo_Time %d\n"; + switch (D_80177A80) { + case 320: + if (D_80161684 == 0) { + D_80177930 = 1; + } + D_80177840 = 100; + break; + case 380: + func_800BA808(gMsg_ID_20010, RCID_FOX); + break; + case 468: + switch (gTeamShields[2]) { + case 0: + func_800BA808(gMsg_ID_20345, RCID_ROB64); + break; + case -1: + func_800BA808(gMsg_ID_20339, RCID_ROB64); + break; + default: + func_80048AC0(2); + break; + } + break; + case 603: + switch (gTeamShields[3]) { + case 0: + func_800BA808(gMsg_ID_20344, RCID_ROB64); + break; + case -1: + func_800BA808(gMsg_ID_20338, RCID_ROB64); + break; + default: + if (D_80161684 == 0) { + func_80048AC0(3); + } else { + func_800BA808(gMsg_ID_6100, RCID_PEPPY); + } + break; + } + break; + case 738: + switch (gTeamShields[1]) { + case 0: + func_800BA808(gMsg_ID_20343, RCID_ROB64); + break; + case -1: + func_800BA808(gMsg_ID_20337, RCID_ROB64); + break; + default: + func_800BA808(gMsg_ID_6101, RCID_FALCO); + break; + } + break; + case 906: /* switch 2 */ + D_80177830 = 1; + break; + case 1106: /* switch 2 */ + D_80177830 = 0; + break; + case 1180: /* switch 2 */ + Audio_PlaySfx(0x09000002, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + player->unk_190 = player->unk_194 = 5.0f; + break; + case 1240: /* switch 2 */ + func_800182F4(0x103200FF); + func_800182F4(0x113200FF); + break; + case 1120: /* switch 2 */ + if (gTeamShields[3] > 0) { + gActors[0].unk_0B8 = 2; + } + break; + case 1140: /* switch 2 */ + if (gTeamShields[2] > 0) { + gActors[1].unk_0B8 = 2; + } + break; + case 1160: /* switch 2 */ + if (gTeamShields[1] > 0) { + gActors[2].unk_0B8 = 2; + } + break; + } + if (D_80177A80 >= 1180) { + player->unk_25C += 0.02f; + if (player->unk_25C > 0.6f) { + 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); + sp58.x = 0.0f; + sp58.y = 0.0f; + sp58.z = player->unk_0D0; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); + player->vel.x = sp4C.x; + player->vel.z = sp4C.z; + 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; + Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + player->unk_088 += 10.0f; + player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f; + player->unk_0F4 += 8.0f; + player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR); +} +#else +// zoness outro +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D76C.s") +#endif + +void func_i3_8019E5F0(Actor* actor) { + Vec3f sp34; + Vec3f sp28; + + (void) "Demo_Time %d\n"; // goes in above function, probably + switch (actor->unk_0B8) { + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + case 1: + if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < D_80177A80)) { + actor->unk_0B8 = 4; + } + break; + case 2: + actor->unk_0B8 = 3; + Audio_PlaySfx(0x09000002, &actor->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->fwork[29] = 5.0f; + /* fallthrough */ + case 3: + actor->iwork[11] = 2; + actor->fwork[0] += 2.0f; + actor->unk_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, 0); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + 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; + + 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; +} diff --git a/src/overlays/ovl_i3/sf_aq.c b/src/overlays/ovl_i3/sf_aq.c new file mode 100644 index 00000000..e707e897 --- /dev/null +++ b/src/overlays/ovl_i3/sf_aq.c @@ -0,0 +1,649 @@ +#include "global.h" + +void func_i3_801AC918(Effect*); +void func_i3_801AD6C0(Actor*); +void func_i3_801AE168(Actor*); +void func_i3_801AE3D8(Actor*); +void func_i3_801AEB44(Actor*); +void func_i3_801AFA5C(Actor*); +void func_i3_801B099C(Actor*); +void func_i3_801B0B60(Actor*); +void func_i3_801B0EC0(Actor*); +void func_i3_801B504C(Actor*); +void func_i3_801B50E8(Actor*); +void func_i3_801B619C(Actor*); +void func_i3_801B638C(Actor*); +void func_i3_801B6FF8(Actor*); +void func_i3_801B7A24(Actor*); +void func_i3_801B7C78(Actor*); +void func_i3_801B90DC(Actor*); +void func_i3_801B91A4(Actor*); +void func_i3_801BA108(Actor*); +void func_i3_801BA26C(Actor*); +void func_i3_801BA4E4(Actor*); +void func_i3_801BA6A4(Actor*); +void func_i3_801BAD7C(Actor*); +void func_i3_801BADF8(Actor*); +void func_i3_801BB204(Actor*); +void func_i3_801BB79C(Actor*); +void func_i3_801BC930(Actor*); +void func_i3_801BC9A0(Actor*); +void func_i3_801BD264(Actor*); +void func_i3_801BD54C(Actor*); +void func_i3_801BDE6C(Actor*); +void func_i3_801BE1FC(Object_80*); +void func_i3_801BE3F8(Actor*); +void func_i3_801BEB1C(Actor*); +void func_i3_801BEC68(Actor*); +void func_i3_801BEC74(Actor*); + +typedef enum { + /* 0 */ AQ_SWK_0, + /* 1 */ AQ_SWK_1, + /* 2 */ AQ_SWK_2, + /* 3 */ AQ_SWK_3, + /* 4 */ AQ_SWK_4, + /* 5 */ AQ_SWK_5, + /* 6 */ AQ_SWK_6, + /* 7 */ AQ_SWK_7, + /* 8 */ AQ_SWK_8, + /* 9 */ AQ_SWK_9, + /* 10 */ AQ_SWK_10, + /* 11 */ AQ_SWK_11, + /* 12 */ AQ_SWK_12, + /* 13 */ AQ_SWK_13, + /* 14 */ AQ_SWK_14, + /* 15 */ AQ_SWK_15, + /* 16 */ AQ_SWK_16, + /* 17 */ AQ_SWK_17, + /* 18 */ AQ_SWK_18, + /* 19 */ AQ_SWK_19, + /* 20 */ AQ_SWK_20, + /* 21 */ AQ_SWK_21, + /* 22 */ AQ_SWK_22, + /* 23 */ AQ_SWK_23, + /* 24 */ AQ_SWK_24, + /* 25 */ AQ_SWK_25, + /* 26 */ AQ_SWK_26, + /* 27 */ AQ_SWK_27, + /* 28 */ AQ_SWK_28, + /* 29 */ AQ_SWK_29, + /* 30 */ AQ_SWK_30, + /* 31 */ AQ_SWK_31, + /* 32 */ AQ_SWK_32, + /* 33 */ AQ_SWK_33, + /* 34 */ AQ_SWK_34, + /* 35 */ AQ_SWK_35, + /* 36 */ AQ_SWK_36, + /* 37 */ AQ_SWK_37, + /* 38 */ AQ_SWK_38, + /* 39 */ AQ_SWK_39, + /* 40 */ AQ_SWK_MAX, +} BossAQswork; + +typedef enum { + /* 0 */ AQ_FWK_0, + /* 1 */ AQ_FWK_1, + /* 2 */ AQ_FWK_2, + /* 3 */ AQ_FWK_3, + /* 4 */ AQ_FWK_4, + /* 5 */ AQ_FWK_5, + /* 6 */ AQ_FWK_6, + /* 7 */ AQ_FWK_7, + /* 8 */ AQ_FWK_8, + /* 9 */ AQ_FWK_9, + /* 10 */ AQ_FWK_10, + /* 11 */ AQ_FWK_11, + /* 12 */ AQ_FWK_12, + /* 13 */ AQ_FWK_13, + /* 14 */ AQ_FWK_14, + /* 15 */ AQ_FWK_15, + /* 16 */ AQ_FWK_16, + /* 17 */ AQ_FWK_17, + /* 18 */ AQ_FWK_18, + /* 19 */ AQ_FWK_19, + /* 20 */ AQ_FWK_20, + /* 21 */ AQ_FWK_21, + /* 22 */ AQ_FWK_22, + /* 23 */ AQ_FWK_23, + /* 24 */ AQ_FWK_24, + /* 25 */ AQ_FWK_25, + /* 26 */ AQ_FWK_26, + /* 27 */ AQ_FWK_27, + /* 28 */ AQ_FWK_28, + /* 29 */ AQ_FWK_29, + /* 30 */ AQ_FWK_30, + /* 31 */ AQ_FWK_31, + /* 32 */ AQ_FWK_32, + /* 33 */ AQ_FWK_33, + /* 34 */ AQ_FWK_34, + /* 35 */ AQ_FWK_35, + /* 36 */ AQ_FWK_36, + /* 37 */ AQ_FWK_37, + /* 38 */ AQ_FWK_38, + /* 39 */ AQ_FWK_39, + /* 40 */ AQ_FWK_40, + /* 41 */ AQ_FWK_41, + /* 42 */ AQ_FWK_42, + /* 43 */ AQ_FWK_43, + /* 44 */ AQ_FWK_44, + /* 45 */ AQ_FWK_45, + /* 46 */ AQ_FWK_46, + /* 47 */ AQ_FWK_47, + /* 48 */ AQ_FWK_48, + /* 49 */ AQ_FWK_49, + /* 50 */ AQ_FWK_MAX, +} BossAQfwork; + +typedef enum { + /* 0 */ AQ_VWK_0, + /* 1 */ AQ_VWK_1, + /* 2 */ AQ_VWK_2, + /* 3 */ AQ_VWK_3, + /* 4 */ AQ_VWK_4, + /* 5 */ AQ_VWK_5, + /* 6 */ AQ_VWK_6, + /* 7 */ AQ_VWK_7, + /* 8 */ AQ_VWK_8, + /* 9 */ AQ_VWK_9, + /* 10 */ AQ_VWK_10, + /* 11 */ AQ_VWK_11, + /* 12 */ AQ_VWK_12, + /* 13 */ AQ_VWK_13, + /* 14 */ AQ_VWK_14, + /* 15 */ AQ_VWK_15, + /* 16 */ AQ_VWK_16, + /* 17 */ AQ_VWK_17, + /* 18 */ AQ_VWK_18, + /* 19 */ AQ_VWK_19, + /* 20 */ AQ_VWK_20, + /* 21 */ AQ_VWK_21, + /* 22 */ AQ_VWK_22, + /* 23 */ AQ_VWK_23, + /* 24 */ AQ_VWK_24, + /* 25 */ AQ_VWK_25, + /* 26 */ AQ_VWK_26, + /* 27 */ AQ_VWK_27, + /* 28 */ AQ_VWK_28, + /* 29 */ AQ_VWK_29, + /* 30 */ AQ_VWK_30, + /* 31 */ AQ_VWK_31, + /* 32 */ AQ_VWK_32, + /* 33 */ AQ_VWK_33, + /* 34 */ AQ_VWK_34, + /* 35 */ AQ_VWK_35, + /* 36 */ AQ_VWK_36, + /* 37 */ AQ_VWK_37, + /* 38 */ AQ_VWK_38, + /* 39 */ AQ_VWK_39, + /* 40 */ AQ_VWK_40, + /* 41 */ AQ_VWK_41, + /* 42 */ AQ_VWK_42, + /* 43 */ AQ_VWK_43, + /* 44 */ AQ_VWK_44, + /* 45 */ AQ_VWK_45, + /* 46 */ AQ_VWK_46, + /* 47 */ AQ_VWK_47, + /* 48 */ AQ_VWK_48, + /* 49 */ AQ_VWK_49, + /* 50 */ AQ_VWK_MAX, +} BossAQvwork; + +f32 D_i3_801BFB60 = 0.0f; +s32 D_i3_801BFB64[11] = { + 0, 30, 27, 24, 21, 18, 15, 12, 9, 6, 3, +}; +u8 D_i3_801BFB90[12] = { + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, +}; +Gfx* D_i3_801BFB9C[3] = { D_6015FF0, D_6022110, D_6015DD0 }; +f32 D_i3_801BFBA8[2] = { 40.0f, -40.0f }; +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_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_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 }, +}; +s32 D_i3_801BFC70[3] = { 18, 22, 45 }; +f32 D_i3_801BFC7C[3] = { 20.0f, 10.0f, 0.0f }; +f32 D_i3_801BFC88[3] = { 10.0f, 320.0f, 30.0f }; +Vec3f D_i3_801BFC94[6][4] = { + { { 1.0f, 1.0f, 1.0f }, { 0.9f, 0.9f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 0.9f, 0.9f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 0.9f, 0.9f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 0.9f, 1.0f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 0.9f, 1.0f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 1.0f, 0.8f, 0.9f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f } }, +}; +s32 D_i3_801BFDB4[6][4] = { + { 1, 5, 15, 100000 }, { 1, 5, 15, 100000 }, { 1, 5, 15, 100000 }, + { 1, 10, 20, 100000 }, { 1, 10, 20, 100000 }, { 1, 10, 20, 100000 }, +}; +s32 D_i3_801BFE14 = 0; +Vec3f D_i3_801BFE18[6][4] = { + { { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f } }, + { { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f } }, + { { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f }, { 0.4f, 0.4f, 0.4f } }, + { { 0.2f, 0.2f, 0.2f }, { 0.3f, 0.3f, 0.3f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f } }, + { { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f } }, + { { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f }, { 0.2f, 0.2f, 0.2f } }, +}; +Vec3f D_i3_801BFF38[6][4] = { + { { 1.0f, 1.0f, 1.0f }, { 5.0f, 5.0f, 5.0f }, { 10.0f, 10.0f, 10.0f }, { 5.0f, 5.0f, 5.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 5.0f, 5.0f, 5.0f }, { 10.0f, 10.0f, 10.0f }, { 5.0f, 5.0f, 5.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 3.0f, 3.0f, 3.0f }, { 2.0f, 2.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 3.0f, 1.0f, 3.0f }, { 2.0f, 1.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 3.0f, 1.0f, 3.0f }, { 2.0f, 1.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, + { { 1.0f, 1.0f, 1.0f }, { 1.0f, 4.0f, 3.0f }, { 1.0f, 3.0f, 2.0f }, { 1.0f, 1.0f, 1.0f } }, +}; +f32 D_i3_801C0058 = 191.0f; +f32 D_i3_801C005C = 63.0f; +f32 D_i3_801C0060[14] = { + 50.0f, 8.0f, 50.0f, 8.0f, 10.0f, 1.0f, 20.0f, 2.0f, 20.0f, 2.0f, 20.0f, 2.0f, 50.0f, 2.0f, +}; +Vec3f D_i3_801C0098[2] = { + { 370.0f, -53.0f, 1085.0f }, + { -370.0f, -53.0f, 1085.0f }, +}; +f32 D_i3_801C00B0[3][4] = { + { 1.0f, 1.2f, 0.8f, 1.0f }, + { 1.0f, 1.2f, 0.9f, 1.0f }, + { 1.0f, 0.7f, 1.4f, 1.0f }, +}; +s32 D_i3_801C00E0[4] = { 1, 5, 8, 40 }; +f32 D_i3_801C00F0[3][4] = { + { 0.3f, 0.3f, 0.3f, 0.3f }, + { 0.3f, 0.3f, 0.3f, 0.3f }, + { 0.5f, 0.5f, 0.5f, 0.5f }, +}; +f32 D_i3_801C0120[3][4] = { + { 1.0f, 1.0f, 1.0f, 1.0f }, + { 1.0f, 1.0f, 1.0f, 1.0f }, + { 2.0f, 2.0f, 2.0f, 2.0f }, +}; +f32 D_i3_801C0150[4][4] = { + { 0.0f, 0.0f, 0.0f, 0.0f }, + { 0.0f, -25.5f, 0.0f, 0.0f }, + { -25.5f, 25.5f, -25.5f, 0.0f }, + { 25.5f, 0.0f, 25.5f, 0.0f }, +}; +f32 D_i3_801C0190[5] = { + 0.0f, -30.0f, 30.0f, -30.0f, 30.0f, +}; +Vec3f D_i3_801C01A4 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C01B0 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C01BC = { 340.0f, 600.0f, 1480.0f }; +Vec3f D_i3_801C01C8 = { -640.0f, 380.0f, 1520.0f }; +Vec3f D_i3_801C01D4 = { 760.0f, 340.0f, 1560.0f }; +Vec3f D_i3_801C01E0 = { 130.0f, 350.0f, 130.0f }; +Vec3f D_i3_801C01EC = { -130.0f, 350.0f, 130.0f }; +f32 D_i3_801C01F8[11] = { + 400.0f, 430.0f, 460.0f, 490.0f, 520.0f, 550.0f, 580.0f, 610.0f, 640.0f, 670.0f, 700.0f, +}; +f32 D_i3_801C0224[11] = { + 6.0f, 6.0f, 8.0f, 8.0f, 8.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, +}; +Vec3f D_i3_801C0250 = { 0.0f, 0.0f, 0.0f }; +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, +}; +Vec3f D_i3_801C02B0 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C02BC = { 0.0f, 0.0f, 0.0f }; +f32 D_i3_801C02C8[2] = { 255.0f, 68.0f }; +s32 D_i3_801C02D0[2] = { 70, 100 }; +Vec3f D_i3_801C02D8 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C02E4 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C02F0 = { 108.0f, 0.0f, 24.0f }; +Vec3f D_i3_801C02FC = { 102.0f, 14.0f, -21.0f }; +Vec3f D_i3_801C0308 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C0314 = { 0.0f, 0.0f, 50.0f }; +Vec3f D_i3_801C0320 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C032C = { -27.0f, 7.0f, 5.0f }; +Vec3f D_i3_801C0338 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i3_801C0344[4] = { + { -6.4f, -4.6f, -7.8f }, + { 6.4f, 4.6f, 7.8f }, + { -5.9f, -7.8f, -7.0f }, + { 5.9f, 7.8f, 7.0f }, +}; +Vec3f D_i3_801C0374[17] = { + { 1.0f, 1.0f, 1.0f }, { 1.3f, 0.8f, 1.3f }, { 1.0f, 1.2f, 1.0f }, { 1.3f, 0.8f, 1.3f }, + { 1.0f, 1.0f, 1.0f }, { 1.3f, 1.0f, 1.3f }, { 1.0f, 1.0f, 1.0f }, { 1.3f, 1.0f, 1.3f }, + { 1.0f, 1.0f, 1.0f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, + { 1.0f, 1.05f, 1.0f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, { 0.85f, 0.95f, 0.85f }, + { 0.85f, 0.95f, 0.85f }, +}; +s32 D_i3_801C0440[24] = { + 0, 30, 60, 90, 0, 0, 0, 0, 0, 15, 30, 45, 0, 0, 0, 0, 0, 15, 30, 45, 60, 75, 90, 105, +}; +s32 D_i3_801C04A0[6] = { + 15, -15, 10, -10, 7, -7, +}; +Vec3f D_i3_801C04B8 = { 0.0f, 0.0f, 0.0f }; +s32 D_i3_801C04C4[9] = { + 1, 5, 9, 14, 15, 16, 17, 0, 13, +}; +Vec3f D_i3_801C04E8 = { 0.0f, 0.0f, 0.0f }; +f32 D_i3_801C04F4[4] = { 700.0f, 300.0f, 600.0f, 400.0f }; +Vec3f D_i3_801C0504[50] = { + { 416.0f, 440.0f, -4182.0f }, { 437.0f, 440.0f, -4178.0f }, { 510.0f, 420.0f, -4156.0f }, + { 168.0f, 361.0f, -4168.0f }, { 434.0f, 440.0f, -4162.0f }, { 465.0f, 465.0f, -4146.0f }, + { 464.0f, 493.0f, -4124.0f }, { 426.0f, 395.0f, -4136.0f }, { 457.0f, 440.0f, -4112.0f }, + { 480.0f, 487.0f, -4110.0f }, { 454.0f, 440.0f, -4256.0f }, { 179.0f, 507.0f, -4272.0f }, + { 442.0f, 392.0f, -4242.0f }, { 450.0f, 481.0f, -4248.0f }, { 474.0f, 420.0f, -4232.0f }, + { 376.0f, 440.0f, -4196.0f }, { 463.0f, 507.0f, -4190.0f }, { 467.0f, 424.0f, -4208.0f }, + { 394.0f, 404.0f, -4186.0f }, { 256.0f, 440.0f, -3680.0f }, { 243.0f, 515.0f, -3648.0f }, + { 277.0f, 390.0f, -3662.0f }, { 234.0f, 457.0f, -3664.0f }, { 561.0f, 440.0f, -4332.0f }, + { 550.0f, 514.0f, -4346.0f }, { 568.0f, 404.0f, -4304.0f }, { 580.0f, 545.0f, -4350.0f }, + { 552.0f, 382.0f, -4292.0f }, { 528.0f, 462.0f, -4322.0f }, { 558.0f, 440.0f, -4294.0f }, + { 396.0f, 440.0f, -4284.0f }, { 391.0f, 363.0f, -4254.0f }, { 379.0f, 501.0f, -4254.0f }, + { 428.0f, 440.0f, -4246.0f }, { 374.0f, 440.0f, -4282.0f }, { 373.0f, 342.0f, -4290.0f }, + { 353.0f, 570.0f, -4266.0f }, { 359.0f, 440.0f, -4232.0f }, { 399.0f, 216.0f, -4246.0f }, + { 406.0f, 251.0f, -4222.0f }, { 380.0f, 189.0f, -4248.0f }, { 370.0f, 278.0f, -4214.0f }, + { 383.0f, 237.0f, -4266.0f }, { 360.0f, 299.0f, -4320.0f }, { 359.0f, 266.0f, -4280.0f }, + { 354.0f, 211.0f, -4256.0f }, { 391.0f, 238.0f, -4192.0f }, { 340.0f, 294.0f, -4216.0f }, + { 423.0f, 242.0f, -4200.0f }, { 429.0f, 311.0f, -4138.0f }, +}; +f32 D_i3_801C075C[51] = { + 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, + 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 320.0f, 320.0f, 320.0f, 320.0f, 40.0f, 40.0f, 40.0f, + 40.0f, 40.0f, 40.0f, 40.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, + 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 28.0f, 10.0f, 28.0f, 28.0f, +}; +f32 D_i3_801C0828[51] = { + 210.0f, 250.0f, 170.0f, 200.0f, 225.0f, 240.0f, 220.0f, 180.0f, 210.0f, 230.0f, 355.0f, 349.0f, 357.0f, + 12.0f, 357.0f, 65.0f, 256.0f, 250.0f, 88.0f, 0.0f, 0.0f, 0.0f, 9.0f, 14.0f, 35.0f, 40.0f, + 5.0f, 92.0f, 56.0f, 71.0f, 355.0f, 326.0f, 30.0f, 5.0f, 30.0f, 30.0f, 60.0f, 69.0f, 1.0f, + 346.0f, 30.0f, 97.0f, 30.0f, 30.0f, 30.0f, 30.0f, 162.0f, 98.0f, 10.0f, 213.0f, 30.0f, +}; +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]; +f32 D_i3_801C4188; +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; +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") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A92EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9374.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9448.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A94EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A958C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A95C8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A96DC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9728.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9824.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A99D4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9C98.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9DE4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801A9ED0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AA20C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AA4BC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AA8E8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AACF8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AB9B0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801ABA40.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AC09C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AC18C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AC274.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AC7C8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AC8A8.s") + +// OBJ_EFFECT_366 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AC918.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801ACBB4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801ACE50.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AD328.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AD598.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AD688.s") + +// OBJ_ACTOR_255 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AD6C0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801ADF7C.s") + +// OBJ_ACTOR_255 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AE168.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AE3AC.s") + +// OBJ_ACTOR_256 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AE3D8.s") + +// OBJ_ACTOR_256 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AEB44.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AF9FC.s") + +// OBJ_ACTOR_257 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801AFA5C.s") + +// OBJ_ACTOR_257 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B099C.s") + +// OBJ_ACTOR_258 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B0B60.s") + +// OBJ_ACTOR_258 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B0EC0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B0F88.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B0FCC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B1008.s") + +// OBJ_BOSS_AQ init +void func_i3_801B10F8(Boss* bossAQ); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B10F8.s") + +// OBJ_BOSS_AQ action +void func_i3_801B134C(Boss* bossAQ); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B134C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B42AC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B49DC.s") + +// OBJ_BOSS_AQ draw +void func_i3_801B4D84(Boss* bossAQ); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B4D84.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B4DDC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B4E94.s") + +// OBJ_ACTOR_261 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B504C.s") + +// OBJ_ACTOR_261 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B50E8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B5C18.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B5F68.s") + +// OBJ_ACTOR_259 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B619C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B6344.s") + +// OBJ_ACTOR_259 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B638C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B6E54.s") + +// OBJ_ACTOR_262 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B6FF8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B76EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B7754.s") + +// OBJ_ACTOR_262 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B7A24.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B7AF0.s") + +// OBJ_ACTOR_260 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B7C78.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B8C50.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B8D7C.s") + +// OBJ_ACTOR_260 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B90DC.s") + +// OBJ_ACTOR_263 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B91A4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801B9DB0.s") + +// OBJ_ACTOR_263 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BA108.s") + +// OBJ_ACTOR_264 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BA26C.s") + +// OBJ_ACTOR_264 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BA4E4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BA57C.s") + +// OBJ_ACTOR_265 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BA6A4.s") + +// OBJ_ACTOR_265 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BAD7C.s") + +// OBJ_ACTOR_266 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BADF8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BB0C4.s") + +// OBJ_ACTOR_266 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BB204.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BB26C.s") + +// OBJ_ACTOR_267 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BB79C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BC530.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BC91C.s") + +// OBJ_ACTOR_267 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BC930.s") + +// OBJ_ACTOR_269 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BC9A0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BD17C.s") + +// OBJ_ACTOR_269 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BD264.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BD3B0.s") + +// OBJ_ACTOR_268 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BD54C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BDDFC.s") + +// OBJ_ACTOR_268 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BDE6C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BDF14.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BE034.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BE0F0.s") + +// OBJ_80_126 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BE1FC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BE274.s") + +// OBJ_ACTOR_270 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BE3F8.s") + +// OBJ_ACTOR_270 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BEB1C.s") + +// OBJ_BOSS_301 action +void func_i3_801BEC50(Boss* boss301) { +} + +// OBJ_BOSS_301 draw +void func_i3_801BEC5C(Boss* boss301) { +} + +// OBJ_ACTOR_188 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BEC68.s") + +// OBJ_ACTOR_188 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BEC74.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BEC80.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/func_i3_801BEC8C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_aq/D_i3_801C1A30.s") diff --git a/src/overlays/ovl_i3/sf_so.c b/src/overlays/ovl_i3/sf_so.c new file mode 100644 index 00000000..acf6eebf --- /dev/null +++ b/src/overlays/ovl_i3/sf_so.c @@ -0,0 +1,1242 @@ +#include "global.h" + +typedef void (*BossSOfunc)(Boss*); + +typedef enum { + /* 0 */ SO_SWK_0, + /* 1 */ SO_SWK_1, + /* 2 */ SO_SWK_2, + /* 3 */ SO_SWK_3, + /* 4 */ SO_SWK_4, + /* 5 */ SO_SWK_5, + /* 6 */ SO_SWK_6, + /* 7 */ SO_SWK_7, + /* 8 */ SO_SWK_8, + /* 9 */ SO_SWK_9, + /* 10 */ SO_SWK_10, + /* 11 */ SO_SWK_11, + /* 12 */ SO_SWK_12, + /* 13 */ SO_SWK_13, + /* 14 */ SO_SWK_14, + /* 15 */ SO_SWK_15, + /* 16 */ SO_SWK_16, + /* 17 */ SO_SWK_17, + /* 18 */ SO_SWK_18, + /* 19 */ SO_SWK_19, + /* 20 */ SO_SWK_20, + /* 21 */ SO_SWK_21, + /* 22 */ SO_SWK_22, + /* 23 */ SO_SWK_23, + /* 24 */ SO_SWK_24, + /* 25 */ SO_SWK_25, + /* 26 */ SO_SWK_26, + /* 27 */ SO_SWK_27, + /* 28 */ SO_SWK_28, + /* 29 */ SO_SWK_29, + /* 30 */ SO_SWK_30, + /* 31 */ SO_SWK_31, + /* 32 */ SO_SWK_32, + /* 33 */ SO_SWK_33, + /* 34 */ SO_SWK_34, + /* 35 */ SO_SWK_35, + /* 36 */ SO_SWK_36, + /* 37 */ SO_SWK_37, + /* 38 */ SO_SWK_38, + /* 39 */ SO_SWK_39, + /* 40 */ SO_SWK_MAX, +} BossSOswork; + +typedef enum { + /* 0 */ SO_FWK_0, + /* 1 */ SO_FWK_1, + /* 2 */ SO_FWK_2, + /* 3 */ SO_FWK_3, + /* 4 */ SO_FWK_4, + /* 5 */ SO_FWK_5, + /* 6 */ SO_FWK_6, + /* 7 */ SO_FWK_7, + /* 8 */ SO_FWK_8, + /* 9 */ SO_FWK_9, + /* 10 */ SO_FWK_10, + /* 11 */ SO_FWK_11, + /* 12 */ SO_FWK_12, + /* 13 */ SO_FWK_13, + /* 14 */ SO_FWK_14, + /* 15 */ SO_FWK_15, + /* 16 */ SO_FWK_16, + /* 17 */ SO_FWK_17, + /* 18 */ SO_FWK_18, + /* 19 */ SO_FWK_19, + /* 20 */ SO_FWK_20, + /* 21 */ SO_FWK_21, + /* 22 */ SO_FWK_22, + /* 23 */ SO_FWK_23, + /* 24 */ SO_FWK_24, + /* 25 */ SO_FWK_25, + /* 26 */ SO_FWK_26, + /* 27 */ SO_FWK_27, + /* 28 */ SO_FWK_28, + /* 29 */ SO_FWK_29, + /* 30 */ SO_FWK_30, + /* 31 */ SO_FWK_31, + /* 32 */ SO_FWK_32, + /* 33 */ SO_FWK_33, + /* 34 */ SO_FWK_34, + /* 35 */ SO_FWK_35, + /* 36 */ SO_FWK_36, + /* 37 */ SO_FWK_37, + /* 38 */ SO_FWK_38, + /* 39 */ SO_FWK_39, + /* 40 */ SO_FWK_40, + /* 41 */ SO_FWK_41, + /* 42 */ SO_FWK_42, + /* 43 */ SO_FWK_43, + /* 44 */ SO_FWK_44, + /* 45 */ SO_FWK_45, + /* 46 */ SO_FWK_46, + /* 47 */ SO_FWK_47, + /* 48 */ SO_FWK_48, + /* 49 */ SO_FWK_49, + /* 50 */ SO_FWK_MAX, +} BossSOfwork; + +typedef enum { + /* 0 */ SO_VWK_0, + /* 1 */ SO_VWK_1, + /* 2 */ SO_VWK_2, + /* 3 */ SO_VWK_3, + /* 4 */ SO_VWK_4, + /* 5 */ SO_VWK_5, + /* 6 */ SO_VWK_6, + /* 7 */ SO_VWK_7, + /* 8 */ SO_VWK_8, + /* 9 */ SO_VWK_9, + /* 10 */ SO_VWK_10, + /* 11 */ SO_VWK_11, + /* 12 */ SO_VWK_12, + /* 13 */ SO_VWK_13, + /* 14 */ SO_VWK_14, + /* 15 */ SO_VWK_15, + /* 16 */ SO_VWK_16, + /* 17 */ SO_VWK_17, + /* 18 */ SO_VWK_18, + /* 19 */ SO_VWK_19, + /* 20 */ SO_VWK_20, + /* 21 */ SO_VWK_21, + /* 22 */ SO_VWK_22, + /* 23 */ SO_VWK_23, + /* 24 */ SO_VWK_24, + /* 25 */ SO_VWK_25, + /* 26 */ SO_VWK_26, + /* 27 */ SO_VWK_27, + /* 28 */ SO_VWK_28, + /* 29 */ SO_VWK_29, + /* 30 */ SO_VWK_30, + /* 31 */ SO_VWK_31, + /* 32 */ SO_VWK_32, + /* 33 */ SO_VWK_33, + /* 34 */ SO_VWK_34, + /* 35 */ SO_VWK_35, + /* 36 */ SO_VWK_36, + /* 37 */ SO_VWK_37, + /* 38 */ SO_VWK_38, + /* 39 */ SO_VWK_39, + /* 40 */ SO_VWK_40, + /* 41 */ SO_VWK_41, + /* 42 */ SO_VWK_42, + /* 43 */ SO_VWK_43, + /* 44 */ SO_VWK_44, + /* 45 */ SO_VWK_45, + /* 46 */ SO_VWK_46, + /* 47 */ SO_VWK_47, + /* 48 */ SO_VWK_48, + /* 49 */ SO_VWK_49, + /* 50 */ SO_VWK_MAX, +} BossSOvwork; + +void func_i3_801A1F80(Boss* bossSO); +void func_i3_801A23F4(Boss* bossSO); +void func_i3_801A2C98(Boss* bossSO); +void func_i3_801A3128(Boss* bossSO); +void func_i3_801A3510(Boss* bossSO); +void func_i3_801A4214(Boss* bossSO); +void func_i3_801A4A34(Boss* bossSO); +void func_i3_801A4EF8(Boss* bossSO); +void func_i3_801A56B8(Boss* bossSO); + +void func_i3_801A239C(Boss* bossSO); +void func_i3_801A2C3C(Boss* bossSO); +void func_i3_801A3468(Boss* bossSO); +void func_i3_801A48B8(Boss* bossSO); +void func_i3_801A4EC0(Boss* bossSO); +void func_i3_801A8DB8(Vec3f* arg0, u32 arg1, f32 arg2); + +void func_i3_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 arg6); +void func_i3_8019FF44(Boss* bossSO, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 arg6); +void func_i3_801A1EB0(Boss* bossSO, f32, f32, f32, f32); +void func_i3_801A3C4C(Boss* bossSO); + +s32 D_i3_801C2740[10]; +f32 D_i3_801C2768[14]; +s32 D_i3_801C27A0[8]; // unused? part of previous? + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019E7F0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019E8B8.s") + +void func_i3_8019E920(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, + s32 unk4E) { + Effect_Initialize(effect); + effect->obj.status = 2; + effect->obj.id = 392; + effect->unk_4E = unk4E; + if (unk4E == 2) { + effect->timer_50 = 30; + effect->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_ZeroOne() * 360.0f; + effect->unk_44 = 176; + effect->scale2 = scale2; + Object_SetInfo(&effect->info, effect->obj.id); +} + +void func_i3_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--) { + if (gEffects[i].obj.status == 0) { + func_i3_8019E920(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, unk4E); + break; + } + } +} + +// OBJ_ACTOR_278 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019EA7C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019EF30.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019F038.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019F0B0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019F194.s") + +f32 D_i3_801BF8E0[4] = { 10.0f, 6.0f, -6.0f, -10.0f }; +Vec3f D_i3_801BF8F0[4] = { + { 10.0f, 7.0f, 0.0f }, + { -10.0f, 7.0f, 0.0f }, + { 7.0f, 10.0f, 0.0f }, + { -7.0f, 10.0f, 0.0f }, +}; +// OBJ_ACTOR_275, 276, 277 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019F20C.s") + +// OBJ_ACTOR_275, 276, 277 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019F7AC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019F99C.s") + +Vec3f D_i3_801BF920 = { 0.0f, 0.0f, 0.0f }; +void func_i3_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 arg6) { + Vec3f sp44; + Vec3f sp38; + Vec3f sp2C = D_i3_801BF920; + + Effect_Initialize(effect); + effect->obj.status = 2; + effect->obj.id = OBJ_EFFECT_392; + effect->obj.pos.x = xPos; + effect->obj.pos.y = yPos; + effect->obj.pos.z = zPos; + effect->vel.y = yVel; + effect->vel.x = 0.0f; + effect->scale2 = 10.0f; + + if (gBossHealthBar != 0) { + if (gBosses[0].fwork[0x1F] > 0.0f) { + if (gBosses[0].swork[0] != 7) { + Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * 0.017453292f, 0); + sp44.y = 0.0f; + sp44.z = 0.0f; + sp44.x = gBosses[0].fwork[31] * 5.0f; + Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); + effect->vel.x = sp38.x * arg6; + effect->vel.z = gPlayer[0].vel.z + (sp38.z * arg6); + } else { + Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * 0.017453292f, 0); + Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * 0.017453292f, 1); + Matrix_RotateY(gCalcMatrix, gBosses[0].unk_078.y * 0.017453292f, 1); + 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].actionState >= 2) { + effect->scale2 = 15.0f; + } + } + } else { + effect->vel.z = gPlayer[0].vel.z; + } + } else { + effect->vel.x = (Rand_ZeroOne() - 0.5f) * 30.0f; + effect->vel.z = (Rand_ZeroOne() - 0.5f) * 30.0f; + } + effect->unk_60.y = bossSO->obj.rot.y; + effect->unk_60.x = 90.0f; + effect->obj.rot.z = Rand_ZeroOne() * 360.0f; + effect->unk_44 = 255; + effect->unk_48 = 1; + effect->unk_4E = 4; + effect->unk_4C = 5; + Object_SetInfo(&effect->info, effect->obj.id); +} + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019FDE0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019FEE8.s") + +void func_i3_8019FF44(Boss* bossSO, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 arg6) { + s32 i; + + for (i = 70; i >= 0; i--) { + if (gEffects[i].obj.status == 0) { + func_i3_8019FAA4(bossSO, &gEffects[i], xPos, yPos, zPos, yVel, arg6); + break; + } + } +} + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_8019FFC0.s") + +// OBJ_ACTOR_279 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A003C.s") + +// OBJ_EFFECT_392 action +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A0120.s") + +u32 D_i3_801BF92C[6] = { + 0x0200B630, 0x0200A5A0, 0x02009510, 0x060084C0, 0x06008D40, 0x06007C40, +}; +u32 D_i3_801BF944[6] = { + 0x0601B790, 0x0601B790, 0x0601A700, 0x06019670, 0x060185E0, 0x06017550, +}; +Vec3f D_i3_801BF95C[3] = { + { 0.0f, 30.0f, 480.0f }, + { -180.0f, 0.0f, 240.0f }, + { 180.0f, 0.0f, 240.0f }, +}; +// OBJ_EFFECT_392 draw +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A0AF0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A0CEC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A0D90.s") + +void func_i3_801A0DF8(f32, f32, f32, s32, f32); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A0DF8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A0FD4.s") + +void func_i3_801A10F4(Player* player); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A10F4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A1CD8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A1E14.s") + +void func_i3_801A1EB0(Boss* bossSO, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) { + func_i3_8019E9F4(xPos + xOffset, yPos, zPos, 20.0f, (Rand_ZeroOne() * 10.0f) + 20.0f, 0.0f, 20.0f, 1); + func_i3_8019E9F4(xPos - xOffset, yPos, zPos, -20.0f, (Rand_ZeroOne() * 10.0f) + 20.0f, 0.0f, 20.0f, 1); +} + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A1F80.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A239C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A23F4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A2C3C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A2C98.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A30CC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A3128.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A3468.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A3510.s") + +// void func_i3_801A3C4C(Boss *bossSO) { +// Vec3f *sp2C; +// f32 *temp_v0_5; +// f32 *temp_v0_6; +// f32 *temp_v1; +// f32 *temp_v1_2; +// f32 *temp_v1_3; +// f32 *temp_v1_4; +// f32 *temp_v1_5; +// f32 *temp_v1_6; +// f32 *temp_v1_7; +// f32 *temp_v1_8; +// f32 temp_fv0; +// f32 temp_fv0_10; +// f32 temp_fv0_11; +// f32 temp_fv0_12; +// f32 temp_fv0_2; +// f32 temp_fv0_3; +// f32 temp_fv0_4; +// f32 temp_fv0_5; +// f32 temp_fv0_6; +// f32 temp_fv0_7; +// f32 temp_fv0_8; +// f32 temp_fv0_9; +// f32 var_fv0; +// s16 temp_v0; +// s16 temp_v0_2; + +// if ((bossSO->swork[2] == 0) && (bossSO->swork[3] == 0) && ((temp_v0 = bossSO->dmgPart, (temp_v0 == 8)) || +// (temp_v0 == -1))) { +// bossSO->health -= bossSO->damage; +// if (bossSO->health < 0) { +// bossSO->health = 0; +// } +// bossSO->swork[10] = 20; +// if (bossSO->health > 0.0f) { +// Audio_PlaySfx(0x29433074U, &bossSO->sfxPos, 4U, &D_800C5D34, &D_800C5D34, &D_800C5D3C); +// } +// } +// bossSO->timer_058 = 20; +// if ((bossSO->dmgPart > 0) && (bossSO->dmgPart < 4) && (bossSO->swork[2] != 0)) { +// Audio_PlaySfx(0x29433074U, &bossSO->sfxPos, 4U, &D_800C5D34, &D_800C5D34, &D_800C5D3C); +// bossSO->swork[2] -= bossSO->damage; +// if (bossSO->swork[2] < 0) { +// bossSO->swork[2] = 0; +// } +// if (bossSO->swork[2] == 0) { +// bossSO->info.hitbox->unk1C = bossSO->info.hitbox->unk34 = bossSO->info.hitbox->unk4C = 0.0f; +// bossSO->info.hitbox->unk20 = bossSO->info.hitbox->unk38 = bossSO->info.hitbox->unk50 = 0.0f; +// bossSO->info.hitbox[2].unk4C = 0.0f; +// temp_fv0_3 = bossSO->info.hitbox[2].unk4C; +// bossSO->info.hitbox[2].unk34 = temp_fv0_3; +// bossSO->info.hitbox[2].unk1C = temp_fv0_3; +// bossSO->info.hitbox[2].unk50 = 0.0f; +// temp_fv0_4 = bossSO->info.hitbox[2].unk50; +// bossSO->info.hitbox[2].unk38 = temp_fv0_4; +// bossSO->info.hitbox[2].unk20 = temp_fv0_4; +// bossSO->info.hitbox[2].unk54 = 0.0f; +// temp_fv0_5 = bossSO->info.hitbox[2].unk54; +// bossSO->info.hitbox[2].unk3C = temp_fv0_5; +// bossSO->info.hitbox[2].unk24 = temp_fv0_5; +// bossSO->info.hitbox[2].unk58 = 0.0f; +// temp_fv0_6 = bossSO->info.hitbox[2].unk58; +// bossSO->info.hitbox[2].unk40 = temp_fv0_6; +// bossSO->info.hitbox[2].unk28 = temp_fv0_6; +// bossSO->swork[2] = -1; +// func_i3_801A48B8(bossSO); +// } else { +// bossSO->swork[8] = 20; +// } +// } +// if ((bossSO->dmgPart >= 4) && (bossSO->dmgPart < 7) && (bossSO->swork[3] != 0)) { +// Audio_PlaySfx(0x29433074, &bossSO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); +// bossSO->swork[3] -= bossSO->damage; +// if (bossSO->swork[3] < 0) { +// bossSO->swork[3] = 0; +// } +// if (bossSO->swork[3] == 0) { +// bossSO->info.hitbox->unk94 = 0.0f; +// temp_fv0_7 = bossSO->info.hitbox->unk94; +// bossSO->info.hitbox->unk7C = temp_fv0_7; +// bossSO->info.hitbox->unk64 = temp_fv0_7; +// bossSO->info.hitbox->unk98 = 0.0f; +// temp_fv0_8 = bossSO->info.hitbox->unk98; +// bossSO->info.hitbox->unk80 = temp_fv0_8; bossSO->info.hitbox->unk68 = temp_fv0_8; +// bossSO->info.hitbox[2].unk94 = 0.0f; +// temp_fv0_9 = bossSO->info.hitbox[2].unk94; +// bossSO->info.hitbox[2].unk7C = temp_fv0_9; +// bossSO->info.hitbox[2].unk64 = temp_fv0_9; +// bossSO->info.hitbox[2].unk98 = 0.0f; +// temp_fv0_10 = bossSO->info.hitbox[2].unk98; +// bossSO->info.hitbox[2].unk80 = temp_fv0_10; +// bossSO->info.hitbox[2].unk68 = temp_fv0_10; +// bossSO->info.hitbox[2].unk9C = 0.0f; +// temp_fv0_11 = bossSO->info.hitbox[2].unk9C; +// bossSO->info.hitbox[2].unk84 = temp_fv0_11; +// bossSO->info.hitbox[2].unk6C = temp_fv0_11; +// bossSO->info.hitbox[2].unkA0 = 0.0f; +// temp_fv0_12 = bossSO->info.hitbox[2].unkA0; +// bossSO->info.hitbox[2].unk88 = temp_fv0_12; +// bossSO->info.hitbox[2].unk70 = temp_fv0_12; +// bossSO->swork[3] = -1; +// func_i3_801A48B8(bossSO); +// } else { +// bossSO->swork[9] = 20; +// } +// } +// if (bossSO->health <= 0) { +// bossSO->unk_04C = 21; +// bossSO->actionState = 0; +// bossSO->swork[1] = 1; +// bossSO->fwork[0] = 0.01f; +// bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(D_800CBF34); +// bossSO->timer_058 = 20000; +// D_8017796C = -1; +// D_80178354 = 255; +// D_80178350 = 255; +// D_80178340 = 255; +// D_80178348 = 255; +// D_80178358 = 0; +// D_8017835C = 255; +// D_80177A80 = 0; +// D_80137E84[gMainController] = 1; +// D_Timer_80177BD0[gMainController] = 10; +// func_800182F4(0x100100FF); +// func_800182F4(0x110100FF); +// func_8001A838(0x4100C023U); +// Audio_PlaySfx(0x2940D09AU, &bossSO->sfxPos, 4U, &D_800C5D34, &D_800C5D34, &D_800C5D3C); +// if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { +// gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; +// 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; +// } +// if (gPlayer[0].unk_0E8 < 0.0f) { +// gPlayer[0].unk_0E8 += 360.0f; +// } +// gPlayer[0].unk_114 = 0.0f; +// } +// bossSO->fwork[31] = 0.0f; +// bossSO->fwork[3] = 2400.0f; +// func_800BA808(gMsg_ID_15252, RCID_SLIPPY); +// } +// } +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A3C4C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A4214.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A48B8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A4A34.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A4EC0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A4EF8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A56B8.s") + +BossSOfunc D_i3_801BF980[9] = { + func_i3_801A1F80, func_i3_801A23F4, func_i3_801A2C98, func_i3_801A3128, func_i3_801A3510, + func_i3_801A4214, func_i3_801A4A34, func_i3_801A4EF8, func_i3_801A56B8, +}; + +// OBJ_BOSS_SO action +void func_i3_801A5B3C(Boss* bossSO); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/sf_so/func_i3_801A5B3C.s") + +s32 func_i3_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Boss* this = 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 }; + + GPC(D_i3_801C2740[1], D_i3_801C2740[0], D_i3_801C2740[0], 255); + if (this->fwork[3] < 4800.0f) { + RCP_SetupDL_30(0x40, 0x20, 0x20, gFogAlpha, gFogNear, gFogFar); + } else { + RCP_SetupDL_30(0x10, 0x10, 0x10, gFogAlpha, gFogNear, gFogFar); + } + switch (limbIndex) { + case 11: + rot->y -= D_i3_801C2768[1]; + rot->z += D_i3_801C2768[0]; + /* fallthrough */ + case 1: + if (this->swork[4] != 0) { + *dList = NULL; + } else { + if (this->swork[10] != 0) { + if (this->swork[10] & 1) { + GPC(32, 32, 128, 255); + rot->z += 3.0f; + } else { + rot->z -= 3.0f; + } + } + } + break; + case 2: + case 3: + case 4: + if (this->swork[2] == 0) { + *dList = NULL; + } + if ((this->swork[8] & 1) != 0) { + if ((this->swork[8] & 1) != 0) { + GPC(32, 32, 128, 255); + rot->y += 3.0f; + } else { + rot->y -= 3.0f; + } + } + break; + case 5: + case 6: + case 7: + if (this->swork[3] == 0) { + *dList = NULL; + } + if ((this->swork[9] & 1) != 0) { + if ((this->swork[9] & 1) != 0) { + GPC(32, 32, 128, 255); + rot->y += 3.0f; + } else { + rot->y -= 3.0f; + } + } + break; + } + return false; +} + +void func_i3_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { + Boss* this = 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 }; + Vec3f sp7C = { 75.0f, 0.0f, 0.0f }; + Vec3f sp70 = { 85.0f, 0.0f, 0.0f }; + Vec3f sp64 = { 10.0f, 2.0f, 0.0f }; + Vec3f sp58 = { 10.0f, -2.0f, 0.0f }; + Vec3f sp4C = { 0.0f, 0.05f, 0.0f }; + Vec3f sp40 = { 0.0f, -0.05f, 0.0f }; + Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; + Vec3f sp28; + + switch (limbIndex) { + case 11: + Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); + this->fwork[4] = sp28.x; + this->fwork[5] = sp28.y; + this->fwork[6] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, &sp28); + this->fwork[1] = sp28.x; + this->fwork[2] = sp28.y; + break; + case 2: + if (this->swork[2] > 0) { + Matrix_Push(&gCalcMatrix); + Matrix_MultVec3f(gCalcMatrix, &sp88, &sp28); + this->fwork[28] = sp28.x; + this->fwork[29] = sp28.y; + this->fwork[30] = sp28.z; + Matrix_Pop(&gCalcMatrix); + Matrix_MultVec3f(gCalcMatrix, &spA0, &sp28); + this->fwork[16] = sp28.x; + this->fwork[17] = sp28.y; + this->fwork[18] = sp28.z; + } + if (this->swork[2] < 0) { + Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); + this->fwork[28] = sp28.x; + this->fwork[29] = sp28.y; + this->fwork[30] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[41]); + } + break; + default: + break; + case 3: + if (this->swork[2] > 0) { + Matrix_MultVec3f(gCalcMatrix, &sp7C, &sp28); + this->fwork[22] = sp28.x; + this->fwork[23] = sp28.y; + this->fwork[24] = sp28.z; + } + if (this->swork[2] < 0) { + Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); + this->fwork[22] = sp28.x; + this->fwork[23] = sp28.y; + this->fwork[24] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[47]); + } + break; + case 4: + if (this->swork[2] > 0) { + Matrix_MultVec3f(gCalcMatrix, &sp70, &sp28); + this->fwork[10] = sp28.x; + this->fwork[11] = sp28.y; + this->fwork[12] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[35]); + } else { + if (gBosses[0].swork[0] != 7) { + Matrix_MultVec3f(gCalcMatrix, &sp64, &sp28); + } else { + Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp28); + } + this->fwork[10] = sp28.x; + this->fwork[11] = sp28.y; + this->fwork[12] = sp28.z; + } + break; + case 5: + if (this->swork[3] > 0) { + Matrix_Push(&gCalcMatrix); + Matrix_MultVec3f(gCalcMatrix, &sp88, &sp28); + this->fwork[25] = sp28.x; + this->fwork[26] = sp28.y; + this->fwork[27] = sp28.z; + Matrix_Pop(&gCalcMatrix); + Matrix_MultVec3f(gCalcMatrix, &spA0, &sp28); + this->fwork[13] = sp28.x; + this->fwork[14] = sp28.y; + this->fwork[15] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[38]); + } + if (this->swork[3] < 0) { + Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); + this->fwork[25] = sp28.x; + this->fwork[26] = sp28.y; + this->fwork[27] = sp28.z; + } + break; + case 6: + if (this->swork[3] > 0) { + Matrix_MultVec3f(gCalcMatrix, &sp7C, &sp28); + this->fwork[19] = sp28.x; + this->fwork[20] = sp28.y; + this->fwork[21] = sp28.z; + } + if (this->swork[3] < 0) { + Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); + this->fwork[19] = sp28.x; + this->fwork[20] = sp28.y; + this->fwork[21] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[44]); + } + break; + case 7: + if (this->swork[3] > 0) { + Matrix_MultVec3f(gCalcMatrix, &sp70, &sp28); + this->fwork[7] = sp28.x; + this->fwork[8] = sp28.y; + this->fwork[9] = sp28.z; + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[32]); + } else { + if (gBosses[0].swork[0] != 7) { + Matrix_MultVec3f(gCalcMatrix, &sp58, &sp28); + } else { + Matrix_MultVec3f(gCalcMatrix, &sp40, &sp28); + } + this->fwork[7] = sp28.x; + this->fwork[8] = sp28.y; + this->fwork[9] = sp28.z; + } + break; + } +} + +void func_i3_801A71B8(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 }, + { 0.0f, 0.0f, -500.0f }, { 790.0f, 630.0f, -600.0f }, { 280.0f, 140.0f, 500.0f }, + { -210.0f, 110.0f, 500.0f }, { -460.0f, 260.0f, 500.0f }, { 380.0f, 290.0f, 500.0f }, + }; + f32 spC4[9] = { + -1.0f, -0.3f, -2.0f, 121.0f, 209.0f, 183.0f, 181.0f, 167.0f, 182.0f, + }; + f32 spA0[9] = { + -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); + if (D_80178284 != 0) { + Animation_DrawSkeleton(2, D_600E470, bossSO->vwork, func_i3_801A68A8, func_i3_801A6BDC, bossSO, gCalcMatrix); + } + if (bossSO->health <= 0) { + RCP_SetupDL_49(); + GPC(255, 255, 255, 255); + GEC(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_80177D20, 1); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(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_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[i + 4], 100.0f, 1.0f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_1024AC0); + } + if (D_i3_801C2768[13] > 0.0f) { + GPC(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) + D_80177D20, 1); + Matrix_RotateX(gGfxMatrix, 0.08726646f, 1); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_20112C0); + Matrix_Scale(gGfxMatrix, 0.6f, 1.0f, 0.6f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_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_80177D20, 1); + Matrix_RotateX(gGfxMatrix, -0.05235988f, 1); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_20112C0); + Matrix_Scale(gGfxMatrix, 0.6f, 1.0f, 0.6f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + GDL(D_20112C0); + } + } +} + +Vec3f D_i3_801BFAF4[5] = { + { 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 }, +}; + +Vec3f D_i3_801BFB30[3] = { + { 0.0f, 50.0f, 500.0f }, + { -500.0f, 0.0f, 250.0f }, + { 500.0f, 0.0f, 250.0f }, +}; + +void func_i3_801A7750(void) { + Actor* var_s0 = gActors; + s32 i; + Vec3f* temp; + + Rand_SetSeed(1, 29100, 9786); + + for (i = 0; i < 3; i++, var_s0++) { + temp = &D_i3_801BFB30[i]; + if ((i == 0) && (gTeamShields[3] <= 0.0f)) { + continue; + } + if ((i == 1) && (gTeamShields[2] <= 0.0f)) { + continue; + } + if ((i == 2) && (gTeamShields[1] <= 0.0f)) { + continue; + } + + Actor_Initialize(var_s0); + var_s0->obj.status = 1; + var_s0->obj.id = OBJ_ACTOR_195; + + var_s0->obj.pos.x = gPlayer[0].pos.x + temp->x / 2.0f; + var_s0->obj.pos.y = gPlayer[0].pos.y + temp->y; + var_s0->obj.pos.z = gPlayer[0].pos.z + temp->z; + var_s0->unk_0B8 = 1; + Object_SetInfo(&var_s0->info, var_s0->obj.id); + var_s0->iwork[11] = 1; + Audio_PlaySfx(0x3100000C, &var_s0->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + } +} + +void func_i3_801A7930(Player* player) { + s32 i; + f32 sp78; + f32 temp_fv1; + f32 dx; + f32 dz; + Vec3f sp60; + Vec3f sp54; + Boss* bossSO = &gBosses[0]; + + switch (player->unk_1D0) { + case 0: + D_80177A80 = 0; + player->unk_034 = 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; + D_80177978 = player->camEye.x; + D_80177980 = player->camEye.y; + D_80177988 = player->camEye.z; + D_801779A0 = player->camAt.x; + D_801779B8 = player->camAt.y; + D_801779C0 = player->camAt.z; + for (i = 10; i < 60; i++) { + if (gActors[i].unk_0B6 == 0) { + Object_Kill(&gActors[i].obj, &gActors[i].sfxPos); + } + } + Object_Kill(&gActors[2].obj, &gActors[2].sfxPos); + Object_Kill(&gActors[3].obj, &gActors[3].sfxPos); + Object_Kill(&gActors[4].obj, &gActors[4].sfxPos); + player->unk_1D0 = 1; + D_80177A48[0] = 0.1f; + if (Rand_ZeroOne() > 0.5f) { + D_80177A48[9] = -1.0f; + } else { + D_80177A48[9] = 1.0f; + } + break; + case 1: + D_80177CE8 += 30.0f; + Math_SmoothStepToF(&player->unk_0E4, 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(&D_80177980, 300.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&D_801779B8, 290.0f, 1.0f, 20.0f, 0.0f); + temp_fv1 = Math_SmoothStepToAngle(&player->unk_0E8, sp78, 0.5f, 2.0f, 0.0001f) * 30.0f; + if (D_80177A80 >= 0xE) { + Math_SmoothStepToAngle(&player->unk_0EC, temp_fv1, 0.1f, 5.0f, 0.0001f); + D_801779A0 = 0.0f; + D_80177978 = 0.0f; + } else if (temp_fv1 < 0.0f) { + player->unk_0EC -= 30.0f; + } else { + player->unk_0EC += 30.0f; + } + if (D_80177A80 >= 0xC8) { + player->unk_0E4 += 1.0f; + player->unk_0E8 += 1.0f; + player->unk_0EC += 1.0f; + } + if (D_80177A80 >= 0xE6) { + D_80178358 = 0xFF; + D_80178348 = D_80178354 = D_80178350 = 0xFF; + } + if (D_80177A80 == 0xE6) { + func_800182F4(0x103200FF); + func_800182F4(0x113200FF); + } + if (D_80177A80 == 0x190) { + player->unk_1D0++; + func_800A6148(); + func_8001CA24(0); + Audio_KillSfx(&player->unk_460); + D_80178340 = 0xFA; + player->timer_1F8 = 0x14; + player->unk_0D0 = 0.0f; + player->unk_0E4 = 0.0f; + player->unk_0E8 = 0.0f; + player->unk_0EC = 0.0f; + } + break; + case 2: + D_80177CE8 += 60.0f; + if (player->timer_1F8 == 0) { + player->pos.x = 0.0f; + player->pos.y = 200.0f; + player->pos.z = -(D_80177D20 - 500.0f); + player->unk_1D0++; + player->wings.unk_2C = 1; + func_8001C8B8(0); + func_8001D444(0, 0x26, 0, 0xFF); + D_80177A98 = 1; + func_800A6148(); + D_80177A48[1] = 0.0f; + D_80177A48[2] = 0.0f; + player->camEye.x = 0.0f; + player->camEye.y = player->pos.y + 80.0f; + player->camEye.z = player->pos.z + D_80177D20 - 4000.0f; + D_80177988 = player->pos.z + D_80177D20 - 4900.0f; + player->camAt.x = D_801779A0 = 0.0f; + player->camAt.y = D_801779B8 = 200.0f; + player->camAt.z = D_801779C0 = player->pos.z + D_80177D20; + D_80177A48[0] = 0.0f; + Object_Kill(&gActors[4].obj, &gActors[4].sfxPos); + Object_Kill(&gActors[5].obj, &gActors[5].sfxPos); + } + break; + case 3: + D_80177CE8 += 60.0f; + D_80178358 = 0; + D_8017835C = 4; + if (D_801782F8 != 0) { + player->wings.unk_30 = (gFrameCount & 1) * 5.0f; + } + switch (D_80177A80) { + case 0x1C2: + func_i3_801A0DF8(-1200.0f, -(D_80177D20 + 2500.0f), 90.0f, 2, 1.0f); + break; + case 0x221: + func_i3_801A0DF8(1400.0f, -(D_80177D20 + 3250.0f), -90.0f, 3, 1.0f); + break; + case 0x226: + Object_Kill(&gActors[4].obj, &gActors[4].sfxPos); + break; + case 0x285: + Object_Kill(&gActors[5].obj, &gActors[5].sfxPos); + break; + case 0x2BC: + player->unk_1D0++; + func_i3_801A7750(); + D_i3_801C2768[3] = 1000.0f; + break; + } + if ((D_80177A80 >= 0x208) && (D_80177A80 < 0x25D)) { + Math_SmoothStepToF(&player->pos.x, 400.0f, 0.1f, 10.0f, 0.1f); + } + if ((D_80177A80 >= 0x208) && (D_80177A80 < 0x23A)) { + Math_SmoothStepToAngle(&player->unk_0EC, -30.0f, 0.1f, 5.0f, 0.1f); + } + if ((D_80177A80 >= 0x23A) && (D_80177A80 < 0x25D)) { + Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.1f); + } + if ((D_80177A80 >= 0x25D) && (D_80177A80 < 0x26C)) { + player->unk_0EC += 30.0f; + } + if ((D_80177A80 >= 0x26C) && (D_80177A80 < 0x280)) { + Math_SmoothStepToAngle(&player->unk_0EC, 45.0f, 0.1f, 5.0f, 0.0f); + } + if (D_80177A80 >= 0x280) { + Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.3f, 7.0f, 0.0f); + } + if (D_80177A80 >= 0x249) { + Math_SmoothStepToF(&player->pos.x, 0.0f, 0.2f, 9.0f, 0); + } + if (D_80177A80 >= 0x258) { + Math_SmoothStepToF(&player->pos.y, 950.0f, 0.1f, 10.0f, 0.0001f); + } + Math_SmoothStepToF(&player->pos.z, -(D_80177D20 + 4350.0f), 1.0f, 20.0f, 0.0001f); + if (D_80177A80 >= 0x26C) { + 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_80177D20) - 50.0f, 1.0f, 21.5f, 0.0f); + } + player->camAt.x = D_801779A0 = player->pos.x; + player->camAt.y = D_801779B8 = player->pos.y; + player->camAt.z = D_801779C0 = player->pos.z + D_80177D20; + break; + case 4: + D_80177CE8 += 60.0f; + D_80178358 = 0; + D_8017835C = 4; + D_80177A48[1] += D_80177A48[2] * 0.8f; + Matrix_RotateY(gCalcMatrix, D_80177A48[1] * M_DTOR, 0); + sp60.x = 0.0f; + sp60.y = 0.0f; + sp60.z = -700.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); + if (D_80177A80 < 0x5A0) { + D_80177978 = sp54.x; + D_80177980 = D_i3_801C2768[3] + sp54.y; + D_80177988 = player->pos.z + D_80177D20 + sp54.z; + D_801779A0 = 0.0f; + D_801779B8 = player->pos.y + 75.0f; + Math_SmoothStepToF(&D_i3_801C2768[3], 500.0f, 0.1f, 1.0f, 0.0001f); + D_801779C0 = player->pos.z + D_80177D20 + 200.0f; + if (D_80177A80 >= 0x578) { + D_801779C0 -= (D_80177A80 * 8) - 11200; + } + } else { + Math_SmoothStepToF(&D_80177978, 0.0f, 0.1f, 1.0f, 0.0001f); + D_801779A0 = 0.0f; + D_801779B8 = player->pos.y + 75.0f; + D_801779C0 = player->pos.z + D_80177D20 + 200.0f - ((D_80177A80 * 8) - 11200); + } + if (D_80177A80 >= 0x5B5) { + player->unk_0D0 += 2.0f; + player->unk_0E4 += 0.2f; + Math_SmoothStepToF(&D_80177A48[2], 0.0f, 1.0f, 0.001f, 0); + player->unk_190 = 2.0f; + } else { + Math_SmoothStepToF(&D_80177A48[2], 0.23f, 1.0f, 0.001f, 0.0f); + Math_SmoothStepToF(&D_80177A48[0], 0.5f, 0.1f, 0.0005f, 0.0f); + } + if (D_80177A80 == 0x618) { + func_800A6148(); + } + if (D_80177A80 >= 0x5FB) { + D_80178358 = 0xFF; + D_80178348 = D_80178350 = D_80178354 = 0; + D_8017835C = 8; + if (D_80178340 == 0xFF) { + func_8001CA24(0); + func_8001DBD0(10); + player->state_1C8 = PLAYERSTATE_1C8_6; + player->timer_1F8 = 0; + D_8017837C = 4; + D_800D3180[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; + } + } + break; + } + switch (D_80177A80) { + case 0x1B8: + D_80177840 = 0x64; + break; + case 0x280: + func_800BA808(gMsg_ID_20010, RCID_FOX); + break; + case 0x2D8: + switch (gTeamShields[2]) { + case 0: + func_800BA808(gMsg_ID_20345, RCID_ROB64); + break; + case -1: + func_800BA808(gMsg_ID_20339, RCID_ROB64); + break; + default: + func_80048AC0(2); + break; + } + break; + case 0x36B: + switch (gTeamShields[3]) { + case 0: + func_800BA808(gMsg_ID_20344, RCID_ROB64); + break; + case -1: + func_800BA808(gMsg_ID_20338, RCID_ROB64); + break; + default: + func_80048AC0(3); + break; + } + break; + case 0x3FD: + switch (gTeamShields[1]) { + case 0: + func_800BA808(gMsg_ID_20343, RCID_ROB64); + break; + case -1: + func_800BA808(gMsg_ID_20337, RCID_ROB64); + break; + default: + func_80048AC0(1); + break; + } + break; + case 0x4A2: + D_80177830 = 1; + break; + case 0x56A: + D_80177830 = 0; + break; + case 0x5B4: + Audio_PlaySfx(0x09000002, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + player->unk_190 = player->unk_194 = 5.0f; + break; + case 0x578: + if (gTeamShields[3] > 0) { + gActors[0].unk_0B8 = 2; + } + break; + case 0x5DC: + func_800182F4(0x103200FF); + func_800182F4(0x113200FF); + break; + case 0x58C: + if (gTeamShields[2] > 0) { + gActors[1].unk_0B8 = 2; + } + break; + case 0x5A0: + if (gTeamShields[1] > 0) { + gActors[2].unk_0B8 = 2; + } + 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); + sp60.x = 0.0f; + sp60.y = 0.0f; + sp60.z = player->unk_0D0; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); + player->vel.x = sp54.x; + player->vel.z = sp54.z; + player->vel.y = sp54.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->unk_0F8 = player->unk_0EC; + Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + player->unk_088 += 10.0f; + player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f; + player->unk_0F4 += 8.0f; + player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR); +} + +void func_i3_801A8BE8(Actor* actor) { + Vec3f sp3C; + Vec3f sp30; + + switch (actor->unk_0B8) { + case 4: + break; + case 1: + if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < D_80177A80)) { + actor->unk_0B8 = 4; + } + break; + case 2: + actor->unk_0B8 = 3; + Audio_PlaySfx(0x09000002, &actor->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + actor->fwork[29] = 5.0f; + /* fallthrough */ + case 3: + actor->iwork[11] = 2; + actor->fwork[0] += 2.0f; + 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); + 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; + 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; +} + +void func_i3_801A8DB8(Vec3f* arg0, u32 arg1, f32 arg2) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { + if (gEffects[i].obj.status == 0) { + func_8007A5F8(&gEffects[i], arg0, arg1); + gEffects[i].vel.z = arg2; + break; + } + } +} diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 9ff17cb9..2c795305 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -3226,7 +3226,7 @@ void func_EBFBE0_801A36A8(void) { break; case 4: - gGameState = 3; + gGameState = GSTATE_MENU; D_Timer_8017783C = 2; D_8017784C = 0; gDrawMode = 0; @@ -3703,7 +3703,7 @@ void func_EBFBE0_801A4D7C(void) { void func_EBFBE0_801A4F8C(void) { D_80178410 = 0; - gGameState = 5; + gGameState = GSTATE_GAME_OVER; D_80177868 = 0; D_Timer_8017783C = 2; gDrawMode = DRAWMODE_0; @@ -4366,7 +4366,7 @@ void func_EBFBE0_801A659C(void) { } void func_EBFBE0_801A6628(void) { - gGameState = 7; + gGameState = GSTATE_PLAY; D_Timer_8017783C = 2; D_80177854 = 0; gDrawMode = DRAWMODE_0; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 17f026e5..13c21150 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -408,7 +408,7 @@ void func_EBFBE0_80191B20(void) { if ((D_80161A34 == 5) || (D_80161A34 == 8)) { if (D_80161A34 == 8) { D_80177B90[gCurrentPlanet] = 13; - if (D_800D3180[9] == 1) { + if (D_800D3180[LEVEL_VENOM_ANDROSS] == 1) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].played = 1; if (var_v0_2 != 0) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].expertClear = 1; @@ -416,7 +416,7 @@ void func_EBFBE0_80191B20(void) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].normalClear = 1; } Save_Write(); - } else if (D_800D3180[9] == 2) { + } else if (D_800D3180[LEVEL_VENOM_ANDROSS] == 2) { D_80177BB0[gCurrentPlanet] = 1; gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].played = 1; if (var_v0_2) { diff --git a/yamls/us/main.yaml b/yamls/us/main.yaml index 5c01eb2d..93127ad3 100644 --- a/yamls/us/main.yaml +++ b/yamls/us/main.yaml @@ -174,7 +174,7 @@ - [0x36930, c, fox_beam] - [0x3E6F0, c, fox_bg] - [0x43AC0, c, fox_43AC0] - - [0x43E80, c, sf_43E80] + - [0x43E80, c, fox_43E80] - [0x496C0, c, fox_demo] - [0x52730, c, fox_display] - [0x59780, c, fox_load] @@ -267,7 +267,7 @@ - [0xCA7C0, .data, fox_beam] - [0xCA830, .data, fox_bg] - [0xCAA90, .data, fox_43AC0] - - [0xCAB00, .data, sf_43E80] + - [0xCAB00, .data, fox_43E80] - [0xCAB60, .data, fox_demo] - [0xCAE20, .data, fox_display] - [0xCAFB0, .data, fox_load] @@ -280,7 +280,7 @@ - [0xD31D0, .data, fox_std_lib] - [0xD3460, .data, fox_game] - [0xD3520, .data, fox_A4290] - - [0xD3B50, data, fox_play] + - [0xD3B50, .data, fox_play] - [0xD3DB0, .data, fox_rcp] - [0xD5670, .data, fox_radio] - [0xD5680, .data, fox_reset] @@ -292,7 +292,7 @@ - [0xD5CF0, .rodata, fox_beam] - [0xD5F90, .rodata, fox_bg] - [0xD61D0, .rodata, fox_43AC0] - - [0xD61F0, .rodata, sf_43E80] + - [0xD61F0, .rodata, fox_43E80] - [0xD6350, .rodata, fox_demo] - [0xD69A0, .rodata, fox_display] - [0xD6BA0, .rodata, fox_load] diff --git a/yamls/us/overlays.yaml b/yamls/us/overlays.yaml index 9d4c666f..b0d3038f 100644 --- a/yamls/us/overlays.yaml +++ b/yamls/us/overlays.yaml @@ -41,32 +41,32 @@ - [0xE16930, .rodata, E0FF10] - { start: 0xE16C50, type: bss, vram: 0x80195D70, name: ovl_E08400 } - - name: ovl_E16C50 + - name: ovl_i3 type: code - dir: overlays/ovl_E16C50 + dir: overlays/ovl_i3 start: 0xE16C50 vram: 0x80187520 bss_size: 0x2220 exclusive_ram_id: overlay - symbol_name_format: E16C50_$VRAM + symbol_name_format: i3_$VRAM subsegments: - - [0xE16C50, c, E16C50] + - [0xE16C50, c, fox_i3] - [0xE16C60, c, fox_a6] - - [0xE1F680, c, sf_zo] + - [0xE1F680, c, fox_zo] - [0xE2DF20, c, sf_so] - [0xE38560, c, sf_aq] - - [0xE4E3D0, .data, E16C50] + - [0xE4E3D0, .data, fox_i3] - [0xE4E3E0, .data, fox_a6] - - [0xE4EC90, .data, sf_zo] + - [0xE4EC90, .data, fox_zo] - [0xE4F010, .data, sf_so] - [0xE4F290, .data, sf_aq] - [0xE50030, .rodata, fox_a6] - - [0xE504E0, .rodata, sf_zo] + - [0xE504E0, .rodata, fox_zo] - [0xE50C00, .rodata, sf_so] - [0xE51160, .rodata, sf_aq] - - { start: 0xE51970, type: .bss, vram: 0x801C2240, name: E16C50 } + - { start: 0xE51970, type: .bss, vram: 0x801C2240, name: fox_i3 } - { start: 0xE51970, type: .bss, vram: 0x801C2250, name: fox_a6 } - - { start: 0xE51970, type: .bss, vram: 0x801C2330, name: sf_zo } + - { start: 0xE51970, type: .bss, vram: 0x801C2330, name: fox_zo } - { start: 0xE51970, type: .bss, vram: 0x801C2740, name: sf_so } - { start: 0xE51970, type: .bss, vram: 0x801C27C0, name: sf_aq }