mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-04 00:20:10 -04:00
T5.1.c3b: redo fold batch 2 without SDK canon (tier-1 no longer picks SDK names); pad_names 0
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
# The struct map — the types the fleet's cast sites need (Phase 37 T1)
|
||||
|
||||
> **Generated by `tools/type_census.py` at `d71d4c179` (2026-09-30T18:37:30Z); never typed (R75).** Every raw pointer-cast dereference in `src/` was assigned to a base (a parameter, a local, a global by value or by address, an absolute address) and the bases were clustered by EVIDENCE only — the same global symbol, an argument passed to a callee's parameter, an assignment or return, a pointer field read, a shared body's fleet-wide identity — never by a similar offset signature. Each cluster is one type the tree needs. Names are placeholders (`Unkstruct_<addr>`: the lowest global instance's address, else the lowest member function's); fields are placeholders (`unk<HEX>`) until Phase 38 cites evidence.
|
||||
> **Generated by `tools/type_census.py` at `f9d3c125c` (2026-09-30T18:52:38Z); never typed (R75).** Every raw pointer-cast dereference in `src/` was assigned to a base (a parameter, a local, a global by value or by address, an absolute address) and the bases were clustered by EVIDENCE only — the same global symbol, an argument passed to a callee's parameter, an assignment or return, a pointer field read, a shared body's fleet-wide identity — never by a similar offset signature. Each cluster is one type the tree needs. Names are placeholders (`Unkstruct_<addr>`: the lowest global instance's address, else the lowest member function's); fields are placeholders (`unk<HEX>`) until Phase 38 cites evidence.
|
||||
|
||||
**19124 types explain 498868 of 502986 dereference sites (99.2 %); 4118 sites have a base the census could not classify; 857 types carry a width conflict.** Merges by evidence: param 38876, assign 16786, arg 10825, field 9909, ret-of 4330, return 1524, assign& 1184, arg& 270.
|
||||
|
||||
|
||||
@@ -1835,15 +1835,15 @@ typedef struct { /* 0x24 */
|
||||
typedef struct {
|
||||
u32 tag;
|
||||
u8 r0, g0, b0, code;
|
||||
short x0, y0;
|
||||
u8 r1, g1, b1, pad1;
|
||||
short x1, y1;
|
||||
u8 r2, g2, b2, pad2;
|
||||
short x2, y2;
|
||||
u8 r3, g3, b3, pad3;
|
||||
short x3, y3;
|
||||
} POLY_G4;
|
||||
typedef POLY_G4 G4_80017778;
|
||||
s16 x0, y0;
|
||||
u8 r1, g1, b1, p1;
|
||||
s16 x1, y1;
|
||||
u8 r2, g2, b2, p2;
|
||||
s16 x2, y2;
|
||||
u8 r3, g3, b3, p3;
|
||||
s16 x3, y3;
|
||||
} PG4_8017FD50;
|
||||
typedef PG4_8017FD50 G4_80017778;
|
||||
typedef struct {
|
||||
u8 addr0, addr1, addr2, len;
|
||||
u32 code0;
|
||||
|
||||
+21
-23
@@ -4376,22 +4376,21 @@ typedef struct {
|
||||
u16 f5C;
|
||||
} F5C_S;
|
||||
typedef struct {
|
||||
u32 tag;
|
||||
u8 r0, g0, b0, code;
|
||||
short x0, y0;
|
||||
u8 u0, v0;
|
||||
u16 clut;
|
||||
short x1, y1;
|
||||
u8 u1, v1;
|
||||
u16 tpage;
|
||||
short x2, y2;
|
||||
u8 u2, v2;
|
||||
u16 pad1;
|
||||
short x3, y3;
|
||||
u8 u3, v3;
|
||||
u16 pad2;
|
||||
} POLY_FT4;
|
||||
typedef POLY_FT4 FT4_801857A4;
|
||||
/* 0x00 */ u32 tag;
|
||||
/* 0x04 */ u8 r0, g0, b0, code;
|
||||
/* 0x08 */ s16 x0, y0;
|
||||
/* 0x0C */ u8 u0, v0;
|
||||
/* 0x0E */ u16 clut;
|
||||
/* 0x10 */ s16 x1, y1;
|
||||
/* 0x14 */ u8 u1, v1;
|
||||
/* 0x16 */ u16 tpage;
|
||||
/* 0x18 */ s16 x2, y2;
|
||||
/* 0x1C */ u8 u2, v2;
|
||||
/* 0x1E */ u16 pad_1E;
|
||||
/* 0x20 */ s16 x3, y3;
|
||||
/* 0x24 */ u8 u3, v3;
|
||||
/* 0x26 */ u16 pad_26;
|
||||
} FT4_801857A4;
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 f0;
|
||||
/* 0x02 */ s16 f2; /* OT depth */
|
||||
@@ -4406,8 +4405,8 @@ typedef struct { s16 v; } Flag_S40_8018B238_80187EA0;
|
||||
typedef struct { s16 v; } Flag_S40_8018B238_80188478;
|
||||
typedef struct { s16 v; } Flag_S40_8018B238_80188778;
|
||||
typedef void (*Fn8017ECC4)(void);
|
||||
typedef POLY_FT4 Ft4_80183DA4;
|
||||
typedef POLY_FT4 Ft4_80184138;
|
||||
typedef FT4_801857A4 Ft4_80183DA4;
|
||||
typedef FT4_801857A4 Ft4_80184138;
|
||||
typedef struct {
|
||||
s32 unk0; /* 0x00 */
|
||||
s16 unk4; /* 0x04 */
|
||||
@@ -4810,7 +4809,6 @@ typedef struct {
|
||||
u16 x2, y2; u32 uv2;
|
||||
u16 x3, y3; u32 uv3;
|
||||
} PFT4_FD64;
|
||||
typedef POLY_G4 PG4_8017FD50;
|
||||
typedef struct {
|
||||
u8 t0, t1, t2, len; /* 0x00 P_TAG */
|
||||
u8 r0, g0, b0, code; /* 0x04 */
|
||||
@@ -6893,10 +6891,10 @@ typedef struct {
|
||||
u32 c3; /* 0x1C */
|
||||
u16 x3, y3; /* 0x20, 0x22 */
|
||||
} PG4_80189340;
|
||||
typedef POLY_G4 PG4_8018C960;
|
||||
typedef POLY_G4 PG4_8018C960_801895C8;
|
||||
typedef POLY_G4 PG4_8018C960_80189BA0;
|
||||
typedef POLY_G4 PG4_8018C960_80189EA0;
|
||||
typedef PG4_8017FD50 PG4_8018C960;
|
||||
typedef PG4_8017FD50 PG4_8018C960_801895C8;
|
||||
typedef PG4_8017FD50 PG4_8018C960_80189BA0;
|
||||
typedef PG4_8017FD50 PG4_8018C960_80189EA0;
|
||||
typedef struct { u8 pad0[3]; u8 len; u8 pad_4[3]; u8 code; } PHdr_80189340;
|
||||
typedef PrimTag PTag_8017DD28;
|
||||
typedef PrimTag PTag_8018C960;
|
||||
|
||||
+1
-1
@@ -1067,7 +1067,7 @@ def fold_plan(tsv, only, exclude, want_tier1, want_sdk):
|
||||
continue
|
||||
lh = lh_all.pop()
|
||||
# SDK: the layout's SDK struct whose member names one of the class's defs carries (or whose name is in the class)
|
||||
cands = [(sn, sm, sd) for sn, sm, sd in sdk.get(lh, []) if sn in c["names"] or any(_sdk_ev(d, sm) for d in ds)]
|
||||
cands = [(sn, sm, sd) for sn, sm, sd in sdk.get(lh, []) if want_sdk and (sn in c["names"] or any(_sdk_ev(d, sm) for d in ds))]
|
||||
canon_text, sdk_name = None, None
|
||||
if len({sn for sn, _m, _d in cands}) == 1 and cands[0][0] in by_name and not any(cands[0][0] in d["names"] for d in ds):
|
||||
refused.append((c["lhash"] + " (note)", f"SDK {cands[0][0]} is defined with another layout: folded under a non-SDK name"))
|
||||
|
||||
Reference in New Issue
Block a user