Merge branch 'msdos-colors' of https://github.com/chasonr/NetHack into NetHack-5.0

This commit is contained in:
nhmall
2026-06-07 17:29:42 -04:00
+10 -3
View File
@@ -691,9 +691,16 @@ vesa_xputg(const glyph_info *glyphinfo, const glyph_info *bkglyphinfo UNUSED)
}
#endif
if (vesa_pixel_size > 8 && glyphinfo->gm.customcolor != 0) {
/* FIXME: won't display black (0,0,0) correctly, but the background
is usually black anyway */
attr = glyphinfo->gm.customcolor | 0x80000000;
attr = glyphinfo->gm.customcolor;
if (attr & NH_BASIC_COLOR) {
attr &= 0x0F;
} else {
struct Pixel p;
p.r = (unsigned char)(attr >> 16);
p.g = (unsigned char)(attr >> 8);
p.b = (unsigned char)(attr >> 0);
attr = vesa_MakeColor(p) | 0x80000000;
}
}
row = currow;