Skip to content

Commit 27e87e1

Browse files
authored
Remove it/types.h dependency on ft/types.h (#1256)
1 parent d7785dd commit 27e87e1

File tree

8 files changed

+91
-88
lines changed

8 files changed

+91
-88
lines changed

src/melee/ft/forward.h

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define FIGHTERVARS_SIZE 0xF8
1111

1212
typedef enum_t FtMotionId;
13-
typedef struct CollData CollData;
1413
typedef struct Fighter Fighter;
1514
typedef struct Fighter_CostumeStrings Fighter_CostumeStrings;
1615
typedef struct Fighter_DemoStrings Fighter_DemoStrings;

src/melee/ft/types.h

-83
Original file line numberDiff line numberDiff line change
@@ -725,89 +725,6 @@ struct FighterBone {
725725
/* +6 */ u8 filler_x6[7];
726726
};
727727

728-
typedef struct _ftECB {
729-
Vec2 top;
730-
Vec2 bottom;
731-
Vec2 right;
732-
Vec2 left;
733-
} ftECB;
734-
735-
typedef struct _ECBFlagStruct {
736-
union {
737-
struct {
738-
u8 b0 : 1;
739-
u8 b1234 : 4;
740-
u8 b5 : 1;
741-
u8 b6 : 1;
742-
u8 b7 : 1;
743-
} bits;
744-
u8 raw;
745-
};
746-
} ECBFlagStruct;
747-
748-
typedef struct SurfaceData {
749-
int index;
750-
u32 unk;
751-
Vec3 normal;
752-
} SurfaceData;
753-
754-
struct CollData {
755-
/* fp+6F0 */ HSD_GObj* x0_gobj;
756-
/* fp+6F4 */ Vec3 x4_vec;
757-
/* fp+700 */ Vec3 x10_vec;
758-
/* fp+70C */ Vec3 x1C_vec;
759-
/* fp+718 */ Vec3 x28_vec;
760-
/* fp+724 */ ECBFlagStruct x34_flags;
761-
/* fp+725 */ ECBFlagStruct x35_flags;
762-
/* fp+726 */ s16 x36;
763-
/* fp+728 */ s32 x38;
764-
/* fp+72C */ s32 x3C;
765-
/* fp+730 */ int ledge_id_unk0;
766-
/* fp+734 */ int ledge_id_unk1;
767-
/* fp+738 */ u32 x48;
768-
/* fp+73C */ u32 x4C;
769-
/* fp+740 */ float x50;
770-
/* fp+744 */ float x54;
771-
/* fp+748 */ float x58;
772-
/* fp+74C */ float x5C;
773-
/* fp+750 */ s32 x60;
774-
/* fp+754 */ ftECB x64_ecb;
775-
/* fp+774 */ ftECB x84_ecb;
776-
/* fp+794 */ ftECB xA4_ecbCurrCorrect;
777-
/* fp+7B4 */ ftECB xC4_ecb;
778-
/* fp+7D4 */ ftECB xE4_ecb;
779-
/// @todo this is the start of a substruct with size 0x2C
780-
/* fp+7F4 */ s32 x104;
781-
/* fp+7F8 */ union {
782-
/* fp+7F8 */ struct {
783-
/* fp+7F8 */ HSD_JObj* x108_joint;
784-
/* fp+7FC */ HSD_JObj* x10C_joint[6];
785-
};
786-
/* fp+7F8 */ struct {
787-
/* fp+7F8 */ float x108_f32;
788-
/* fp+7FC */ float x10C_f32;
789-
/* fp+800 */ float x110_f32;
790-
/* fp+804 */ float x114_f32;
791-
/* fp+808 */ float x118_f32;
792-
/* fp+80C */ float x11C_f32;
793-
/* fp+810 */ float x120_f32;
794-
};
795-
};
796-
/* fp+814 */ float x124;
797-
/* fp+818 */ float x128;
798-
/* fp+81C */ float x12C;
799-
/* fp+820 */ u32 x130_flags;
800-
/* fp+824 */ s32 env_flags;
801-
/* fp+828 */ s32 prev_env_flags;
802-
/* fp+82C */ s32 x13C;
803-
/* fp+830 */ Vec3 x140;
804-
/* fp+83C */ SurfaceData floor;
805-
/* fp+850 */ SurfaceData right_wall;
806-
/* fp+864 */ SurfaceData left_wall;
807-
/* fp+878 */ SurfaceData ceiling;
808-
/* fp+88C */ s32 x19C;
809-
};
810-
811728
/* fp+2114 */ typedef struct _SmashAttr {
812729
/* fp+2114 */ SmashState state;
813730
/// number of frames fp has charged for

src/melee/it/items/itseakneedleheld.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef GALE01_2B18B0
22
#define GALE01_2B18B0
33

4+
#include "ft/forward.h"
5+
46
#include "it/types.h"
57

68
/* 2AFD8C */ Fighter_GObj* it_802AFD8C(Fighter_GObj*, Vec3*, u32, float);

src/melee/it/types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
#define MELEE_IT_TYPES_H
33

44
#include <platform.h>
5+
#include "cm/forward.h"
56
#include "it/forward.h" // IWYU pragma: export
6-
#include "lb/forward.h"
77
#include <dolphin/gx/forward.h>
88
#include <baselib/forward.h>
99

10-
#include "ft/types.h"
1110
#include "it/itCharItems.h"
1211
#include "it/itCommonItems.h"
1312
#include "it/itPKFlash.h"
1413
#include "it/itPKThunder.h"
14+
#include "lb/types.h"
1515

1616
#include <common_structs.h>
1717
#include <placeholder.h>

src/melee/lb/forward.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
#include <platform.h>
55

66
typedef struct AbsorbDesc AbsorbDesc;
7+
typedef struct CollData CollData;
78
typedef struct HitCapsule HitCapsule;
89
typedef struct HitResult HitResult;
910
typedef struct HitVictim HitVictim;
1011
typedef struct HurtCapsule HurtCapsule;
1112
typedef struct lb_UnkAnimStruct lb_UnkAnimStruct;
13+
typedef struct lbRefract_CallbackData lbRefract_CallbackData;
1214
typedef struct ReflectDesc ReflectDesc;
1315
typedef struct ShieldDesc ShieldDesc;
14-
typedef struct lbRefract_CallbackData lbRefract_CallbackData;
1516

1617
typedef enum HurtCapsuleState {
1718
HurtCapsule_Enabled,

src/melee/lb/types.h

+83
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,87 @@ struct lbRefract_CallbackData {
154154
void* callback1; // x20
155155
};
156156

157+
typedef struct _ECBFlagStruct {
158+
union {
159+
struct {
160+
u8 b0 : 1;
161+
u8 b1234 : 4;
162+
u8 b5 : 1;
163+
u8 b6 : 1;
164+
u8 b7 : 1;
165+
} bits;
166+
u8 raw;
167+
};
168+
} ECBFlagStruct;
169+
170+
typedef struct SurfaceData {
171+
int index;
172+
u32 unk;
173+
Vec3 normal;
174+
} SurfaceData;
175+
176+
typedef struct _ftECB {
177+
Vec2 top;
178+
Vec2 bottom;
179+
Vec2 right;
180+
Vec2 left;
181+
} ftECB;
182+
183+
struct CollData {
184+
/* fp+6F0 */ HSD_GObj* x0_gobj;
185+
/* fp+6F4 */ Vec3 x4_vec;
186+
/* fp+700 */ Vec3 x10_vec;
187+
/* fp+70C */ Vec3 x1C_vec;
188+
/* fp+718 */ Vec3 x28_vec;
189+
/* fp+724 */ ECBFlagStruct x34_flags;
190+
/* fp+725 */ ECBFlagStruct x35_flags;
191+
/* fp+726 */ s16 x36;
192+
/* fp+728 */ s32 x38;
193+
/* fp+72C */ s32 x3C;
194+
/* fp+730 */ int ledge_id_unk0;
195+
/* fp+734 */ int ledge_id_unk1;
196+
/* fp+738 */ u32 x48;
197+
/* fp+73C */ u32 x4C;
198+
/* fp+740 */ float x50;
199+
/* fp+744 */ float x54;
200+
/* fp+748 */ float x58;
201+
/* fp+74C */ float x5C;
202+
/* fp+750 */ s32 x60;
203+
/* fp+754 */ ftECB x64_ecb;
204+
/* fp+774 */ ftECB x84_ecb;
205+
/* fp+794 */ ftECB xA4_ecbCurrCorrect;
206+
/* fp+7B4 */ ftECB xC4_ecb;
207+
/* fp+7D4 */ ftECB xE4_ecb;
208+
/// @todo this is the start of a substruct with size 0x2C
209+
/* fp+7F4 */ s32 x104;
210+
/* fp+7F8 */ union {
211+
/* fp+7F8 */ struct {
212+
/* fp+7F8 */ HSD_JObj* x108_joint;
213+
/* fp+7FC */ HSD_JObj* x10C_joint[6];
214+
};
215+
/* fp+7F8 */ struct {
216+
/* fp+7F8 */ float x108_f32;
217+
/* fp+7FC */ float x10C_f32;
218+
/* fp+800 */ float x110_f32;
219+
/* fp+804 */ float x114_f32;
220+
/* fp+808 */ float x118_f32;
221+
/* fp+80C */ float x11C_f32;
222+
/* fp+810 */ float x120_f32;
223+
};
224+
};
225+
/* fp+814 */ float x124;
226+
/* fp+818 */ float x128;
227+
/* fp+81C */ float x12C;
228+
/* fp+820 */ u32 x130_flags;
229+
/* fp+824 */ s32 env_flags;
230+
/* fp+828 */ s32 prev_env_flags;
231+
/* fp+82C */ s32 x13C;
232+
/* fp+830 */ Vec3 x140;
233+
/* fp+83C */ SurfaceData floor;
234+
/* fp+850 */ SurfaceData right_wall;
235+
/* fp+864 */ SurfaceData left_wall;
236+
/* fp+878 */ SurfaceData ceiling;
237+
/* fp+88C */ s32 x19C;
238+
};
239+
157240
#endif

src/melee/mp/forward.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define MELEE_MP_FORWARD_H
33

44
#include <platform.h>
5-
#include "ft/forward.h"
5+
#include "lb/forward.h"
66

77
typedef struct mp_UnkStruct0 mp_UnkStruct0;
88
typedef struct mp_UnkStruct1 mp_UnkStruct1;

src/melee/mp/mpisland.h

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define GALE01_05A6F8
33

44
#include "mp/forward.h"
5+
#include <dolphin/mtx/forward.h>
56

67
#include <placeholder.h>
78

0 commit comments

Comments
 (0)