textplay: better colorization

pull/1597/head
nick black 3 years ago committed by Nick Black
parent 2695addd5f
commit 2978a5194d

@ -3,7 +3,7 @@
static const uint32_t LOWCOLOR = 0x004080;
static const uint32_t HICOLOR = 0x00ff80;
static const uint32_t NANOSEC = 1000000000ull / 600; // 600 cps
static const uint32_t NANOSEC = 1000000000ull / 60; // 60 cps
#define MARGIN 4
static struct notcurses*
@ -31,6 +31,11 @@ colorize(struct ncplane* n){
if(egc == NULL){
return -1;
}
if(strcmp(egc, "") == 0){
free(egc);
--x;
continue;
}
ncplane_set_fg_rgb(n, c);
if(ncplane_putegc_yx(n, y, x, egc, NULL) < 0){
free(egc);

Loading…
Cancel
Save