display/source/CursesDisplay.cpp
// Update the row/col for the player synopsis.  Return false if we've run out of space
// and can't print anything else.
Update the row/col for the player synopsis.  Return false if we've run out of space
and can't print anything else.
Update the row / col for the player synopsis . Return false if we ' ve run out of space and can ' t print anything else .
bool CursesDisplay::update_synopsis_row_and_column(const unsigned int initial_row, unsigned int* row, unsigned int* col, const string& previous_field, const string& next_field)
{
  bool can_update = true;
  unsigned int next_column_end = *col + previous_field.size() + FIELD_SPACE + next_field.size();
  *col = *col + previous_field.size() + FIELD_SPACE;
  if (next_column_end > TERMINAL_MAX_COLS - 1)
  {
    if (*row < TERMINAL_MAX_ROWS-2)
    {
      *col = 0;
      *row = *row + 1;
    }
    else
    {
      can_update = false;
    }
  }
  return can_update;
}
bool CursesDisplay :: update_synopsis_row_and_column ( const unsigned int initial_row , unsigned int * row , unsigned int * col , const string & previous_field , const string & next_field ) { bool can_update = true ; unsigned int next_column_end = * col + previous_field . size ( ) + FIELD_SPACE + next_field . size ( ) ; * col = * col + previous_field . size ( ) + FIELD_SPACE ; if ( next_column_end > TERMINAL_MAX_COLS - 1 ) { if ( * row < TERMINAL_MAX_ROWS - 2 ) { * col = 0 ; * row = * row + 1 ; } else { can_update = false ; } } return can_update ; }
Update the row/col for the player synopsis.
Update the row / col for the player synopsis .
// We've gone over max cols.  Fine - but can we increment to the next row in the display?