ENHANCED_SYMBOLS: store all CLR_ colors specially
The 0x1000000 bit (NH_BASIC_COLOR bit) was used to mark CLR_BLACK when storing it in u->ucolor. Now, all of the basic CLR_* colors are stored that way. The NH_BASIC_COLOR bit indicates that the value in u->ucolor is not an rgb value, rather it is one of the 0-15 basic NetHack colors. The window-ports need to strip the NH_BASIC_COLOR bit off before using it for color changes.
This commit is contained in:
+7
-3
@@ -3844,9 +3844,13 @@ tty_print_glyph(
|
||||
&& !calling_from_update_inventory
|
||||
#endif
|
||||
&& glyphinfo->gm.u && glyphinfo->gm.u->ucolor) {
|
||||
term_start_24bitcolor(glyphinfo->gm.u);
|
||||
color24bit_on = TRUE;
|
||||
colordone = TRUE;
|
||||
if ((glyphinfo->gm.u->ucolor & NH_BASIC_COLOR) == 0) {
|
||||
term_start_24bitcolor(glyphinfo->gm.u);
|
||||
color24bit_on = TRUE;
|
||||
colordone = TRUE;
|
||||
} else {
|
||||
color = glyphinfo->gm.u->ucolor & ~NH_BASIC_COLOR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!colordone) {
|
||||
|
||||
Reference in New Issue
Block a user