Mech milestone: reconstruct NameFilter (helper 3/3) -- helpers phase complete
NameFilter is the Mech's mechNameFilter (@0x36c), a small fixed debounce record the ctor initialises. Reconstructed from FUN_00435a7c: a 10-word (0x28) struct, Initialize() sets [2]=1 / [8]=[9]=-1 / rest 0 exactly. Header-only. Field semantics unresolved (only caller is Initialize; reader is the unbuilt HUD) -- names best-effort, but size + init values are binary-exact, which is all the Mech layout + ctor need. All 3 missing embedded helper classes now reconstructed + compile-verified under BC4.52 (AlarmIndicator, SequenceController struct+Init, NameFilter). MECH-LAYOUT.md step 1 marked done. Next: MechSubsystem base + the subsystem roster, then finalize MECH.HPP (probe sizeof==0x854), then the ctor + segment-table walk. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,8 +115,12 @@ legAnimation/bodyAnimation spacing.
|
||||
|
||||
### Revised reconstruction order
|
||||
|
||||
1. **Helper classes** (block the layout): AlarmIndicator, SequenceController, NameFilter
|
||||
(AverageOf survives) — from BT411 decomp; identify BTVal (mostly base-class pose fields).
|
||||
1. ~~**Helper classes** (block the layout): AlarmIndicator, SequenceController, NameFilter~~
|
||||
**DONE 2026-07-19** — all 3 reconstructed + compile-verified under BC4.52:
|
||||
MUNGA/ALARM.HPP (AlarmIndicator = StateIndicator subclass, header-only),
|
||||
BT/SEQCTL.HPP+CPP (SequenceController struct + Init real; gait methods staged),
|
||||
BT/NAMEFILT.HPP (NameFilter struct + Initialize, header-only). AverageOf survives.
|
||||
BTVal is mostly base-class pose fields (re-attribute during layout, not Mech's).
|
||||
2. **MechSubsystem base + roster** (GAUSS/PPC/SENSOR + .TCP partials + decomp).
|
||||
3. **Finalize MECH.HPP** per the offset map; probe sizeof(Mech)==0x854.
|
||||
4. **Mech ctor** (@004a1674): embedded construction + segment-table walk.
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
#if !defined(NAMEFILT_HPP)
|
||||
# define NAMEFILT_HPP
|
||||
|
||||
//##########################################################################
|
||||
//########################### NameFilter #############################
|
||||
//##########################################################################
|
||||
//
|
||||
// The Mech's `mechNameFilter` (@0x36c). A small fixed debounce/hysteresis
|
||||
// record; the Mech ctor Initialize()s it and the (not-yet-reconstructed) HUD
|
||||
// path reads it. Absent from the 4.10 archive; BT411 mis-proxied it as a
|
||||
// no-op running-average. See NAMEFILT.NOTES.md.
|
||||
//
|
||||
// Layout + Initialize() values are recovered exactly from the shipped binary
|
||||
// (FUN_00435a7c); the field SEMANTICS are not yet resolved (the only caller
|
||||
// in the mech family is Initialize()), so the members carry their known
|
||||
// init values with best-effort names.
|
||||
//
|
||||
class NameFilter
|
||||
{
|
||||
public:
|
||||
void
|
||||
Initialize()
|
||||
{
|
||||
value0 = 0; // [0]
|
||||
value1 = 0; // [1]
|
||||
count = 1; // [2]
|
||||
sample0 = 0; // [3]
|
||||
sample1 = 0; // [4]
|
||||
sample2 = 0; // [5]
|
||||
sample3 = 0; // [6]
|
||||
sample4 = 0; // [7]
|
||||
candidateID = -1; // [8] (invalid id)
|
||||
confirmedID = -1; // [9] (invalid id)
|
||||
}
|
||||
|
||||
public:
|
||||
int value0;
|
||||
int value1;
|
||||
int count;
|
||||
int sample0;
|
||||
int sample1;
|
||||
int sample2;
|
||||
int sample3;
|
||||
int sample4;
|
||||
int candidateID;
|
||||
int confirmedID;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
# NAMEFILT.HPP — reconstruction notes
|
||||
|
||||
**Status: struct + Initialize RECONSTRUCTED (compile-verified). Helper 3/3 of the
|
||||
Mech embedded helpers ([[MECH-LAYOUT]] step 1) — helpers phase COMPLETE.**
|
||||
|
||||
`NameFilter` — the Mech's `mechNameFilter` (@0x36c). A small fixed-size
|
||||
debounce/hysteresis record the Mech ctor initialises. Absent from the 4.10
|
||||
archive; BT411 mis-proxied it as a no-op running-average (`ReconFiltered`).
|
||||
|
||||
## Evidence
|
||||
|
||||
`Initialize()` decomp `FUN_00435a7c` (BT411 reference/decomp part_004.c) sets a
|
||||
10-word (0x28 byte) object: `[2]=1`, `[8]=[9]=0xffffffff` (invalid ids), all
|
||||
other words 0. No allocation — a fixed inline struct (NOT AverageOf, which owns a
|
||||
heap array). Reconstructed to reproduce those writes exactly.
|
||||
|
||||
## Known vs unknown
|
||||
|
||||
- **Known (from the binary):** the layout size (0x28) and the exact Initialize()
|
||||
values.
|
||||
- **Unknown:** the field SEMANTICS. The only caller in the reconstructed mech
|
||||
family is `Initialize()` (ctor); the reader is presumably the HUD subsystem
|
||||
(not yet reconstructed). Member names (value0/1, count, sample0..4,
|
||||
candidateID, confirmedID) are best-effort from the init pattern (count=1, two
|
||||
−1 ids) and will be refined when the HUD reader is reconstructed. Semantics do
|
||||
not affect the build — only the size + init values matter for the Mech layout
|
||||
and ctor.
|
||||
|
||||
## Placement
|
||||
|
||||
1995 filename/location unknown (decomp-only). Filed as BT/NAMEFILT.HPP,
|
||||
header-only (Initialize inlined — functionally identical to the out-of-line
|
||||
binary; no new .cpp / lib member needed).
|
||||
Reference in New Issue
Block a user