/*
* React to a new physical window size.
*/
-errr Term_resize(int w, int h)
+errr Term_resize(TERM_LEN w, TERM_LEN h)
{
int i;
- int wid, hgt;
+ TERM_LEN wid, hgt;
- byte *hold_x1;
- byte *hold_x2;
+ TERM_LEN *hold_x1;
+ TERM_LEN *hold_x2;
term_win *hold_old;
term_win *hold_scr;
hold_tmp = Term->tmp;
/* Create new scanners */
- C_MAKE(Term->x1, h, byte);
- C_MAKE(Term->x2, h, byte);
+ C_MAKE(Term->x1, h, TERM_LEN);
+ C_MAKE(Term->x2, h, TERM_LEN);
/* Create new window */
MAKE(Term->old, term_win);
}
/* Free some arrays */
- C_KILL(hold_x1, Term->hgt, byte);
- C_KILL(hold_x2, Term->hgt, byte);
+ C_KILL(hold_x1, Term->hgt, TERM_LEN);
+ C_KILL(hold_x2, Term->hgt, TERM_LEN);
/* Nuke */
term_win_nuke(hold_old, Term->wid, Term->hgt);
}
/* Free some arrays */
- C_KILL(t->x1, h, byte);
- C_KILL(t->x2, h, byte);
+ C_KILL(t->x1, h, TERM_LEN);
+ C_KILL(t->x2, h, TERM_LEN);
/* Free the input queue */
C_KILL(t->key_queue, t->key_size, char);
t->hgt = (byte_hack)h;
/* Allocate change arrays */
- C_MAKE(t->x1, h, byte);
- C_MAKE(t->x2, h, byte);
+ C_MAKE(t->x1, h, TERM_LEN);
+ C_MAKE(t->x2, h, TERM_LEN);
/* Allocate "displayed" */
#include "h-basic.h"
-
-/*
- * A term_win is a "window" for a Term
- *
- * - Cursor Useless/Visible codes
- * - Cursor Location (see "Useless")
- *
- * - Array[h] -- Access to the attribute array
- * - Array[h] -- Access to the character array
- *
- * - Array[h*w] -- Attribute array
- * - Array[h*w] -- Character array
- *
- * Note that the attr/char pair at (x,y) is a[y][x]/c[y][x]
- * and that the row of attr/chars at (0,y) is a[y]/c[y]
- */
-
typedef struct term_win term_win;
-
-struct term_win
+ /*!
+ * @brief A term_win is a "window" for a Term
+ */
+ struct term_win
{
- bool cu, cv;
- byte cx, cy;
+ bool cu, cv; //!< Cursor Useless / Visible codes
+ byte cx, cy; //!< Cursor Location (see "Useless")
- TERM_COLOR **a;
- char **c;
+ TERM_COLOR **a; //!< Array[h*w] -- Attribute array
+ char **c; //!< Array[h*w] -- Character array
- TERM_COLOR *va;
- char *vc;
+ TERM_COLOR *va; //!< Array[h] -- Access to the attribute array
+ char *vc; //!< Array[h] -- Access to the character array
- TERM_COLOR **ta;
- char **tc;
+ TERM_COLOR **ta; //!< Note that the attr pair at(x, y) is a[y][x]
+ char **tc; //!< Note that the char pair at(x, y) is c[y][x]
- TERM_COLOR *vta;
- char *vtc;
+ TERM_COLOR *vta; //!< Note that the row of attr at(0, y) is a[y]
+ char *vtc; //!< Note that the row of chars at(0, y) is c[y]
};