xray: kill obsolete FIXME and static

pull/247/head
nick black 5 years ago
parent 2fbc94e41c
commit 9fdee8f672
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -16,17 +16,17 @@ static const char* leg[] = {
static int static int
perframecb(struct notcurses* nc, struct ncvisual* ncv __attribute__ ((unused)), perframecb(struct notcurses* nc, struct ncvisual* ncv __attribute__ ((unused)),
void* vnewplane){ void* vnewplane){
static struct ncplane* n = NULL;
static int startr = 0x80; static int startr = 0x80;
static int startg = 0xff; static int startg = 0xff;
static int startb = 0x80; static int startb = 0x80;
static int frameno = 0; static int frameno = 0;
int dimx, dimy, y; int dimx, dimy, y;
struct ncplane* n = *(struct ncplane**)vnewplane;
if(n == NULL){ if(n == NULL){
struct ncplane* nstd = notcurses_stdplane(nc); struct ncplane* nstd = notcurses_stdplane(nc);
ncplane_dim_yx(nstd, &dimy, &dimx); ncplane_dim_yx(nstd, &dimy, &dimx);
y = dimy - sizeof(leg) / sizeof(*leg); //y = dimy - sizeof(leg) / sizeof(*leg) - 1;
// FIXME how will this plane be destroyed? y = 0;
n = ncplane_new(nc, sizeof(leg) / sizeof(*leg), dimx, y, 0, NULL); n = ncplane_new(nc, sizeof(leg) / sizeof(*leg), dimx, y, 0, NULL);
if(n == NULL){ if(n == NULL){
return -1; return -1;
@ -69,7 +69,7 @@ perframecb(struct notcurses* nc, struct ncvisual* ncv __attribute__ ((unused)),
if(ncplane_set_fg_rgb(n, r - 0xc * l, g - 0xc * l, b - 0xc * l)){ if(ncplane_set_fg_rgb(n, r - 0xc * l, g - 0xc * l, b - 0xc * l)){
return -1; return -1;
} }
if(ncplane_set_bg_rgb(n, (l + 1) * 0x8, 0x20, (l + 1) * 0x8)){ if(ncplane_set_bg_rgb(n, (l + 1) * 0x2, 0x20, (l + 1) * 0x2)){
return -1; return -1;
} }
if(ncplane_printf_yx(n, l, x, "%*.*s", len, len, leg[l] + stroff) != (int)len){ if(ncplane_printf_yx(n, l, x, "%*.*s", len, len, leg[l] + stroff) != (int)len){

Loading…
Cancel
Save