-void cgetline(char *line, int max) {
- if (curses) {
-#ifndef SERGEEV
- wgetnstr(stdscr, line, max);
- wrefresh(stdscr);
-#else /* SERGEEV */
- line[0]=max-1;
- cgets(line);
- memmove(line,&line[2],max-3);
-#endif /* SERGEEV */
- } else {
- fgets(line, max, stdin);
- line[strlen(line)-1] = '\0';
+void textcolor (int color)
+{
+#ifdef A_COLOR
+ if (game.options & OPTION_CURSES) {
+ switch(color) {
+ case DEFAULT:
+ wattrset(curwnd, 0);
+ break;
+ case BLACK:
+ wattron(curwnd, COLOR_PAIR(COLOR_BLACK));
+ break;
+ case BLUE:
+ wattron(curwnd, COLOR_PAIR(COLOR_BLUE));
+ break;
+ case GREEN:
+ wattron(curwnd, COLOR_PAIR(COLOR_GREEN));
+ break;
+ case CYAN:
+ wattron(curwnd, COLOR_PAIR(COLOR_CYAN));
+ break;
+ case RED:
+ wattron(curwnd, COLOR_PAIR(COLOR_RED));
+ break;
+ case MAGENTA:
+ wattron(curwnd, COLOR_PAIR(COLOR_MAGENTA));
+ break;
+ case BROWN:
+ wattron(curwnd, COLOR_PAIR(COLOR_YELLOW));
+ break;
+ case LIGHTGRAY:
+ wattron(curwnd, COLOR_PAIR(COLOR_WHITE));
+ break;
+ case DARKGRAY:
+ wattron(curwnd, COLOR_PAIR(COLOR_BLACK) | A_BOLD);
+ break;
+ case LIGHTBLUE:
+ wattron(curwnd, COLOR_PAIR(COLOR_BLUE) | A_BOLD);
+ break;
+ case LIGHTGREEN:
+ wattron(curwnd, COLOR_PAIR(COLOR_GREEN) | A_BOLD);
+ break;
+ case LIGHTCYAN:
+ wattron(curwnd, COLOR_PAIR(COLOR_CYAN) | A_BOLD);
+ break;
+ case LIGHTRED:
+ wattron(curwnd, COLOR_PAIR(COLOR_RED) | A_BOLD);
+ break;
+ case LIGHTMAGENTA:
+ wattron(curwnd, COLOR_PAIR(COLOR_MAGENTA) | A_BOLD);
+ break;
+ case YELLOW:
+ wattron(curwnd, COLOR_PAIR(COLOR_YELLOW) | A_BOLD);
+ break;
+ case WHITE:
+ wattron(curwnd, COLOR_PAIR(COLOR_WHITE) | A_BOLD);
+ break;
+ }