-/* File: main-cap.c */
+/* File: main-cap.c */
/* Purpose: Support for "term.c" using "termcap" calls */
#include "io/exit-panic.h"
#include "system/angband.h"
+#include "term/gameterm.h"
#include "term/z-form.h"
#ifdef USE_CAP
/* Get the (initial) columns and rows, or default */
if ((cols = tgetnum("co")) == -1) {
- cols = 80;
+ cols = TERM_DEFAULT_COLS;
}
if ((rows = tgetnum("li")) == -1) {
- rows = 24;
+ rows = TERM_DEFAULT_ROWS;
}
/* Find out how to move the cursor to a given location */
#ifdef USE_HARDCODE
/* Assume some defualt information */
- rows = 24;
- cols = 80;
+ rows = TERM_DEFAULT_ROWS;
+ cols = TERM_DEFAULT_COLS;
/* Clear screen */
cl = "\033[2J\033[H"; /* --]--]-- */
game_term_curs_cap(x, y);
/* Wipe to end of line */
- if (x + n >= 80) {
+ if (x + n >= MAIN_TERM_MIN_COLS) {
do_ce();
}
}
/* Hack -- Require large screen, or Quit with message */
- if ((rows < 24) || (cols < 80)) {
+ if ((rows < MAIN_TERM_MIN_ROWS) || (cols < MAIN_TERM_MIN_COLS)) {
quit("Screen too small!");
}
/*** Now prepare the term ***/
/* Initialize the term */
- term_init(t, 80, 24, 256);
+ term_init(t, TERM_DEFAULT_COLS, TERM_DEFAULT_ROWS, 256);
/* Avoid the bottom right corner */
t->icky_corner = true;