Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove it/types.h dependency on ft/types.h #1256

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/melee/ft/forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define FIGHTERVARS_SIZE 0xF8

typedef enum_t FtMotionId;
typedef struct CollData CollData;
typedef struct Fighter Fighter;
typedef struct Fighter_CostumeStrings Fighter_CostumeStrings;
typedef struct Fighter_DemoStrings Fighter_DemoStrings;
Expand Down
83 changes: 0 additions & 83 deletions src/melee/ft/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,89 +725,6 @@ struct FighterBone {
/* +6 */ u8 filler_x6[7];
};

typedef struct _ftECB {
Vec2 top;
Vec2 bottom;
Vec2 right;
Vec2 left;
} ftECB;

typedef struct _ECBFlagStruct {
union {
struct {
u8 b0 : 1;
u8 b1234 : 4;
u8 b5 : 1;
u8 b6 : 1;
u8 b7 : 1;
} bits;
u8 raw;
};
} ECBFlagStruct;

typedef struct SurfaceData {
int index;
u32 unk;
Vec3 normal;
} SurfaceData;

struct CollData {
/* fp+6F0 */ HSD_GObj* x0_gobj;
/* fp+6F4 */ Vec3 x4_vec;
/* fp+700 */ Vec3 x10_vec;
/* fp+70C */ Vec3 x1C_vec;
/* fp+718 */ Vec3 x28_vec;
/* fp+724 */ ECBFlagStruct x34_flags;
/* fp+725 */ ECBFlagStruct x35_flags;
/* fp+726 */ s16 x36;
/* fp+728 */ s32 x38;
/* fp+72C */ s32 x3C;
/* fp+730 */ int ledge_id_unk0;
/* fp+734 */ int ledge_id_unk1;
/* fp+738 */ u32 x48;
/* fp+73C */ u32 x4C;
/* fp+740 */ float x50;
/* fp+744 */ float x54;
/* fp+748 */ float x58;
/* fp+74C */ float x5C;
/* fp+750 */ s32 x60;
/* fp+754 */ ftECB x64_ecb;
/* fp+774 */ ftECB x84_ecb;
/* fp+794 */ ftECB xA4_ecbCurrCorrect;
/* fp+7B4 */ ftECB xC4_ecb;
/* fp+7D4 */ ftECB xE4_ecb;
/// @todo this is the start of a substruct with size 0x2C
/* fp+7F4 */ s32 x104;
/* fp+7F8 */ union {
/* fp+7F8 */ struct {
/* fp+7F8 */ HSD_JObj* x108_joint;
/* fp+7FC */ HSD_JObj* x10C_joint[6];
};
/* fp+7F8 */ struct {
/* fp+7F8 */ float x108_f32;
/* fp+7FC */ float x10C_f32;
/* fp+800 */ float x110_f32;
/* fp+804 */ float x114_f32;
/* fp+808 */ float x118_f32;
/* fp+80C */ float x11C_f32;
/* fp+810 */ float x120_f32;
};
};
/* fp+814 */ float x124;
/* fp+818 */ float x128;
/* fp+81C */ float x12C;
/* fp+820 */ u32 x130_flags;
/* fp+824 */ s32 env_flags;
/* fp+828 */ s32 prev_env_flags;
/* fp+82C */ s32 x13C;
/* fp+830 */ Vec3 x140;
/* fp+83C */ SurfaceData floor;
/* fp+850 */ SurfaceData right_wall;
/* fp+864 */ SurfaceData left_wall;
/* fp+878 */ SurfaceData ceiling;
/* fp+88C */ s32 x19C;
};

