View Single Post
Old Mar 12th, 2008, 7:57 PM   #16
KuraKai
Newbie
 
Join Date: Mar 2008
Posts: 25
Rep Power: 0 KuraKai is on a distinguished road
Re: Console Game Development

Well I passed it anything and it still has yet to make anything blue.
C++ Syntax (Toggle Plain Text)
  1. #include "curses.h"
  2.  
  3. void main()
  4. {
  5. WINDOW * win = initscr();
  6. start_color();
  7. resize_term(25, 80);
  8. curs_set(2);
  9. noecho();
  10.  
  11. color_set(COLOR_BLUE, win);
  12. wborder(win, 0, 0, 0, 0, 0, 0, 0, 0);
  13. }

Also here is the code for color_set...
C++ Syntax (Toggle Plain Text)
  1. int wcolor_set(WINDOW *win, short color_pair, void *opts)
  2. {
  3. PDC_LOG(("wcolor_set() - called\n"));
  4.  
  5. if (!win)
  6. return ERR;
  7.  
  8. win->_attrs = (win->_attrs & ~A_COLOR) | COLOR_PAIR(color_pair);
  9.  
  10. return OK;
  11. }
  12.  
  13. int color_set(short color_pair, void *opts)
  14. {
  15. PDC_LOG(("color_set() - called\n"));
  16.  
  17. return wcolor_set(stdscr, color_pair, opts);
  18. }
KuraKai is offline   Reply With Quote