//redefine ncurses mvaddch void mvwaddch (winder *pane, int y, int x, fig c) { //char *outc = &c.chr; char outs[2]; int chr_mode; int maxy, maxx; outs[0] = c.chr; getmaxyx(pane, &maxy, &maxx); if (x<0 || x>=maxx || y<0 || y>=maxy) return; pane->coords[y][x] = c; x++; y++; if (pane->write_to_screen == true) { //use rockbox write rb->lcd_set_foreground(COLOR_WHITE); rb->lcd_set_background(COLOR_BLACK); chr_mode = STYLE_DEFAULT; switch (c.attrib) { case A_NORMAL: break; case A_ROB: rb->lcd_set_foreground(COLOR_RED); break; case A_YOB: rb->lcd_set_foreground(COLOR_YELLOW); break; case A_WOB_I: chr_mode = STYLE_INVERT; break; case A_GOB_I: rb->lcd_set_foreground(COLOR_DARKGRAY); chr_mode = STYLE_INVERT; break; case A_WOBL: rb->lcd_set_background(COLOR_BLUE); break; case A_WOBL_I: rb->lcd_set_background(COLOR_BLUE); chr_mode = STYLE_INVERT; break; } //rb->lcd_puts_style(x + pane->offx, y + pane->offy, &c.chr, chr_mode); rb->lcd_putsxy((x + pane->offx)*6, (y + pane->offy)*8, outs); } }