ascii is now in color

develop
Myk Taylor 2022-12-20 16:33:11 -08:00
parent 0766d85759
commit 663e1dd541
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 18 additions and 6 deletions

@ -687,9 +687,9 @@ GREY_FRAME = {
-- The usual boundary used by the DF screens. Often has fancy pattern in tilesets.
BOUNDARY_FRAME = {
frame_pen = to_pen{ ch = 0xDB, fg = COLOR_DARKGREY, bg = COLOR_BLACK },
frame_pen = to_pen{ ch = 0xDB, fg = COLOR_GREY, bg = COLOR_BLACK },
title_pen = to_pen{ fg = COLOR_BLACK, bg = COLOR_GREY },
signature_pen = to_pen{ fg = COLOR_BLACK, bg = COLOR_DARKGREY },
signature_pen = to_pen{ fg = COLOR_BLACK, bg = COLOR_GREY },
}
GREY_LINE_FRAME = {
@ -701,7 +701,7 @@ GREY_LINE_FRAME = {
rt_frame_pen = to_pen{ ch = 187, fg = COLOR_GREY, bg = COLOR_BLACK },
rb_frame_pen = to_pen{ ch = 188, fg = COLOR_GREY, bg = COLOR_BLACK },
title_pen = to_pen{ fg = COLOR_BLACK, bg = COLOR_GREY },
signature_pen = to_pen{ fg = COLOR_DARKGREY, bg = COLOR_BLACK },
signature_pen = to_pen{ fg = COLOR_GREY, bg = COLOR_BLACK },
}
function paint_frame(dc,rect,style,title)

@ -116,9 +116,21 @@ static bool doSetTile_default(const Pen &pen, int x, int y, bool map)
// TODO: understand how this changes for v50
int index = ((x * gps->dimy) + y);
gps->screen1_opt_tile[index] = uint8_t(pen.ch);
// we need a new way to represent color
//auto argb = &gps->screen1_asciirgb[index * 8];
if (!map) {
// don't let anything draw over us
gps->screen1_forced_tile[index] = 0;
}
gps->screen1_opt_tile[index] = uint8_t(pen.tile);
auto fg = &gps->palette[pen.fg][0];
auto bg = &gps->palette[pen.bg][0];
auto argb = &gps->screen1_asciirgb[index * 8];
argb[0] = uint8_t(pen.ch);
argb[1] = fg[0];
argb[2] = fg[1];
argb[3] = fg[2];
argb[4] = bg[0];
argb[5] = bg[1];
argb[6] = bg[2];
/* old code
// auto screen = gps->screen + index*4;
// screen[0] = uint8_t(pen.ch);