MSDOS: implement inverse text attribute

This commit is contained in:
Pasi Kallinen
2023-10-24 18:34:15 +03:00
parent 76471e890b
commit 614e6c9d5e
4 changed files with 31 additions and 8 deletions
+7
View File
@@ -138,6 +138,7 @@ extern boolean clipping; /* clipping on? from wintty.c */
extern int savevmode; /* store the original video mode */
extern int curcol, currow; /* current column and row */
extern int g_attribute;
extern int inversed;
extern int attrib_text_normal; /* text mode normal attribute */
extern int attrib_gr_normal; /* graphics mode normal attribute */
extern int attrib_text_intense; /* text mode intense attribute */
@@ -965,6 +966,12 @@ vga_WriteChar(uint32 chr, int col, int row, int colour)
else
bgcolor = BACKGROUND_VGA_COLOR;
if (inversed) {
int tmpc = actual_colour;
actual_colour = bgcolor;
bgcolor = tmpc;
}
x = min(col, (CO - 1)); /* min() used protection from callers */
pixy = min(row, (LI - 1)) * 16; /* assumes 8 x 16 char set */
vplane = ~actual_colour & ~bgcolor & 0xF;