mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-03 00:05:11 -04:00
T5.1.c2b: lift_types --census: batch main moved (223 groups, 236 defs)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-4
@@ -39,10 +39,7 @@
|
||||
* - switch indices `res`/`D_800760C4` are unsigned so gcc's case tree tests 1 first and `0` as `bltu 1`.
|
||||
*/
|
||||
|
||||
typedef struct { s32 stat; u32 val; } CardSlot; /* D_8007609C[port>>4], 8 bytes */
|
||||
typedef struct { u8 b[41]; } Blk41;
|
||||
typedef struct { u8 b[32]; } Blk32u;
|
||||
typedef struct { u8 b[128]; } Blk128u;
|
||||
/* D_8007609C[port>>4], 8 bytes */
|
||||
/* 0x98 bytes, word aligned */
|
||||
|
||||
extern s32 D_800760AC; /* state */
|
||||
|
||||
+18
-363
@@ -44,10 +44,7 @@
|
||||
* - switch indices `res`/`D_800760C4` are unsigned so gcc's case tree tests 1 first and `0` as `bltu 1`.
|
||||
*/
|
||||
|
||||
typedef struct { s32 stat; u32 val; } CardSlot; /* D_8007609C[port>>4], 8 bytes */
|
||||
typedef struct { u8 b[41]; } Blk41;
|
||||
typedef struct { u8 b[32]; } Blk32u;
|
||||
typedef struct { u8 b[128]; } Blk128u;
|
||||
/* D_8007609C[port>>4], 8 bytes */
|
||||
/* 0x98 bytes, word aligned */
|
||||
|
||||
extern s32 D_800760AC; /* state */
|
||||
@@ -1954,7 +1951,6 @@ void func_8002EDE4(void) {
|
||||
extern void func_80036EB4(void);
|
||||
extern void func_8002EC10(void);
|
||||
|
||||
struct func_8002EE64_b { u8 c; };
|
||||
|
||||
void func_8002EE64(void) {
|
||||
s32 g1, g2, g3, g4;
|
||||
@@ -2138,23 +2134,6 @@ void func_8002F12C(s32 a0) {
|
||||
extern u8 D_800A4694[];
|
||||
|
||||
void func_8002F150(s32 arg0) {
|
||||
struct F150Rec {
|
||||
u8 pad[0x0E];
|
||||
u8 flg[8];
|
||||
u8 tail[0x3E];
|
||||
};
|
||||
struct F150Slot {
|
||||
u8 pad[0x20];
|
||||
u32 u20;
|
||||
u32 u24;
|
||||
u32 u28;
|
||||
u32 u2C;
|
||||
u16 u30;
|
||||
u8 mid[5];
|
||||
u8 u37;
|
||||
u8 u38;
|
||||
u8 tail[0x1B];
|
||||
};
|
||||
|
||||
struct F150Rec *rec = (struct F150Rec *)D_800A4694 + arg0;
|
||||
struct F150Slot *slots = (struct F150Slot *)(D_800A4694 + 0x2F4);
|
||||
@@ -2172,24 +2151,7 @@ void func_8002F150(s32 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct F1ccRec {
|
||||
u8 pad[0x0E];
|
||||
u8 flg[8];
|
||||
u8 tail[0x3E];
|
||||
} F1ccRec;
|
||||
|
||||
typedef struct F1ccSlot {
|
||||
u8 pad[0x20];
|
||||
u32 u20;
|
||||
u32 u24;
|
||||
u32 u28;
|
||||
u32 u2C;
|
||||
u16 u30;
|
||||
u8 mid[5];
|
||||
u8 u37;
|
||||
u8 u38;
|
||||
u8 tail[0x1B];
|
||||
} F1ccSlot;
|
||||
|
||||
extern u8 D_800A4694[];
|
||||
|
||||
@@ -2975,7 +2937,7 @@ s32 func_8002FF0C(s32 a0, s32 a1) {
|
||||
*(s16 *)(w + 0xA) = r;
|
||||
/* read through a struct-typed pointer: expand forces the constant address into a pseudo (explow.c
|
||||
memory_address), so cse does not forward the `D_800A46D2 = r` store and the value is re-read */
|
||||
if (r == -1 || func_800419B0(((struct { s16 v; } *)&D_800A46D2)->v) == -1) {
|
||||
if (r == -1 || func_800419B0(((Unkstruct_800A46D2 *)&D_800A46D2)->v) == -1) {
|
||||
D_800A4650[idx24] = 1;
|
||||
return 1;
|
||||
}
|
||||
@@ -3258,16 +3220,7 @@ s32 func_80030634(void) {
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
u8 unk00[4];
|
||||
u8 unk04;
|
||||
u8 unk05[11];
|
||||
u16 unk10;
|
||||
u16 unk12;
|
||||
u8 unk14[2];
|
||||
s16 unk16;
|
||||
u8 unk18[8];
|
||||
} Blk28; /* 0x20 */
|
||||
/* 0x20 */
|
||||
|
||||
extern u8 D_8006AEF4;
|
||||
extern s16 D_800A46CC;
|
||||
@@ -3517,12 +3470,6 @@ s32 func_80030CA4(u16 arg0)
|
||||
|
||||
|
||||
|
||||
typedef struct Blk48_30D80 {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ u8 pad04[0x3D];
|
||||
/* 0x41 */ u8 unk41;
|
||||
/* 0x42 */ u8 pad42[6];
|
||||
} Blk48_30D80;
|
||||
|
||||
extern s8 D_800A4F17;
|
||||
extern s32 D_800C7D20;
|
||||
@@ -3684,16 +3631,7 @@ extern void func_800314DC(struct Obj_800_b_2 *);
|
||||
extern void func_800316F8(s32); /* §376: the definition takes s32; cast at the use site */
|
||||
extern void func_80031988(struct Ent30D80 *);
|
||||
|
||||
typedef struct VoiceF80 {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ s32 unk04;
|
||||
/* 0x08 */ s16 unk08;
|
||||
/* 0x0A */ s16 unk0A;
|
||||
/* 0x0C */ u8 pad0C[0x34];
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ u8 unk44;
|
||||
/* 0x45 */ u8 pad45[3];
|
||||
} VoiceF80; /* 0x48 */
|
||||
/* 0x48 */
|
||||
|
||||
void func_80030F80(void)
|
||||
{
|
||||
@@ -3877,27 +3815,6 @@ void func_80030F80(void)
|
||||
|
||||
|
||||
|
||||
typedef struct Obj_800_b_2 {
|
||||
/* 0x00 */ u8 unk00[0xA];
|
||||
/* 0x0A */ u16 unk0A;
|
||||
/* 0x0C */ u16 unk0C;
|
||||
/* 0x0E */ u16 unk0E;
|
||||
/* 0x10 */ u16 unk10;
|
||||
/* 0x12 */ u8 unk12[0x12];
|
||||
/* 0x24 */ s32 unk24;
|
||||
/* 0x28 */ s32 unk28;
|
||||
/* 0x2C */ s32 unk2C;
|
||||
/* 0x30 */ u16 unk30;
|
||||
/* 0x32 */ u8 unk32[0x5];
|
||||
/* 0x37 */ u8 unk37;
|
||||
/* 0x38 */ u8 unk38;
|
||||
/* 0x39 */ u8 unk39;
|
||||
/* 0x3A */ s16 unk3A;
|
||||
/* 0x3C */ s16 unk3C;
|
||||
/* 0x3E */ u8 unk3E[0x13];
|
||||
/* 0x51 */ u8 unk51;
|
||||
/* 0x52 */ u8 unk52[2];
|
||||
} Obj_800_b_2;
|
||||
|
||||
|
||||
/* 0x0C stride record pointed at by D_8006A970[] -- must match src/800.c's B12
|
||||
@@ -4869,16 +4786,7 @@ done:
|
||||
* an extra unk0B field the TU's Slot54 doesn't expose. Different tag name so
|
||||
* it does NOT collide with the TU's `Slot54` typedef above; pointers are
|
||||
* cast to `Slot54 *` only at the func_80032A74 call site. */
|
||||
typedef struct Slot54View {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ u16 unk04;
|
||||
/* 0x06 */ u16 unk06;
|
||||
/* 0x08 */ u16 unk08;
|
||||
/* 0x0A */ s8 unk0A;
|
||||
/* 0x0B */ u8 unk0B;
|
||||
/* 0x0C */ u8 pad0C[0x48];
|
||||
} Slot54View; /* 0x54 */
|
||||
/* 0x54 */
|
||||
|
||||
|
||||
extern Rec14 *D_80068304[];
|
||||
@@ -5226,85 +5134,15 @@ done:
|
||||
/* ---- views this function needs (new names, no TU collision) ---- */
|
||||
|
||||
/* the caller's 0x54 request slot (Slot54, seen past its declared tail) */
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ u16 unk02;
|
||||
/* 0x04 */ u8 pad04[6];
|
||||
/* 0x0A */ u8 unk0A;
|
||||
/* 0x0B */ u8 pad0B[1];
|
||||
/* 0x0C */ u16 unk0C;
|
||||
/* 0x0E */ u8 unk0E[8];
|
||||
} Req32A74;
|
||||
|
||||
/* the 0x14 record walked by this loop (Rec14, byte-resolved) */
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ u16 unk02;
|
||||
/* 0x04 */ u16 unk04;
|
||||
/* 0x06 */ u8 unk06;
|
||||
/* 0x07 */ u8 unk07;
|
||||
/* 0x08 */ u8 unk08;
|
||||
/* 0x09 */ u8 unk09;
|
||||
/* 0x0A */ u8 unk0A;
|
||||
/* 0x0B */ u8 unk0B;
|
||||
/* 0x0C */ u8 pad0C[4];
|
||||
/* 0x10 */ s32 unk10;
|
||||
} Rec32A74; /* 0x14 */
|
||||
/* 0x14 */
|
||||
|
||||
/* the 0x54 mixer channel at D_800A4988 (cf. Chan336A8) */
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ s32 unk04;
|
||||
/* 0x08 */ u16 unk08;
|
||||
/* 0x0A */ u16 unk0A;
|
||||
/* 0x0C */ u16 unk0C;
|
||||
/* 0x0E */ u16 unk0E;
|
||||
/* 0x10 */ s16 unk10;
|
||||
/* 0x12 */ s16 unk12;
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ u8 pad18[0xC];
|
||||
/* 0x24 */ s32 unk24;
|
||||
/* 0x28 */ u8 pad28[0xC];
|
||||
/* 0x34 */ u8 unk34;
|
||||
/* 0x35 */ u8 unk35;
|
||||
/* 0x36 */ u8 unk36;
|
||||
/* 0x37 */ u8 pad37[9];
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ s32 unk44;
|
||||
/* 0x48 */ s16 unk48;
|
||||
/* 0x4A */ s16 unk4A;
|
||||
/* 0x4C */ u8 unk4C;
|
||||
/* 0x4D */ u8 unk4D;
|
||||
/* 0x4E */ u8 unk4E;
|
||||
/* 0x4F */ u8 unk4F;
|
||||
/* 0x50 */ u8 pad50[2];
|
||||
/* 0x52 */ u8 unk52;
|
||||
/* 0x53 */ u8 unk53;
|
||||
} Chan32A74; /* 0x54 */
|
||||
/* 0x54 */
|
||||
|
||||
/* the 0x48 voice at D_800A4C28 (Slot, byte-resolved) */
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ s32 unk04;
|
||||
/* 0x08 */ u16 unk08;
|
||||
/* 0x0A */ u16 unk0A;
|
||||
/* 0x0C */ u16 unk0C;
|
||||
/* 0x0E */ u16 unk0E;
|
||||
/* 0x10 */ u8 pad10[4];
|
||||
/* 0x14 */ u16 unk14;
|
||||
/* 0x16 */ u8 pad16[2];
|
||||
/* 0x18 */ u16 unk18;
|
||||
/* 0x1A */ u8 pad1A[2];
|
||||
/* 0x1C */ s32 unk1C;
|
||||
/* 0x20 */ u8 pad20[0x1A];
|
||||
/* 0x3A */ u16 unk3A;
|
||||
/* 0x3C */ u16 unk3C;
|
||||
/* 0x3E */ u8 pad3E[2];
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ u8 unk44;
|
||||
/* 0x45 */ u8 unk45;
|
||||
/* 0x46 */ u8 pad46[2];
|
||||
} Voice32A74; /* 0x48 */
|
||||
/* 0x48 */
|
||||
|
||||
extern s16 D_800C5328[];
|
||||
extern s16 D_800C532A[];
|
||||
@@ -5918,40 +5756,10 @@ void func_800335B8(s32 a0, s32 flags) {
|
||||
* table load hoist across `sh $v0,0xA($a3)` and interleave into the first mult.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 pad00[0x0A];
|
||||
/* 0x0A */ u16 unk0A;
|
||||
/* 0x0C */ u8 pad0C[0x28];
|
||||
/* 0x34 */ u8 unk34;
|
||||
/* 0x35 */ u8 unk35;
|
||||
/* 0x36 */ u8 pad36[0x1C];
|
||||
/* 0x52 */ u8 unk52;
|
||||
/* 0x53 */ u8 pad53[1];
|
||||
} Chan336A8; /* size 0x54 */
|
||||
/* size 0x54 */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ s32 unk04;
|
||||
/* 0x08 */ s16 unk08;
|
||||
/* 0x0A */ s16 unk0A;
|
||||
/* 0x0C */ u8 pad0C[0x34];
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ u8 unk44;
|
||||
/* 0x45 */ u8 pad45[3];
|
||||
} Voice336A8; /* size 0x48 */
|
||||
/* size 0x48 */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 pad00[0x16];
|
||||
/* 0x16 */ u8 unk16;
|
||||
/* 0x17 */ u8 pad17[1];
|
||||
/* 0x18 */ u16 unk18;
|
||||
/* 0x1A */ u8 pad1A[2];
|
||||
/* 0x1C */ u16 unk1C[12];
|
||||
/* 0x34 */ u8 pad34[4];
|
||||
/* 0x38 */ u8 unk38;
|
||||
/* 0x39 */ u8 pad39[1];
|
||||
/* 0x3A */ u8 unk3A[8];
|
||||
} Req336A8;
|
||||
|
||||
extern u8 D_800A4988[];
|
||||
extern s32 D_80073140[];
|
||||
@@ -6081,113 +5889,14 @@ void func_800336A8(Req336A8 *arg)
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 cur;
|
||||
/* 0x02 */ u16 step;
|
||||
/* 0x04 */ u16 tgt;
|
||||
/* 0x06 */ u8 act;
|
||||
/* 0x07 */ u8 pad07;
|
||||
} Ramp388C; /* 0x08 */
|
||||
/* 0x08 */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ u16 unk02;
|
||||
/* 0x04 */ u16 unk04;
|
||||
/* 0x06 */ u16 unk06;
|
||||
/* 0x08 */ u8 unk08;
|
||||
/* 0x09 */ u8 unk09;
|
||||
/* 0x0A */ u8 unk0A;
|
||||
/* 0x0B */ u8 unk0B;
|
||||
/* 0x0C */ u8 unk0C;
|
||||
/* 0x0D */ u8 unk0D;
|
||||
/* 0x0E */ u8 pad0E[2];
|
||||
/* 0x10 */ s32 unk10;
|
||||
} Cmd388C; /* 0x14 */
|
||||
/* 0x14 */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk00;
|
||||
/* 0x02 */ u8 pad02[6];
|
||||
/* 0x08 */ u16 unk08;
|
||||
/* 0x0A */ u8 pad0A[2];
|
||||
/* 0x0C */ u32 *unk0C;
|
||||
/* 0x10 */ u8 *unk10;
|
||||
/* 0x14 */ u16 unk14;
|
||||
/* 0x16 */ u8 unk16;
|
||||
/* 0x17 */ u8 unk17;
|
||||
/* 0x18 */ u16 unk18;
|
||||
/* 0x1A */ u16 unk1A;
|
||||
/* 0x1C */ Ramp388C unk1C[3];
|
||||
/* 0x34 */ u16 unk34;
|
||||
/* 0x36 */ u8 unk36;
|
||||
/* 0x37 */ u8 pad37[1];
|
||||
/* 0x38 */ u8 unk38;
|
||||
/* 0x39 */ u8 unk39;
|
||||
/* 0x3A */ u8 unk3A[8];
|
||||
/* 0x42 */ u8 pad42[2];
|
||||
/* 0x44 */ u32 *unk44;
|
||||
/* 0x48 */ u8 unk48;
|
||||
/* 0x49 */ u8 pad49[1];
|
||||
/* 0x4A */ u16 unk4A;
|
||||
/* 0x4C */ u8 unk4C;
|
||||
/* 0x4D */ u8 unk4D;
|
||||
/* 0x4E */ u8 unk4E;
|
||||
/* 0x4F */ u8 unk4F;
|
||||
/* 0x50 */ u16 unk50;
|
||||
/* 0x52 */ s16 unk52;
|
||||
} Ent388C;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ s32 unk04;
|
||||
/* 0x08 */ u16 unk08;
|
||||
/* 0x0A */ u16 unk0A;
|
||||
/* 0x0C */ u16 unk0C;
|
||||
/* 0x0E */ u16 unk0E;
|
||||
/* 0x10 */ u16 unk10;
|
||||
/* 0x12 */ u16 unk12;
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ u8 pad18[0x0C];
|
||||
/* 0x24 */ s32 unk24;
|
||||
/* 0x28 */ u8 pad28[0x0C];
|
||||
/* 0x34 */ u8 unk34;
|
||||
/* 0x35 */ u8 unk35;
|
||||
/* 0x36 */ u8 unk36;
|
||||
/* 0x37 */ u8 pad37[9];
|
||||
/* 0x40 */ void (*unk40)(u8 *, s32);
|
||||
/* 0x44 */ s32 unk44;
|
||||
/* 0x48 */ u16 unk48;
|
||||
/* 0x4A */ u16 unk4A;
|
||||
/* 0x4C */ u8 unk4C;
|
||||
/* 0x4D */ u8 unk4D;
|
||||
/* 0x4E */ u8 unk4E;
|
||||
/* 0x4F */ u8 unk4F;
|
||||
/* 0x50 */ u8 pad50[2];
|
||||
/* 0x52 */ u8 unk52;
|
||||
/* 0x53 */ u8 unk53;
|
||||
} Chan388C; /* 0x54 */
|
||||
/* 0x54 */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ s32 unk04;
|
||||
/* 0x08 */ s16 unk08;
|
||||
/* 0x0A */ s16 unk0A;
|
||||
/* 0x0C */ s16 unk0C;
|
||||
/* 0x0E */ s16 unk0E;
|
||||
/* 0x10 */ u8 pad10[4];
|
||||
/* 0x14 */ s16 unk14;
|
||||
/* 0x16 */ u8 pad16[2];
|
||||
/* 0x18 */ u16 unk18;
|
||||
/* 0x1A */ u8 pad1A[2];
|
||||
/* 0x1C */ s32 unk1C;
|
||||
/* 0x20 */ u8 pad20[0x1A];
|
||||
/* 0x3A */ s16 unk3A;
|
||||
/* 0x3C */ s16 unk3C;
|
||||
/* 0x3E */ u8 pad3E[2];
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ u8 unk44;
|
||||
/* 0x45 */ u8 unk45;
|
||||
/* 0x46 */ u8 pad46[2];
|
||||
} Voice388C; /* 0x48 */
|
||||
/* 0x48 */
|
||||
|
||||
extern s16 D_800A4EF0;
|
||||
extern s16 D_800C5328[];
|
||||
@@ -6676,50 +6385,12 @@ void func_800342E8(u8 *a0, s32 a1) {
|
||||
*/
|
||||
|
||||
/* 0xC-byte sound-instrument record, indexed by p[3]. */
|
||||
typedef struct Rec12_800_b_2 {
|
||||
/* 0x00 */ s32 unk00;
|
||||
/* 0x04 */ u16 unk04;
|
||||
/* 0x06 */ u16 unk06;
|
||||
/* 0x08 */ u8 unk08;
|
||||
/* 0x09 */ u8 pad09[3];
|
||||
} Rec12_800_b_2; /* 0xC */
|
||||
/* 0xC */
|
||||
|
||||
typedef struct Snd54Sub {
|
||||
/* 0x00 */ s16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ s16 unk04;
|
||||
/* 0x06 */ u8 unk06;
|
||||
/* 0x07 */ u8 pad07;
|
||||
} Snd54Sub; /* 0x8 */
|
||||
/* 0x8 */
|
||||
|
||||
/* the 0x54-stride voice slot inside D_800A46E8 */
|
||||
typedef struct Snd54 {
|
||||
/* 0x00 */ s16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ s16 unk04;
|
||||
/* 0x06 */ s16 unk06;
|
||||
/* 0x08 */ u16 unk08;
|
||||
/* 0x0A */ u8 pad0A[2];
|
||||
/* 0x0C */ s32 unk0C;
|
||||
/* 0x10 */ s32 unk10;
|
||||
/* 0x14 */ s16 unk14;
|
||||
/* 0x16 */ u8 unk16;
|
||||
/* 0x17 */ u8 unk17;
|
||||
/* 0x18 */ s16 unk18;
|
||||
/* 0x1A */ s16 unk1A;
|
||||
/* 0x1C */ Snd54Sub unk1C[3];
|
||||
/* 0x34 */ s16 unk34;
|
||||
/* 0x36 */ u8 unk36;
|
||||
/* 0x37 */ u8 unk37;
|
||||
/* 0x38 */ u8 unk38;
|
||||
/* 0x39 */ u8 unk39;
|
||||
/* 0x3A */ u8 unk3A[8];
|
||||
/* 0x42 */ u8 pad42[6];
|
||||
/* 0x48 */ u8 unk48;
|
||||
/* 0x49 */ u8 pad49[7];
|
||||
/* 0x50 */ s16 unk50;
|
||||
/* 0x52 */ s16 unk52;
|
||||
} Snd54; /* 0x54 */
|
||||
/* 0x54 */
|
||||
|
||||
/* opaque — matches the TU's `typedef struct Owner4EE8 Owner4EE8;` spelling
|
||||
* exactly so this local decl is droppable at bank time in favor of the TU's;
|
||||
@@ -6884,11 +6555,6 @@ void func_80034650(u8 *param_1, s32 param_2)
|
||||
* banking notes) — reproduced here verbatim for standalone compilation.
|
||||
* Do not duplicate in the TU when banking. */
|
||||
|
||||
typedef struct {
|
||||
u8 pad[0x3A];
|
||||
u8 flg[8];
|
||||
u8 tail[0x12];
|
||||
} S54;
|
||||
|
||||
extern u16 D_800A46E8[];
|
||||
extern void func_80030D80(Ent30D80 *arg0, s16 arg1);
|
||||
@@ -6928,18 +6594,7 @@ void func_800346D0(s32 arg0) {
|
||||
} while (i < 8);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
u16 state; /* 0x00 */
|
||||
u16 unk02;
|
||||
u16 id; /* 0x04 */
|
||||
u16 group; /* 0x06 */
|
||||
u16 unk08;
|
||||
s8 unk0A;
|
||||
u8 unk0B;
|
||||
u8 pad0C[0xA];
|
||||
u8 active; /* 0x16 */
|
||||
u8 pad17[0x3D];
|
||||
} Sl; /* 0x54 */
|
||||
/* 0x54 */
|
||||
|
||||
extern u16 D_800A46E8[];
|
||||
|
||||
|
||||
+1
-4
@@ -44,10 +44,7 @@
|
||||
* - switch indices `res`/`D_800760C4` are unsigned so gcc's case tree tests 1 first and `0` as `bltu 1`.
|
||||
*/
|
||||
|
||||
typedef struct { s32 stat; u32 val; } CardSlot; /* D_8007609C[port>>4], 8 bytes */
|
||||
typedef struct { u8 b[41]; } Blk41;
|
||||
typedef struct { u8 b[32]; } Blk32u;
|
||||
typedef struct { u8 b[128]; } Blk128u;
|
||||
/* D_8007609C[port>>4], 8 bytes */
|
||||
/* 0x98 bytes, word aligned */
|
||||
|
||||
extern s32 D_800760AC; /* state */
|
||||
|
||||
-40
@@ -1376,20 +1376,6 @@ extern void func_800359B0(s32 arg0); /* §376: def takes (s32) */
|
||||
extern void func_80036D24(void);
|
||||
extern void func_80036FB0(s32, s32);
|
||||
|
||||
typedef struct {
|
||||
s32 f00;
|
||||
s32 f04;
|
||||
s32 f08;
|
||||
s32 f0c;
|
||||
s32 f10;
|
||||
s32 f14;
|
||||
s32 f18;
|
||||
s32 f1c;
|
||||
s32 f20;
|
||||
s32 f24;
|
||||
s32 f28;
|
||||
s32 f2c;
|
||||
} CdReq_800_c;
|
||||
|
||||
void func_80036AF8(CdlLOC *loc, s32 flags) {
|
||||
CdReq_800_c req;
|
||||
@@ -1845,11 +1831,6 @@ void *func_80037368(int *out) {
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
s16 unk00;
|
||||
u8 pad02[4];
|
||||
u16 unk06;
|
||||
} StructA4E88;
|
||||
|
||||
/* Law 2: the destination TU (src/800.c) already declares D_80065438 as an array-of-struct
|
||||
* (H2 = { u16 f0; }) rather than a plain u16[] — refuse-TYPE(D_80065438, u16 vs H2).
|
||||
@@ -1982,7 +1963,6 @@ s32 func_8003750C(void) {
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct { u8 v; } W8_;
|
||||
extern W8_ D_80076242_ __asm__("D_80076242");
|
||||
|
||||
extern u8 D_8006AEF4;
|
||||
@@ -3408,7 +3388,6 @@ void func_80039300(void) {
|
||||
* git history (this header replaces them).
|
||||
*/
|
||||
|
||||
typedef struct { u32 w; } VMask;
|
||||
|
||||
extern u8 *D_800762B0;
|
||||
extern u8 D_800762B3[];
|
||||
@@ -3915,16 +3894,7 @@ void func_80039F50(u8 **a0, s16 a1)
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
u8 b0;
|
||||
u8 pad[25];
|
||||
} A098Rec;
|
||||
|
||||
typedef struct {
|
||||
u8 *stream;
|
||||
u8 pad04[0x16];
|
||||
A098Rec rec[1];
|
||||
} A098Ctx;
|
||||
|
||||
void func_8003A098(A098Ctx *arg0, s16 arg1) {
|
||||
u8 *v1;
|
||||
@@ -3994,16 +3964,6 @@ void func_8003A0E4(void *arg0, s16 arg1) {
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 *ptr;
|
||||
/* 0x004 */ u8 pad_004[0x1D0 - 0x004];
|
||||
/* 0x1D0 */ s32 unk1D0;
|
||||
/* 0x1D4 */ u8 pad_1D4[0x1E4 - 0x1D4];
|
||||
/* 0x1E4 */ s16 unk1E4;
|
||||
/* 0x1E6 */ s16 unk1E6;
|
||||
/* 0x1E8 */ u8 pad_1E8[0x1F9 - 0x1E8];
|
||||
/* 0x1F9 */ u8 unk1F9;
|
||||
} func_8003A234_Ctx;
|
||||
|
||||
void func_8003A234(func_8003A234_Ctx *a0) {
|
||||
u8 *a2 = a0->ptr;
|
||||
|
||||
@@ -226,7 +226,6 @@ extern void func_8001AF34(void);
|
||||
extern void func_8001513C(void);
|
||||
extern void func_80042610(void (*)(void));
|
||||
|
||||
struct MainSlot { s32 unk0; s32 unk4; s32 unk8; };
|
||||
|
||||
// @class: other
|
||||
// @stuck: none -- MATCH (509 ins, -O0 boot object).
|
||||
@@ -764,10 +763,6 @@ extern void func_800D1724(s32);
|
||||
* No note, no variable: stupid.c's born+2 rule 2-colours the chain $v1/$a0 exactly as the target. Verified: match_one
|
||||
* MATCH 192/192 and rtu_match MATCH in src/boot.c (--o0). Semantics: (i*2+1)*2-2 == i*4. */
|
||||
void func_80011380(void) {
|
||||
typedef struct {
|
||||
u8 pad00[0x16];
|
||||
u8 unk16;
|
||||
} Unk;
|
||||
register u8 *p = D_800AF630;
|
||||
Unk *q = (Unk *)&D_800AE6A8;
|
||||
|
||||
|
||||
@@ -723,8 +723,6 @@ void func_800CF990(void) {
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct { u32 addr : 24; u32 len : 8; } P_TAG_800CFAD0;
|
||||
typedef struct { u8 b0, b1, b2, b3; } BYTES_800CFAD0;
|
||||
|
||||
void func_800CFAD0(void)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
typedef struct { u32 addr : 24; u32 len : 8; } P_TAG_800CFAD0;
|
||||
typedef struct { u8 b0, b1, b2, b3; } BYTES_800CFAD0;
|
||||
extern u16 D_800B99F0;
|
||||
extern void (*D_800D3430[])(void);
|
||||
extern void func_800CEDFC(void);
|
||||
@@ -539,11 +537,6 @@ extern s32 D_80127500;
|
||||
extern s32 resLoad_lastId;
|
||||
|
||||
void func_800D06E8(void) {
|
||||
typedef struct {
|
||||
u8 pad00[0x36];
|
||||
u8 field_0x36;
|
||||
u8 field_0x37;
|
||||
} Blk80078E78;
|
||||
extern Blk80078E78 D_80078E78;
|
||||
Blk80078E78 *p = &D_80078E78;
|
||||
s32 s0;
|
||||
@@ -1103,10 +1096,6 @@ extern s32 func_800291DC(s32);
|
||||
extern void func_800291A0(s32, s32);
|
||||
extern void func_800291C8(s32, s32);
|
||||
|
||||
typedef struct {
|
||||
u8 pad00[0x34];
|
||||
s16 field_0x34; /* 0x34 */
|
||||
} Struct80078E78;
|
||||
extern Struct80078E78 D_80078E78;
|
||||
|
||||
extern u8 D_8010EDF0;
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
typedef struct { u32 addr : 24; u32 len : 8; } P_TAG_800CFAD0;
|
||||
typedef struct { u8 b0, b1, b2, b3; } BYTES_800CFAD0;
|
||||
typedef struct {
|
||||
u8 pad00[0x34];
|
||||
s16 field_0x34; /* 0x34 */
|
||||
} Struct80078E78;
|
||||
extern u16 D_800B99F0;
|
||||
extern void (*D_800D3430[])(void);
|
||||
extern void func_800CEDFC(void);
|
||||
@@ -559,24 +553,8 @@ s32 func_800D17B8(s32 arg0) {
|
||||
// D_800AE6A8 as a STRUCT and reference named fields (gcc CSEs the base) rather than a u8[]
|
||||
// with per-store lui/at absolute addressing.
|
||||
|
||||
typedef struct {
|
||||
s32 w[9];
|
||||
} Blob36;
|
||||
|
||||
typedef struct {
|
||||
u8 pad0[2];
|
||||
u8 b2;
|
||||
u8 b3;
|
||||
} Src;
|
||||
|
||||
typedef struct {
|
||||
u8 pad0[8];
|
||||
s32 w8;
|
||||
u8 pad12[10];
|
||||
u8 b16;
|
||||
u8 pad17[2];
|
||||
u8 b19;
|
||||
} Dst;
|
||||
|
||||
extern u16 D_80078E50;
|
||||
extern s32 D_800AE6A8;
|
||||
@@ -609,9 +587,6 @@ void func_800D185C(void *arg0) {
|
||||
// wrapper so the whole-array assignment `local = D_801141BC` is a clean aggregate copy
|
||||
// (3 words) and `local.fn[idx](...)` is the indexed call.
|
||||
|
||||
typedef struct {
|
||||
void (*fn[3])(void *);
|
||||
} FnTbl3;
|
||||
|
||||
extern u8 D_800AE6BC;
|
||||
extern FnTbl3 D_801141BC;
|
||||
@@ -642,11 +617,6 @@ void func_800D18DC(void) {
|
||||
* gcc's natural schedule (the 0x14 store hoists into the call delay slot).
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
u8 pad[0x14];
|
||||
u8 f14; /* 0x14 */
|
||||
u8 f15; /* 0x15 */
|
||||
} S800D1938;
|
||||
|
||||
extern void func_800D1F58(void);
|
||||
extern void func_801285D4(void);
|
||||
@@ -702,9 +672,6 @@ extern void func_8001BE20(void);
|
||||
extern s32 func_8001BE30(void);
|
||||
extern void func_800CF8E4(void);
|
||||
|
||||
typedef struct {
|
||||
s32 (*f[3])(u8 *);
|
||||
} FnTbl;
|
||||
|
||||
extern FnTbl D_801141C8;
|
||||
|
||||
@@ -1195,18 +1162,7 @@ void func_800D1FC8(void *arg0, int arg1) {
|
||||
*/
|
||||
|
||||
|
||||
typedef struct {
|
||||
u16 x; /* 0x0 */
|
||||
u16 y; /* 0x2 */
|
||||
u16 z; /* 0x4 */
|
||||
} Pos800D20C0;
|
||||
|
||||
typedef struct {
|
||||
u8 pad[0x5C];
|
||||
s32 t5C; /* 0x5C */
|
||||
s32 t60; /* 0x60 */
|
||||
s32 t64; /* 0x64 */
|
||||
} Tgt800D20C0;
|
||||
|
||||
extern Tgt800D20C0 *D_801151D4;
|
||||
extern long VectorNormalSS(SVECTOR_800 *a, SVECTOR_800 *b);
|
||||
@@ -1254,10 +1210,6 @@ void func_800D20C0(Pos800D20C0 *arg0, SVECTOR_800 *arg1, s16 arg2) {
|
||||
* In the work block: func_8001CC3C(s0, arg1, 0, 0) with sb s2,0x27(s0) sitting
|
||||
* in the jal's delay slot in asm -> write the store AFTER the call.
|
||||
*/
|
||||
typedef struct {
|
||||
u8 pad[0x27];
|
||||
u8 f27; /* 0x27 */
|
||||
} S800D21C4;
|
||||
|
||||
extern void *func_801465C0(s32 arg0);
|
||||
extern void func_8001CC3C(S800D21C4 *arg0, s32 arg1, s32 arg2, s32 arg3);
|
||||
@@ -1313,15 +1265,6 @@ void *func_800D2294(s32 arg0, s32 arg1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 f0;
|
||||
/* 0x04 */ s32 f4;
|
||||
/* 0x08 */ s32 f8;
|
||||
/* 0x0C */ s32 fC;
|
||||
/* 0x10 */ s32 f10;
|
||||
/* 0x14 */ s32 f14;
|
||||
/* 0x18 */ s32 f18;
|
||||
} S800D22E4;
|
||||
|
||||
void func_800D22E4(S800D22E4 *p) {
|
||||
p->f4 += p->f10;
|
||||
@@ -1456,15 +1399,8 @@ void func_800D2624(void) {
|
||||
func_8002D4C8(0x15, 0);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
u32 *ot; /* 0x00 */
|
||||
u32 pad[4]; /* 0x04..0x13 */
|
||||
} Env_800D2650; /* 0x14 stride */
|
||||
/* 0x14 stride */
|
||||
|
||||
typedef struct {
|
||||
u32 addr : 24; /* 0x00 tag */
|
||||
u32 len : 8;
|
||||
} PTag_800D2650;
|
||||
|
||||
#define OT_800D2650 (D_800AE7BC[*(volatile u16 *)&D_800B9A02].ot)
|
||||
#define getaddr_800D2650(t) (((PTag_800D2650 *)(t))->addr)
|
||||
@@ -1611,15 +1547,8 @@ u32 *func_800D2650(u32 *param_1, u8 *param_2, short param_3, short param_4, int
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
u32 addr : 24; /* 0x00 tag */
|
||||
u32 len : 8;
|
||||
} PTag_800D27DC;
|
||||
|
||||
typedef struct {
|
||||
u32 *ot; /* 0x00 */
|
||||
u32 pad[4]; /* 0x04..0x13 */
|
||||
} Env_800D27DC; /* 0x14 stride */
|
||||
/* 0x14 stride */
|
||||
|
||||
#define OT_800D27DC (D_800AE7BC[*(volatile u16 *)&D_800B9A02].ot)
|
||||
#define getaddr_800D27DC(t) (((PTag_800D27DC *)(t))->addr)
|
||||
@@ -1742,21 +1671,8 @@ u8 *func_800D27DC(u32 flags, u8 *out, u16 *src, s16 count, u16 add)
|
||||
* groups to the same hard reg).
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
u32 addr : 24; /* 0x00 tag */
|
||||
u32 len : 8;
|
||||
} PTag_800D29F8;
|
||||
|
||||
typedef struct {
|
||||
u32 c0; /* 0x04 r0,g0,b0,code */
|
||||
s16 x0, y0; /* 0x08 */
|
||||
u32 c1; /* 0x0C */
|
||||
s16 x1, y1; /* 0x10 */
|
||||
u32 c2; /* 0x14 */
|
||||
s16 x2, y2; /* 0x18 */
|
||||
u32 c3; /* 0x1C */
|
||||
s16 x3, y3; /* 0x20 */
|
||||
} PolyG4_800D29F8; /* 0x24 = tag + 8 words */
|
||||
/* 0x24 = tag + 8 words */
|
||||
|
||||
/* 0x14 stride */
|
||||
|
||||
@@ -1955,12 +1871,6 @@ s32 func_800D2DFC(void) {
|
||||
extern void func_800D3348(u8 *arg0);
|
||||
extern void func_8016EDEC(); // K&R: 2 of 3 args (P37 rung D t4_D58)
|
||||
|
||||
typedef struct {
|
||||
u8 pad15[0x15];
|
||||
u8 field_0x15; /* 0x15 */
|
||||
u8 pad16[0x3];
|
||||
u8 field_0x19; /* 0x19 */
|
||||
} Struct800D2E20;
|
||||
|
||||
s32 func_800D2E20(Struct800D2E20 *a0) {
|
||||
func_8016EDEC(func_800D3348, 0x1000000);
|
||||
@@ -1985,12 +1895,6 @@ extern void func_8001BFD0(void);
|
||||
extern void func_800D0C48(u16 arg0);
|
||||
extern void func_800167B8(s32 arg0);
|
||||
|
||||
typedef struct {
|
||||
u8 pad00[0x15]; /* 0x00..0x14 */
|
||||
u8 field_0x15; /* 0x15 */
|
||||
u8 pad16[0x3]; /* 0x16..0x18 */
|
||||
u8 field_0x19; /* 0x19 */
|
||||
} Struct800D2E6C;
|
||||
|
||||
s32 func_800D2E6C(Struct800D2E6C *arg0) {
|
||||
u8 v = arg0->field_0x19;
|
||||
@@ -2069,12 +1973,6 @@ void func_800D2FB0(u8 *arg0) {
|
||||
// args. Declaring it (void) and keeping arg0 live in a local emits the exact `addu s0,a0,$0`.
|
||||
extern void func_800D33E0(void);
|
||||
|
||||
typedef struct {
|
||||
u8 pad00[0x15];
|
||||
u8 field_0x15; /* 0x15 */
|
||||
u8 pad16[0x12];
|
||||
s32 field_0x28; /* 0x28 */
|
||||
} Struct800D2FEC;
|
||||
|
||||
s32 func_800D2FEC(Struct800D2FEC *a0) {
|
||||
func_800D33E0();
|
||||
@@ -2109,12 +2007,6 @@ extern void func_8001BFD0(void);
|
||||
extern void func_800D0C48(u16 arg0);
|
||||
extern void func_800D1E28(void);
|
||||
|
||||
typedef struct {
|
||||
u8 pad00[0x15];
|
||||
u8 field_0x15; /* 0x15 */
|
||||
u8 pad16[0x12];
|
||||
s32 field_0x28; /* 0x28 */
|
||||
} Obj800D302C;
|
||||
|
||||
s32 func_800D302C(Obj800D302C *arg0) {
|
||||
s32 v;
|
||||
@@ -2152,12 +2044,6 @@ void func_800D30C8(void *arg0) {
|
||||
* sb v0, 0x15(a0) -> store back at +0x15
|
||||
* return 0
|
||||
*/
|
||||
typedef struct {
|
||||
u8 pad15[0x15];
|
||||
u8 field_0x15;
|
||||
u8 pad16[0x3];
|
||||
u8 field_0x19;
|
||||
} Struct800D3104;
|
||||
|
||||
s32 func_800D3104(Struct800D3104 *a0) {
|
||||
u8 v = a0->field_0x15;
|
||||
@@ -2190,12 +2076,6 @@ extern void func_8001BFD0(void);
|
||||
extern void func_800D0C48(u16 arg0);
|
||||
extern void func_800167B8(s32 arg0);
|
||||
|
||||
typedef struct {
|
||||
u8 pad00[0x15]; /* 0x00..0x14 */
|
||||
u8 field_0x15; /* 0x15 */
|
||||
u8 pad16[0x3]; /* 0x16..0x18 */
|
||||
u8 field_0x19; /* 0x19 */
|
||||
} Struct800D3120;
|
||||
|
||||
s32 func_800D3120(Struct800D3120 *arg0) {
|
||||
u8 v = arg0->field_0x19;
|
||||
|
||||
Reference in New Issue
Block a user