Two files supplied. One was a direct drop-in, the other was not.
battlemaster_print.bmp -> hsh/Mechs/battlemaster.bmp, copied byte for byte.
recscore.cpp:2959 builds hsh\mechs\<name>.bmp and loads it with Win32
LoadImage, then StretchBlts it onto the printed score sheet, so GDI resolves
the palette and any palette layout works. The existing portrait was itself a
254-entry non-identity palette, confirming this path does not care.
battlemaster_radar.bmp -> hsh/radar/hud/battlemaster.bmp, CONVERTED first.
This one could not be dropped in as supplied. render.cpp:1653
LoadRadarDamageTexture -> CreateATextureFromFile -> CreateATextureFromBitmap
reads the raw palette INDEX and uses it directly as both intensity and alpha:
wA = data[x];
WORD wBit = (WORD)((wA<<8)&0xF000|0x0FFF);
*bits++ = (WORD)((wA>0)?wBit:0);
The palette is never looked up, so these dolls must carry an identity
greyscale palette where index == grey level. Every existing doll in hsh/hud
and hsh/radar/hud is mode L, which satisfies that.
The supplied file had an optimised 131-entry palette that is close to inverted
against index order: index 1 is pure white, but the engine would have read it
as level 1 -- near black with alpha nibble 0, i.e. invisible. Peak brightness
would have rendered at 129/255 with alpha capped at 8 of 15. It would have
looked broken, not subtly wrong.
Converted to mode L, which resolves each index through the palette. Verified
the converted pixels are identical to the supplied artwork, the palette is now
identity, and the header matches the other dolls (512x512, 8bpp, 1078).
Co-authored-by: Claude Opus 5 (Anthropic) <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <copilot@github.com>