Files
firestorm/Gameleap/code
ad49ec708f Fix Rifleman MFD/Radar damage mappings; document the authoring pipelines
Repairs Rifleman's external MFD and Radar paper-doll source rectangles,
removes the dead commented-out Dasher rows, and records the canonical
authoring pipelines that had never been written down.

Requires a Windows VC6 Release/Profile rebuild - DXRasterizer.cpp
includes coord.cpp directly - plus a physical MFD/Radar hardware test.
The Linux workflow validates data and geometry only.

How the mapping was validated
-----------------------------
Ground truth is Mad Cat (ID 40), whose mapping is known-good in game and
user-confirmed. It establishes the invariant:

  texuv2/texuv3 rectangles must bound the component blobs in the runtime
  BMP, and the rule is exact - texuv = blob bounding box with x1,y1 + 1.

offset2/offset3 are on-screen placement and deliberately do NOT align to
the BMP; overlaying them against the art is meaningless.

Scoring each rectangle by IoU against the nearest art blob gives a clean
bimodal split: healthy chassis 0.78-0.99 (the single sub-0.5 zone is
normally HD, which has no blob of its own), broken chassis below 0.5.

Rifleman
--------
Its texuv2 row was a verbatim copy of Mad Cat's, so CT landed in empty
space, S1/S2 enclosed nothing and the legs hung off the art. Its texuv3
row was independently misaligned.

  MFD    0.14  -> 0.86
  Radar  0.25  -> 0.87
  (Mad Cat control, unchanged: 0.88)

Zone labels were confirmed by eye, not inferred - an automatic classifier
trained on the 42 healthy chassis reproduces only ~70% of labels, because
zone placement is conventional but not guaranteed. HD is the small 3-bar
element under the centre torso, recovered by merging three sub-300px
fragments that the blob threshold had discarded.

Note the Radar layout is NOT a mirror of the MFD one: the legs move up
into the middle row and the wide S1 slab moves from the top to the
bottom. Radar S2 is now zeroed; the previous {186,10,312,78} had no
corresponding art.

Dasher rows
-----------
Dropped the four commented-out M_Dasher rows from all four arrays. Dasher
is not in the 65-ID roster, and a commented row is an active hazard: any
tool that parses these arrays or texturename[] without stripping comments
first picks it up and shifts every later chassis by one. That exact bug
produced a bogus "id41 madcat" during this work.
(huddamage.cpp still has a commented "hud\\dasher" entry - same hazard,
left for a separate change.)

MFD-RADAR-MAPPINGS.md
---------------------
Adds the project owner's verbatim MFD and Radar authoring pipelines as
the authority, plus the fact that coord.cpp is edited via the GameOS
project's "External Dependencies" folder in the VC6 IDE.

Records the distinction that caused a wrong diagnosis during this work:
Radar expands its canvas to 512 BEFORE the unexploded view is saved, so
Radar coordinates are measured in 512 space, whereas MFD expands to 512
AFTER all coordinates are recorded, so MFD coordinates are in 340 space.
Also MFD separates sections with a 4x4 black line while Radar outlines
with 2x2 white, both rectangles are measured on the unexploded view, and
the exploded view saved in indexed mode is the runtime BMP.

File remains CRLF-only; all four arrays verified at 65 rows x 11 zones.

Co-authored-by: Claude Opus 5 (Anthropic) <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
2026-08-08 16:48:29 -05:00
..