/* fp+2114 */ typedef struct _SmashAttr {
/* fp+2114 */ SmashState state;
/// number of frames fp has charged for
Expand Down
2 changes: 2 additions & 0 deletions src/melee/it/items/itseakneedleheld.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GALE01_2B18B0
#define GALE01_2B18B0

#include "ft/forward.h"

#include "it/types.h"

/* 2AFD8C */ Fighter_GObj* it_802AFD8C(Fighter_GObj*, Vec3*, u32, float);
Expand Down
4 changes: 2 additions & 2 deletions src/melee/it/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
#define MELEE_IT_TYPES_H

#include <platform.h>
#include "cm/forward.h"
#include "it/forward.h" // IWYU pragma: export
#include "lb/forward.h"
#include <dolphin/gx/forward.h>
#include <baselib/forward.h>

#include "ft/types.h"
#include "it/itCharItems.h"
#include "it/itCommonItems.h"
#include "it/itPKFlash.h"
#include "it/itPKThunder.h"
#include "lb/types.h"

#include <common_structs.h>
#include <placeholder.h>
Expand Down
3 changes: 2 additions & 1 deletion src/melee/lb/forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
#include <platform.h>

typedef struct AbsorbDesc AbsorbDesc;
typedef struct CollData CollData;
typedef struct HitCapsule HitCapsule;
typedef struct HitResult HitResult;
typedef struct HitVictim HitVictim;
typedef struct HurtCapsule HurtCapsule;
typedef struct lb_UnkAnimStruct lb_UnkAnimStruct;
typedef struct lbRefract_CallbackData lbRefract_CallbackData;
typedef struct ReflectDesc ReflectDesc;
typedef struct ShieldDesc ShieldDesc;
typedef struct lbRefract_CallbackData lbRefract_CallbackData;

typedef enum HurtCapsuleState {
HurtCapsule_Enabled,
Expand Down
83 changes: 83 additions & 0 deletions src/melee/lb/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,87 @@ struct lbRefract_CallbackData {
void* callback1; // x20
};

typedef struct _ECBFlagStruct {
union {
struct {
u8 b0 : 1;
u8 b1234 : 4;
u8 b5 : 1;
u8 b6 : 1;
u8 b7 : 1;
} bits;
u8 raw;
};
} ECBFlagStruct;

typedef struct SurfaceData {
int index;
u32 unk;
Vec3 normal;
} SurfaceData;

typedef struct _ftECB {
Vec2 top;
Vec2 bottom;
Vec2 right;
Vec2 left;
} ftECB;

struct CollData {
/* fp+6F0 */ HSD_GObj* x0_gobj;
/* fp+6F4 */ Vec3 x4_vec;
/* fp+700 */ Vec3 x10_vec;
/* fp+70C */ Vec3 x1C_vec;
/* fp+718 */ Vec3 x28_vec;
/* fp+724 */ ECBFlagStruct x34_flags;
/* fp+725 */ ECBFlagStruct x35_flags;
/* fp+726 */ s16 x36;
/* fp+728 */ s32 x38;
/* fp+72C */ s32 x3C;
/* fp+730 */ int ledge_id_unk0;
/* fp+734 */ int ledge_id_unk1;
/* fp+738 */ u32 x48;
/* fp+73C */ u32 x4C;
/* fp+740 */ float x50;
/* fp+744 */ float x54;
/* fp+748 */ float x58;
/* fp+74C */ float x5C;
/* fp+750 */ s32 x60;
/* fp+754 */ ftECB x64_ecb;
/* fp+774 */ ftECB x84_ecb;
/* fp+794 */ ftECB xA4_ecbCurrCorrect;
/* fp+7B4 */ ftECB xC4_ecb;
/* fp+7D4 */ ftECB xE4_ecb;
/// @todo this is the start of a substruct with size 0x2C
/* fp+7F4 */ s32 x104;
/* fp+7F8 */ union {
/* fp+7F8 */ struct {
/* fp+7F8 */ HSD_JObj* x108_joint;
/* fp+7FC */ HSD_JObj* x10C_joint[6];
};
/* fp+7F8 */ struct {
/* fp+7F8 */ float x108_f32;
/* fp+7FC */ float x10C_f32;
/* fp+800 */ float x110_f32;
/* fp+804 */ float x114_f32;
/* fp+808 */ float x118_f32;
/* fp+80C */ float x11C_f32;
/* fp+810 */ float x120_f32;
};
};
/* fp+814 */ float x124;
/* fp+818 */ float x128;
/* fp+81C */ float x12C;
/* fp+820 */ u32 x130_flags;
/* fp+824 */ s32 env_flags;
/* fp+828 */ s32 prev_env_flags;
/* fp+82C */ s32 x13C;
/* fp+830 */ Vec3 x140;
/* fp+83C */ SurfaceData floor;
/* fp+850 */ SurfaceData right_wall;
/* fp+864 */ SurfaceData left_wall;
/* fp+878 */ SurfaceData ceiling;
/* fp+88C */ s32 x19C;
};

#endif
2 changes: 1 addition & 1 deletion src/melee/mp/forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define MELEE_MP_FORWARD_H

#include <platform.h>
#include "ft/forward.h"
#include "lb/forward.h"

typedef struct mp_UnkStruct0 mp_UnkStruct0;
typedef struct mp_UnkStruct1 mp_UnkStruct1;
Expand Down
1 change: 1 addition & 0 deletions src/melee/mp/mpisland.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define GALE01_05A6F8

#include "mp/forward.h"
#include <dolphin/mtx/forward.h>

#include <placeholder.h>

Expand Down
Loading