X-Git-Url: http://git.shiar.nl/netris.git/blobdiff_plain/68f83cbe5b56d04c74ad758cf5d73b2c11d2f775..50f893f330ff111a802bcfd1822ee11ff8a1754e:/curses.c diff --git a/curses.c b/curses.c index b60433e..4571bc2 100644 --- a/curses.c +++ b/curses.c @@ -403,8 +403,7 @@ static void block_draw_2(int y, int x, unsigned char type) else { #ifdef HAVE_NCURSES if (Sets.standout) { - if (haveColor) attrset(COLOR_PAIR(type & 15)); - else attrset(A_REVERSE); + attrset(haveColor ? COLOR_PAIR(type & 15) : A_REVERSE); } #endif switch (Sets.drawstyle) { @@ -419,24 +418,6 @@ static void block_draw_2(int y, int x, unsigned char type) } //horizontal stickiness break; //ascii horizontally grouped case 3: - switch (type & 240) { - case 48: - addstr("||"); break; //middle - case 64: case 80: case 96: - addstr("[="); break; //left end - case 112: - addstr("|="); break; - case 128: case 144: case 160: - addstr("=]"); break; //right end - case 176: - addstr("=|"); break; - case 192: case 208: case 224: - addstr("=="); break; - default: - addstr("[]"); break; //top/bottom/mid - } //neighbours - break; //ascii semi-grouped - case 7: switch (type & 240) { case 16: addch(ACS_ULCORNER); addch(ACS_URCORNER); break;//top end case 32: addch(ACS_LLCORNER); addch(ACS_LRCORNER); break;//bottom end @@ -471,13 +452,11 @@ static void block_draw_1(int y, int x, unsigned char type) if (type == BT_none) addch(' '); else if (type == BT_shadow) addch(':'); else { - if (Sets.standout) { #ifdef HAVE_NCURSES - if (haveColor) - attrset(COLOR_PAIR(type & 15)); - else attrset(A_REVERSE); -#endif + if (Sets.standout) { + attrset(haveColor ? COLOR_PAIR(type & 15) : A_REVERSE); } +#endif if ((type & 192) == 64) addch('['); else if ((type & 192) == 128)