display/source/CursesDisplay.cpp
// Set up the Curses-based display.
Set up the Curses-based display.
Set up the Curses - based display .
bool CursesDisplay::create()
{
  bool creation_success = true;
  initscr();
  keypad(stdscr, TRUE);
  nl();
  noecho(); 
  raw(); 
  curs_set(0); 
  if (has_colors() == TRUE)
  {
    can_use_colour = true;
    start_color();
    initialize_colours();
  }
  refresh_terminal_size();
  if ((TERMINAL_MAX_ROWS < 25) || (TERMINAL_MAX_COLS < 80))
  {
    printw("Shadow of the Wyrm requires a terminal of 80x25 or larger.\n");
    creation_success = false;
  }
  refresh();
  return creation_success;
}
bool CursesDisplay :: create ( ) { bool creation_success = true ; initscr ( ) ; keypad ( stdscr , TRUE ) ; nl ( ) ; noecho ( ) ; raw ( ) ; curs_set ( 0 ) ; if ( has_colors ( ) == TRUE ) { can_use_colour = true ; start_color ( ) ; initialize_colours ( ) ; } refresh_terminal_size ( ) ; if ( ( TERMINAL_MAX_ROWS < 25 ) || ( TERMINAL_MAX_COLS < 80 ) ) { printw ( " \n " ) ; creation_success = false ; } refresh ( ) ; return creation_success ; }
Set up the Curses-based display.
Set up the Curses - based display .
// Don't echo the user input. // pass control characters to the program. // Cursor invisible.  Doesn't seem to work in Cygwin.  Just like colour redefinition.  Fucking Cygwin.