Files

190 lines
4.5 KiB
C

#ifndef BFM_800_SHARED_H
#define BFM_800_SHARED_H
/* The include environment the original single TU had. Every TU of the split needs the same
* one: `psyq/libcd.h` supplies CdlLOC/CdlFILE to functions now in 800_c.c, and
* `shared/clearTbl40.h` supplies the CLEAR_TBL40 dedup macro whose two instantiation sites
* ended up in DIFFERENT TUs after the split. Both are guarded, so src/800.c keeping its own
* copies is harmless. */
#include "psyq/libcd.h"
/* P31 S72 — the declarations that CROSS the src/800.c -> 800_b.c -> 800_c.c split.
*
* Measured, not guessed: of 1,247 names declared across the three regions, only 57 are used
* outside the region that declares them, and 19 of those are typedefs. Every one had exactly
* ONE definition and zero shape conflicts, so this is a partition of the old file, not a
* rewrite — each typedef was MOVED here, never copied (a duplicate typedef is a C89 error).
* The set was derived from the compiler's own errors, not from a regex model of C (R33).
* See cookbook §426 and config/splat.us.exe.yaml for why the split exists at all. */
/* was: src/800.c */
typedef struct Ent30D80 {
/* 0x00 */ s32 unk00;
/* 0x04 */ u8 pad04[6];
/* 0x0A */ u16 unk0A;
/* 0x0C */ u8 pad0C[0x34];
/* 0x40 */ void (*unk40)(s32, s32);
/* 0x44 */ s32 unk44;
/* 0x48 */ u8 pad48[6];
/* 0x4E */ u8 unk4E;
/* 0x4F */ u8 pad4F;
/* 0x50 */ u8 unk50;
/* 0x51 */ u8 unk51;
} Ent30D80;
/* was: src/800.c */
typedef struct { u8 v; } W8;
/* was: src/800.c */
typedef struct Rec14 {
/* 0x00 */ u16 unk00;
/* 0x02 */ u16 unk02;
/* 0x04 */ u32 unk04;
/* 0x08 */ u32 unk08;
/* 0x0C */ u16 unk0C;
/* 0x0E */ u16 unk0E;
/* 0x10 */ u32 unk10;
} Rec14; /* 0x14 */
/* was: src/800.c */
typedef struct Owner4EE8 {
/* 0x00 */ u8 pad00[0x14];
/* 0x14 */ Rec14 **unk14;
} Owner4EE8;
/* was: src/800.c */
typedef struct Slot {
/* 0x00 */ s32 unk00;
/* 0x04 */ s32 unk04;
/* 0x08 */ u8 unk08[0xC];
/* 0x14 */ s16 unk14;
/* 0x16 */ u8 unk16[2];
/* 0x18 */ s16 unk18;
/* 0x1A */ u8 unk1A[0x26];
/* 0x40 */ s32 unk40;
/* 0x44 */ u8 unk44;
/* 0x45 */ u8 unk45[3];
} Slot;
/* was: src/800.c */
typedef struct {
s16 unk00;
s16 unk02;
s16 unk04;
s16 unk06;
s16 unk08;
s16 unk0A;
s16 unk0C;
s16 unk0E;
u8 unk10;
u8 unk11;
u8 unk12;
u8 unk13;
s32 unk14;
} Rsc24; /* 0x18 */
/* was: src/800.c */
typedef struct {
/* 0x00 */ u8 *unk00;
/* 0x04 */ u8 pad04[2];
/* 0x06 */ u8 unk06;
/* 0x07 */ u8 unk07;
/* 0x08 */ u8 unk08;
/* 0x09 */ u8 pad09[3];
} A12; /* 0x0C */
/* was: src/800.c */
typedef struct {
/* 0x00 */ s32 unk00;
/* 0x04 */ s16 unk04;
/* 0x06 */ s16 unk06;
/* 0x08 */ s16 unk08;
/* 0x0A */ u8 unk0A;
/* 0x0B */ u8 unk0B;
} B12; /* 0x0C */
/* was: src/800.c */
typedef struct {
/* 0x00 */ u8 pad00[4];
/* 0x04 */ u8 unk04;
/* 0x05 */ u8 pad05[11];
/* 0x10 */ u16 unk10;
/* 0x12 */ u16 unk12;
/* 0x14 */ u8 pad14[2];
/* 0x16 */ s16 unk16;
/* 0x18 */ u8 pad18[8];
} C24; /* 0x20 */
/* was: src/800.c */
typedef struct { /* 0x18 stride; D_800A463C + k*0x18 */
s32 unk00;
u8 unk04[0x14];
} Ent24;
/* was: src/800.c */
typedef struct { /* base 0x80064D49, stride 0x0C */
u8 unk00;
u8 pad[11];
} Elm12;
/* was: src/800.c */
typedef struct { /* base 0x80076240, stride 0x10 */
u16 unk00;
u16 unk02;
s32 unk04;
s32 unk08;
s32 unk0C;
} Slot16A;
/* was: src/800.c */
typedef struct {
s32 unk00;
s32 unk04;
s32 unk08;
u8 unk0C;
u8 unk0D;
u8 unk0E;
u8 unk0F;
} Slot16; /* 0x10 */
/* was: src/800.c */
typedef struct { s32 v; } W32;
/* was: src/800.c */
typedef struct Slot54 {
/* 0x00 */ s16 unk00;
/* 0x02 */ s16 unk02;
/* 0x04 */ s16 unk04;
/* 0x06 */ s16 unk06;
/* 0x08 */ u16 unk08;
/* 0x0A */ s8 unk0A;
} Slot54;
/* was: src/800.c */
typedef struct { u16 f0; } H2; /* 0x2 */
/* was: src/800.c */
typedef struct {
s32 unk00;
u8 unk04;
u8 unk05;
u8 unk06;
u8 unk07;
u8 unk08;
u8 unk09;
u8 unk0A;
u8 unk0B;
s32 unk0C;
} Rsc16; /* 0x10 */
/* was: src/800_c.c */
typedef struct { s16 v; } W16;
/* was: src/800_c.c */
typedef struct {
u8 unk00;
u8 unk01[11];
} Rsc12; /* 0x0C */
#endif /* BFM_800_SHARED_H */