Gitea #44: the reticle TARGET NAME PLATE (PNAME1-8) -- the target's callsign under the crosshair

Reconstructed the last deferred piece of the 1995 reticle, decoded from the
Execute disassembly @004cdcf0 [T1]:
 - selection: target_mech+0x190 (owning BTPlayer) -> player+0x1e0
   (playerBitmapIndex), 1-based into the mesh table at this+0x2e8
 - placement: re-placed every frame the aim moves -- scale 0.12 uniform,
   translate (K*retPos.x, K*retPos.y - 0.08, -1.0), K = 1/2.8 (the x87 long
   double @0x4cee64) -- so the label TRACKS THE AIM POINT, not screen centre
 - visibility: the LOCK attribute (this+0x184, cached +0x188) AND an owning
   player; reticle-off / simple-X also hide it
 - art: the plate quad UV-addresses a shared 128x64 bitslice texmap whose
   texels the pod OVERWROTE each mission with the egg's callsign rasters
   (original source commented out at L4VIDEO.cpp:5682-5710) -- the baked
   'PLAYER n' art in BMAP.BSL is only the shipped fallback.  Material colour
   is a neutral (0.5,0.5,0.5): grey-white, not phosphor green.

Port: same geometry in reticle units (0.224 below the aim point, 0.336x0.084)
drawn as the target's egg callsign texture through the reticle's own MapX/MapY
mapping, so it follows the world view in every layout and BT_SHOT captures it.
New: dpl2d_DrawTexturedRect, BTReticleTargetPlate, BTGetPlayerNameTexture.

Also: kRetCaret corrected 0.02f -> 0.025f (_DAT_004cd7f4 read from the binary;
the old value was a T3 guess, 20% small).

KB: gauges-hud + open-questions corrected (the chain was filed as deferred and
mis-attributed to 'the 3D marker'); TWO PNAME consumers now distinguished (this
plate, and CameraShipHUDRenderable's ranking window which shipped 2026-07-18);
new bgf-format section on the plate atlas.

Rig-verified: 2-node relay, BT_GOTO=enemy -> '[hud] name plate: bmp=2 tex=1'
and 'Boreas' rendered under the crosshair on the locked target.  Solo clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0166KTsC7ADm7VXEi1HF1jNg
This commit is contained in:
arcattack
2026-07-24 18:36:02 -05:00
co-authored by Claude Opus 5
parent b7107b1020
commit 35c750dc7c
7 changed files with 390 additions and 10 deletions
+24
View File
@@ -9936,6 +9936,30 @@ void DPLRenderer::LoadNameBitmaps()
LoadOrdinalBitmaps();
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// BT: the RETICLE TARGET NAME PLATE's texture (the 1995 PNAMEx.bgf plate art).
// The plate meshes are quads UV-mapped onto a shared BITMAP material -- e.g.
// PNAME1.BGF and PNAME2.BGF both reference `bmap:name12_mtl` and differ only in
// their u-half (verified: the two files differ in 4 UV bytes) -- i.e. the plate
// shows the player's CALLSIGN raster, which on our side is exactly this
// per-player 128x32 name texture (4:1, the plate quad's 1.0 x 0.25 aspect).
// These load for EVERY mission from StartImplementation, so a cockpit session
// has them, not just a camera seat. The reticle TU (btl4vid.cpp) carries no
// d3d9 types, so hand the texture back opaquely. index0 is 0-BASED
// (playerBitmapIndex - 1).
//
void *BTGetPlayerNameTexture(int index0)
{
DPLRenderer *renderer =
(l4_application != 0) ? l4_application->GetVideoRenderer() : 0;
if (renderer == 0 || index0 < 0 || index0 >= MAX_PLAYER_NAMES)
{
return 0;
}
return (void *)renderer->GetNameTexture(index0);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void