Merge branch 'msdos-colors' of https://github.com/chasonr/NetHack into NetHack-5.0
This commit is contained in:
+10
-3
@@ -691,9 +691,16 @@ vesa_xputg(const glyph_info *glyphinfo, const glyph_info *bkglyphinfo UNUSED)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (vesa_pixel_size > 8 && glyphinfo->gm.customcolor != 0) {
|
if (vesa_pixel_size > 8 && glyphinfo->gm.customcolor != 0) {
|
||||||
/* FIXME: won't display black (0,0,0) correctly, but the background
|
attr = glyphinfo->gm.customcolor;
|
||||||
is usually black anyway */
|
if (attr & NH_BASIC_COLOR) {
|
||||||
attr = glyphinfo->gm.customcolor | 0x80000000;
|
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;
|
row = currow;
|
||||||
|
|||||||
Reference in New Issue
Block a user