diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-04-25 05:02:43 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-04-25 05:02:43 -0400 |
commit | 39ff5573f152b98755bbafcdc3e015ff015ca61d (patch) | |
tree | a3a0f548498f273ac3d2fdf1ede43cf203aa2fba /src/screen.c | |
parent | a45f04256a5cef95078868bcceb7bc750dcc6094 (diff) | |
download | runes-39ff5573f152b98755bbafcdc3e015ff015ca61d.tar.gz runes-39ff5573f152b98755bbafcdc3e015ff015ca61d.zip |
implement rgb colors
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/screen.c b/src/screen.c index 0f62667..0c8ced5 100644 --- a/src/screen.c +++ b/src/screen.c @@ -251,13 +251,15 @@ void runes_screen_set_fg_color(RunesTerm *t, int idx) scr->attrs.fgcolor.idx = idx; } -void runes_screen_set_fg_color_rgb(RunesTerm *t, int r, int g, int b) +void runes_screen_set_fg_color_rgb( + RunesTerm *t, unsigned char r, unsigned char g, unsigned char b) { - UNUSED(t); - UNUSED(r); - UNUSED(g); - UNUSED(b); - fprintf(stderr, "set_fg_color_rgb nyi\n"); + RunesScreen *scr = &t->scr; + + scr->attrs.fgcolor.type = RUNES_COLOR_RGB; + scr->attrs.fgcolor.r = r; + scr->attrs.fgcolor.g = g; + scr->attrs.fgcolor.b = b; } void runes_screen_reset_fg_color(RunesTerm *t) @@ -275,13 +277,15 @@ void runes_screen_set_bg_color(RunesTerm *t, int idx) scr->attrs.bgcolor.idx = idx; } -void runes_screen_set_bg_color_rgb(RunesTerm *t, int r, int g, int b) +void runes_screen_set_bg_color_rgb( + RunesTerm *t, unsigned char r, unsigned char g, unsigned char b) { - UNUSED(t); - UNUSED(r); - UNUSED(g); - UNUSED(b); - fprintf(stderr, "set_bg_color_rgb nyi\n"); + RunesScreen *scr = &t->scr; + + scr->attrs.bgcolor.type = RUNES_COLOR_RGB; + scr->attrs.bgcolor.r = r; + scr->attrs.bgcolor.g = g; + scr->attrs.bgcolor.b = b; } void runes_screen_reset_bg_color(RunesTerm *t) |