|
|
@@ -35,11 +35,13 @@ static void worm(WINDOW *win, int x, int y, char c0, char repl)
|
|
|
mvwaddch(win, y + 1, x + 1, c0);
|
|
|
wattroff(win, A_REVERSE);
|
|
|
if (ac != '*') {
|
|
|
+ int colnum = 4;
|
|
|
+
|
|
|
if (ac != '.')
|
|
|
- wattron(win, COLOR_PAIR(1));
|
|
|
+ colnum = 1;
|
|
|
+ wattron(win, COLOR_PAIR(colnum));
|
|
|
mvwaddch(win, ay, ax, ac);
|
|
|
- if (ac != ' ')
|
|
|
- wattroff(win, COLOR_PAIR(1));
|
|
|
+ wattroff(win, COLOR_PAIR(colnum));
|
|
|
}
|
|
|
wrefresh(win);
|
|
|
ax = x + 1;
|
|
|
@@ -236,9 +238,10 @@ int main(int argc, char *argv[])
|
|
|
wrefresh(winR);
|
|
|
|
|
|
start_color();
|
|
|
- init_pair(1, COLOR_RED, COLOR_BLACK);
|
|
|
+ init_pair(1, COLOR_RED, COLOR_GREEN);
|
|
|
init_pair(2, COLOR_BLACK, COLOR_MAGENTA);
|
|
|
init_pair(3, COLOR_BLUE, COLOR_BLUE);
|
|
|
+ init_pair(4, COLOR_YELLOW, COLOR_GREEN);
|
|
|
print_it(a);
|
|
|
r = get_it(&a);
|
|
|
dallocx(r, 0);
|