-void setwnd(short wndnum){
-/* change windows -- OK for this to be a no-op in tty mode */
-#ifdef SERGEEV
- int cury;
- cury=wherey()+wnds[curwnd].wndtop-wnds[wndnum].wndtop;
- if ((curwnd==FULLSCREEN_WINDOW)&&(wndnum!=FULLSCREEN_WINDOW)) clrscr();
- window(wnds[wndnum].wndleft, wnds[wndnum].wndtop, wnds[wndnum].wndright, wnds[wndnum].wndbottom);
- if ((curwnd==wndnum)&&(cury>wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1)){
- gotoxy(wnds[wndnum].wndright-wnds[wndnum].wndleft+1,wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1);
- skip(1);
- }
- curwnd=wndnum;
- gotoxy(1,cury);
-#endif /* SERGEEV */
+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;
+ }
+ }
+#endif /* A_COLOR */