diff --git a/restoration/source410/BT/MECH-LAYOUT.md b/restoration/source410/BT/MECH-LAYOUT.md index c453663c..45abf970 100644 --- a/restoration/source410/BT/MECH-LAYOUT.md +++ b/restoration/source410/BT/MECH-LAYOUT.md @@ -64,3 +64,57 @@ binary alloc size is WRONG and must be fixed before use. 2. Untangle the three offset CONFLICTs above (decomp reads). 3. Write the first staged MECH.HPP (interface + mapped runs + reserved[] filler) and compile-verify sizeof(Mech)==0x854 with the probe. + +--- + +## ADDENDUM 2026-07-19 (later) — spawn factory reached the Mech ctor; proxy layer resolved + +The boot ladder now runs the full spawn factory (CreatePlayerVehicle -> Mech::MakeMessage -> +MakeAndLinkViewpointEntity -> registry -> Mech::Make -> `new Mech` -> JointedMover base +streams the model) and halts at the Mech ctor. So the ctor is the live frontier and this +worksheet is the active blocker. + +### Proxy layer resolved (BT411 mechrecon.hpp -> real 1995 types) + +Settles the open item in the "Real 1995 types" bullet above: + +| BT411 alias | real type | in 4.10 archive? | +|---|---|---| +| ReconAlarm (AlarmIndicator) | AlarmIndicator (multi-level, N levels sets size) | ❌ MISSING | +| ReconSeq | SequenceController (animation sequence) | ❌ MISSING | +| ReconFiltered / FilteredScalar | AverageOf (15-sample running avg) | ❌ MISSING | +| ReconFiltered (mechNameFilter) | NameFilter | ❌ MISSING | +| ReconChain | ChainOf | ✅ CHAIN.HPP | +| ReconMatrix / Matrix34 | AffineMatrix / Matrix | ✅ | +| StateIndicator | StateIndicator | ✅ STATE.HPP | +| Reticle | Reticle | ✅ RETICLE.HPP | +| BTVal (turretBase, mechName, torsoAim*, aimRate, headPitch, torsoTwist) | animated value/quaternion — **UNIDENTIFIED**; BT411 BTVal is a no-op placeholder. Most BTVal members are < 0x328 = BASE-class pose fields (re-attribute per §"Consequences"), so their type is a base concern, not Mech's. | + +### CRITICAL new finding — embedded helper classes are ALSO missing + +`AlarmIndicator`, `SequenceController`, `NameFilter`, `AverageOf` do **not** exist anywhere in +the 4.10 CODE archive (confirmed by full-tree grep). They are additional helper classes the +milestone must reconstruct, and their sizes set the embedded-member offsets — so the +`masterAlarm@0x39C`/`heatAlarm@0x450`/`stabilityAlarm@0x4C4`/`statusAlarm@0x714` spacing +DERIVES the AlarmIndicator per-level size (e.g. masterAlarm 33 levels spans 0x39C..0x450 = +0xB4; heatAlarm 3 levels spans 0x450..0x4C4 = 0x74 — a fixed header + N-level array; solve +the two equations for header size + per-level stride). Same method sizes AverageOf from +telemetryFilter[5]@0x7E0..0x81C (0x3C/5 = 0xC each) and SequenceController from the +legAnimation/bodyAnimation spacing. + +### Subsystem roster source availability (VDATA 0xBxx ClassIDs) + +- Full .CPP/.HPP in 4.10: **GAUSS, PPC, SENSOR** +- .TCP partial survivors (authoritative where present): **AMMOBIN, EMITTER, GNRATOR, HEAT, + MISSILE, PROJTILE, PROJWEAP** +- Decomp-only (BT411): MechSubsystem base, gyro, torso, hud, myomers, mechweap, mislanch, + powersub, + the rest of the "917 missing functions". + +### Revised reconstruction order + +1. **Helper classes** (block the layout): AlarmIndicator, SequenceController, NameFilter, + AverageOf — sizes solved from the offset-spacing equations above; identify BTVal. +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. +5. Per-frame path (mech2/3/4) + damage/weapon handlers.