Combine three arguments of curses_putch into one

It will need another parameter for 256-colour support. To avoid having
too many arguments, put glyph colour, background colour and attributes
into a struct and, since to curses library all of that is attributes
that are handled by same function, call the struct "gryph attributes".

curses_putch was also declared in two different headers, remove one of
those declarations.
This commit is contained in:
Doktor L
2026-06-19 16:36:27 +02:00
committed by Patric Mueller
parent 24adb1c592
commit f3d292e111
4 changed files with 26 additions and 30 deletions
+4 -4
View File
@@ -532,7 +532,7 @@ curses_putch(winid wid, int x, int y, int ch,
#ifdef ENHANCED_SYMBOLS
struct unicode_representation *unicode_representation,
#endif
int color, int framecolor, int attr)
const struct glyph_attributes *attr)
{
static boolean map_initted = FALSE;
int sx, sy, ex, ey;
@@ -554,9 +554,9 @@ curses_putch(winid wid, int x, int y, int ch,
--x; /* map column [0] is not used; draw column [1] in first screen col */
map[y][x].ch = ch;
map[y][x].color = color;
map[y][x].framecolor = framecolor;
map[y][x].attr = attr;
map[y][x].color = attr->color;
map[y][x].framecolor = attr->framecolor;
map[y][x].attr = attr->attribute_flags;
#ifdef ENHANCED_SYMBOLS
map[y][x].unicode_representation = unicode_representation;
#endif