From: Deskull Date: Sun, 11 Nov 2018 13:30:10 +0000 (+0900) Subject: [Refactor] #37287 #37353 型の置換。 / Type replacement. X-Git-Tag: vmacos2.2.1-7a~1275 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=270122375ec420b4e3d19a912781b695917b6487;p=hengbandforosx%2Fhengbandosx.git [Refactor] #37287 #37353 型の置換。 / Type replacement. --- diff --git a/src/cave.c b/src/cave.c index 4c7b0fdcd..9cea89cd4 100644 --- a/src/cave.c +++ b/src/cave.c @@ -795,9 +795,9 @@ static byte lighting_colours[16][2] = * @brief 調査中 * @todo コメントを付加すること */ -void apply_default_feat_lighting(byte f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]) +void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]) { - byte s_attr = f_attr[F_LIT_STANDARD]; + TERM_COLOR s_attr = f_attr[F_LIT_STANDARD]; byte s_char = f_char[F_LIT_STANDARD]; int i; diff --git a/src/chuukei.c b/src/chuukei.c index dcf449d76..8fd22f7a9 100644 --- a/src/chuukei.c +++ b/src/chuukei.c @@ -104,7 +104,7 @@ static errr (*old_xtra_hook)(int n, int v); static errr (*old_curs_hook)(int x, int y); static errr (*old_bigcurs_hook)(int x, int y); static errr (*old_wipe_hook)(int x, int y, int n); -static errr (*old_text_hook)(int x, int y, int n, byte a, cptr s); +static errr (*old_text_hook)(int x, int y, int n, TERM_COLOR a, cptr s); static void disable_chuukei_server(void) { @@ -933,7 +933,7 @@ static bool flush_ringbuf_client(void) { char id; int x, y, len; - SYMBOL_COLOR col; + TERM_COLOR col; int i; unsigned char tmp1, tmp2, tmp3, tmp4; char *mesg; diff --git a/src/cmd4.c b/src/cmd4.c index 4b4b556c1..ce7e171b1 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -3422,9 +3422,9 @@ void do_cmd_visuals(void) int c; IDX t; - SYMBOL_COLOR da = k_ptr->d_attr; + TERM_COLOR da = k_ptr->d_attr; SYMBOL_CODE dc = k_ptr->d_char; - SYMBOL_COLOR ca = k_ptr->x_attr; + TERM_COLOR ca = k_ptr->x_attr; SYMBOL_CODE cc = k_ptr->x_char; /* Label the object */ @@ -3516,9 +3516,9 @@ void do_cmd_visuals(void) int c; IDX t; - byte da = f_ptr->d_attr[lighting_level]; + TERM_COLOR da = f_ptr->d_attr[lighting_level]; byte dc = f_ptr->d_char[lighting_level]; - byte ca = f_ptr->x_attr[lighting_level]; + TERM_COLOR ca = f_ptr->x_attr[lighting_level]; byte cc = f_ptr->x_char[lighting_level]; /* Label the object */ diff --git a/src/files.c b/src/files.c index 18008c151..3eb6b3d8a 100644 --- a/src/files.c +++ b/src/files.c @@ -356,7 +356,7 @@ static named_num gf_desc[] = errr process_pref_file_command(char *buf) { int i, j; - SYMBOL_COLOR n1; + TERM_COLOR n1; SYMBOL_CODE n2; @@ -381,7 +381,7 @@ errr process_pref_file_command(char *buf) { monster_race *r_ptr; i = (huge)strtol(zz[0], NULL, 0); - n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[1], NULL, 0); n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0); if (i >= max_r_idx) return 1; r_ptr = &r_info[i]; @@ -397,7 +397,7 @@ errr process_pref_file_command(char *buf) { object_kind *k_ptr; i = (huge)strtol(zz[0], NULL, 0); - n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[1], NULL, 0); n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0); if (i >= max_k_idx) return 1; k_ptr = &k_info[i]; @@ -423,7 +423,7 @@ errr process_pref_file_command(char *buf) if (i >= max_f_idx) return 1; f_ptr = &f_info[i]; - n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[1], NULL, 0); n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0); if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[F_LIT_STANDARD] = n1; /* Allow TERM_DARK text */ if (n2) f_ptr->x_char[F_LIT_STANDARD] = n2; @@ -451,7 +451,7 @@ errr process_pref_file_command(char *buf) case F_LIT_MAX * 2 + 1: for (j = F_LIT_NS_BEGIN; j < F_LIT_MAX; j++) { - n1 = (SYMBOL_COLOR)strtol(zz[j * 2 + 1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[j * 2 + 1], NULL, 0); n2 = (SYMBOL_CODE)strtol(zz[j * 2 + 2], NULL, 0); if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[j] = n1; /* Allow TERM_DARK text */ if (n2) f_ptr->x_char[j] = n2; @@ -466,7 +466,7 @@ errr process_pref_file_command(char *buf) if (tokenize(buf+2, 3, zz, TOKENIZE_CHECKQUOTE) == 3) { j = (byte)strtol(zz[0], NULL, 0); - n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[1], NULL, 0); n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0); misc_to_attr[j] = n1; misc_to_char[j] = n2; @@ -479,7 +479,7 @@ errr process_pref_file_command(char *buf) if (tokenize(buf+2, 3, zz, TOKENIZE_CHECKQUOTE) == 3) { j = (huge)strtol(zz[0], NULL, 0); - n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[1], NULL, 0); n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0); for (i = 1; i < max_k_idx; i++) { @@ -499,7 +499,7 @@ errr process_pref_file_command(char *buf) if (tokenize(buf+2, 2, zz, TOKENIZE_CHECKQUOTE) == 2) { j = (byte)strtol(zz[0], NULL, 0) % 128; - n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0); + n1 = (TERM_COLOR)strtol(zz[1], NULL, 0); if (n1) tval_to_attr[j] = n1; return 0; } diff --git a/src/h-type.h b/src/h-type.h index 4830e8b47..bd09b0a5e 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -184,7 +184,6 @@ typedef s16b PLAYER_LEVEL; /*!< ゲーム中のプレイヤーレベルの型 typedef int DIRECTION; /*!< ゲーム中の方角の型定義 */ typedef s32b EXP; /*!< ゲーム中の主経験値の型定義 */ typedef s16b SUB_EXP; /*!< ゲーム中の副経験値の型定義 */ -typedef s16b TERM_COLOR; /*!< テキスト表示色の型定義 */ typedef s32b OBJECT_TYPE_VALUE; /*!< ゲーム中のアイテム主分類の型定義 */ typedef s32b OBJECT_SUBTYPE_VALUE; /*!< ゲーム中のアイテム副分類の型定義 */ @@ -218,9 +217,9 @@ typedef s16b COMMAND_CODE; /*!< コマンド内容の型定義 */ typedef s16b COMMAND_ARG; /*!< コマンド引数の型定義 */ typedef s16b COMMAND_NUM; /*!< コマンド数の型定義 */ -typedef int TERM_LEN; /*!< コンソール表示座標の型定義 */ -typedef byte SYMBOL_COLOR; /*!< キャラの色の型定義 */ -typedef byte SYMBOL_CODE; /*!< キャラの文字の型定義 */ +typedef int TERM_LEN; /*!< コンソール表示座標の型定義 */ +typedef byte TERM_COLOR; /*!< テキスト表示色の型定義 */ +typedef byte SYMBOL_CODE; /*!< キャラの文字の型定義 */ typedef s32b MAGIC_NUM1; /*!< プレイヤーの汎用魔法情報配列1の型定義*/ typedef byte MAGIC_NUM2; /*!< プレイヤーの汎用魔法情報配列2の型定義*/ diff --git a/src/main-win.c b/src/main-win.c index cb295395c..91567639e 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -2828,7 +2828,7 @@ static errr Term_wipe_win(int x, int y, int n) * what color it should be using to draw with, but perhaps simply changing * it every time is not too inefficient. XXX XXX XXX */ -static errr Term_text_win(int x, int y, int n, byte a, const char *s) +static errr Term_text_win(int x, int y, int n, TERM_COLOR a, const char *s) { term_data *td = (term_data*)(Term->data); RECT rc; @@ -3021,16 +3021,16 @@ static errr Term_text_win(int x, int y, int n, byte a, const char *s) * * If "graphics" is not available, we simply "wipe" the given grids. */ -static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp, const byte *tap, const char *tcp) +static errr Term_pict_win(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, const char *cp, const TERM_COLOR *tap, const char *tcp) { term_data *td = (term_data*)(Term->data); #ifdef USE_GRAPHICS int i; - int x1, y1, w1, h1, tw1, th1; - int x2, y2, w2, h2, tw2 = 0; - int x3, y3; + TERM_LEN x1, y1, w1, h1, tw1, th1; + TERM_LEN x2, y2, w2, h2, tw2 = 0; + TERM_LEN x3, y3; HDC hdcMask = NULL; diff --git a/src/types.h b/src/types.h index 1890e6950..4cb49d954 100644 --- a/src/types.h +++ b/src/types.h @@ -86,10 +86,10 @@ struct feature_type FEAT_SUBTYPE subtype; /*!< 副特性値 */ FEAT_POWER power; /*!< 地形強度 */ - SYMBOL_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */ + TERM_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */ SYMBOL_CODE d_char[F_LIT_MAX]; /*!< デフォルトの地形シンボルアルファベット / Default feature character */ - SYMBOL_COLOR x_attr[F_LIT_MAX]; /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */ + TERM_COLOR x_attr[F_LIT_MAX]; /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */ SYMBOL_CODE x_char[F_LIT_MAX]; /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */ }; @@ -138,10 +138,10 @@ struct object_kind DEPTH level; /*!< ベースアイテムの基本生成階 / Level */ BIT_FLAGS8 extra; /*!< その他色々のビットフラグ配列 / Something */ - SYMBOL_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */ + TERM_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */ SYMBOL_CODE d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */ - SYMBOL_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */ + TERM_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */ SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */ IDX flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */ @@ -346,12 +346,10 @@ struct monster_race DEPTH level; /* Level of creature */ RARITY rarity; /* Rarity of creature */ - - SYMBOL_COLOR d_attr; /* Default monster attribute */ + TERM_COLOR d_attr; /* Default monster attribute */ SYMBOL_CODE d_char; /* Default monster character */ - - SYMBOL_COLOR x_attr; /* Desired monster attribute */ + TERM_COLOR x_attr; /* Desired monster attribute */ SYMBOL_CODE x_char; /* Desired monster character */ diff --git a/src/z-term.c b/src/z-term.c index 898034910..8f709d3a4 100644 --- a/src/z-term.c +++ b/src/z-term.c @@ -369,16 +369,16 @@ static errr term_win_copy(term_win *s, term_win *f, int w, int h) /* Copy contents */ for (y = 0; y < h; y++) { - byte *f_aa = f->a[y]; + TERM_COLOR *f_aa = f->a[y]; char *f_cc = f->c[y]; - byte *s_aa = s->a[y]; + TERM_COLOR *s_aa = s->a[y]; char *s_cc = s->c[y]; - byte *f_taa = f->ta[y]; + TERM_COLOR *f_taa = f->ta[y]; char *f_tcc = f->tc[y]; - byte *s_taa = s->ta[y]; + TERM_COLOR *s_taa = s->ta[y]; char *s_tcc = s->tc[y]; for (x = 0; x < w; x++) @@ -473,7 +473,7 @@ static errr Term_wipe_hack(TERM_LEN x, TERM_LEN y, int n) /* * Hack -- fake hook for "Term_text()" (see above) */ -static errr Term_text_hack(TERM_LEN x, TERM_LEN y, int n, byte a, cptr cp) +static errr Term_text_hack(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr cp) { /* Unused */ (void)x; @@ -489,7 +489,7 @@ static errr Term_text_hack(TERM_LEN x, TERM_LEN y, int n, byte a, cptr cp) /* * Hack -- fake hook for "Term_pict()" (see above) */ -static errr Term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const byte *ap, cptr cp, const byte *tap, cptr tcp) +static errr Term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, cptr cp, const TERM_COLOR *tap, cptr tcp) { /* Unused */ (void)x; @@ -511,17 +511,16 @@ static errr Term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const byte *ap, cptr c /* * Mentally draw an attr/char at a given location - * * Assumes given location and values are valid. */ -void Term_queue_char(TERM_LEN x, TERM_LEN y, byte a, char c, byte ta, char tc) +void Term_queue_char(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c, TERM_COLOR ta, char tc) { term_win *scrn = Term->scr; - byte *scr_aa = &scrn->a[y][x]; + TERM_COLOR *scr_aa = &scrn->a[y][x]; char *scr_cc = &scrn->c[y][x]; - byte *scr_taa = &scrn->ta[y][x]; + TERM_COLOR *scr_taa = &scrn->ta[y][x]; char *scr_tcc = &scrn->tc[y][x]; /* Hack -- Ignore non-changes */ @@ -555,14 +554,11 @@ void Term_queue_char(TERM_LEN x, TERM_LEN y, byte a, char c, byte ta, char tc) /* * Bigtile version of Term_queue_char(). - * * If use_bigtile is FALSE, simply call Term_queue_char(). - * * Otherwise, mentally draw a pair of attr/char at a given location. - * * Assumes given location and values are valid. */ -void Term_queue_bigchar(TERM_LEN x, TERM_LEN y, byte a, char c, byte ta, char tc) +void Term_queue_bigchar(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c, TERM_COLOR ta, char tc) { #ifdef JP @@ -644,17 +640,17 @@ void Term_queue_bigchar(TERM_LEN x, TERM_LEN y, byte a, char c, byte ta, char tc * This function is designed to be fast, with no consistancy checking. * It is used to update the map in the game. */ -void Term_queue_line(TERM_LEN x, TERM_LEN y, int n, byte *a, char *c, byte *ta, char *tc) +void Term_queue_line(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR *a, char *c, TERM_COLOR *ta, char *tc) { term_win *scrn = Term->scr; TERM_LEN x1 = -1; TERM_LEN x2 = -1; - byte *scr_aa = &scrn->a[y][x]; + TERM_COLOR *scr_aa = &scrn->a[y][x]; char *scr_cc = &scrn->c[y][x]; - byte *scr_taa = &scrn->ta[y][x]; + TERM_COLOR *scr_taa = &scrn->ta[y][x]; char *scr_tcc = &scrn->tc[y][x]; while (n--) @@ -715,20 +711,20 @@ void Term_queue_line(TERM_LEN x, TERM_LEN y, int n, byte *a, char *c, byte *ta, * a valid location, so the first "n" characters of "s" can all be added * starting at (x,y) without causing any illegal operations. */ -void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s) +void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s) { TERM_LEN x1 = -1, x2 = -1; - byte *scr_aa = Term->scr->a[y]; + TERM_COLOR *scr_aa = Term->scr->a[y]; #ifdef JP char *scr_cc = Term->scr->c[y]; - byte *scr_taa = Term->scr->ta[y]; + TERM_COLOR *scr_taa = Term->scr->ta[y]; char *scr_tcc = Term->scr->tc[y]; #else char *scr_cc = Term->scr->c[y]; - byte *scr_taa = Term->scr->ta[y]; + TERM_COLOR *scr_taa = Term->scr->ta[y]; char *scr_tcc = Term->scr->tc[y]; #endif @@ -848,39 +844,39 @@ void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s) * * Display text using "Term_pict()" */ -static void Term_fresh_row_pict(TERM_LEN y, int x1, int x2) +static void Term_fresh_row_pict(TERM_LEN y, TERM_LEN x1, TERM_LEN x2) { TERM_LEN x; - byte *old_aa = Term->old->a[y]; + TERM_COLOR *old_aa = Term->old->a[y]; char *old_cc = Term->old->c[y]; - byte *scr_aa = Term->scr->a[y]; + TERM_COLOR *scr_aa = Term->scr->a[y]; char *scr_cc = Term->scr->c[y]; - byte *old_taa = Term->old->ta[y]; + TERM_COLOR *old_taa = Term->old->ta[y]; char *old_tcc = Term->old->tc[y]; - byte *scr_taa = Term->scr->ta[y]; + TERM_COLOR *scr_taa = Term->scr->ta[y]; char *scr_tcc = Term->scr->tc[y]; - byte ota; + TERM_COLOR ota; char otc; - byte nta; + TERM_COLOR nta; char ntc; /* Pending length */ - int fn = 0; + TERM_LEN fn = 0; /* Pending start */ - int fx = 0; + TERM_LEN fx = 0; - byte oa; + TERM_COLOR oa; char oc; - byte na; + TERM_COLOR na; char nc; #ifdef JP @@ -936,7 +932,7 @@ static void Term_fresh_row_pict(TERM_LEN y, int x1, int x2) { /* Draw pending attr/char pairs */ (void)((*Term->pict_hook)(fx, y, fn, - &scr_aa[fx], &scr_cc[fx],&scr_taa[fx], &scr_tcc[fx])); + &scr_aa[fx], &scr_cc[fx], &scr_taa[fx], &scr_tcc[fx])); /* Forget */ fn = 0; @@ -986,20 +982,20 @@ static void Term_fresh_row_both(TERM_LEN y, int x1, int x2) { TERM_LEN x; - byte *old_aa = Term->old->a[y]; + TERM_COLOR *old_aa = Term->old->a[y]; char *old_cc = Term->old->c[y]; - byte *scr_aa = Term->scr->a[y]; + TERM_COLOR *scr_aa = Term->scr->a[y]; char *scr_cc = Term->scr->c[y]; - byte *old_taa = Term->old->ta[y]; + TERM_COLOR *old_taa = Term->old->ta[y]; char *old_tcc = Term->old->tc[y]; - byte *scr_taa = Term->scr->ta[y]; + TERM_COLOR *scr_taa = Term->scr->ta[y]; char *scr_tcc = Term->scr->tc[y]; - byte ota; + TERM_COLOR ota; char otc; - byte nta; + TERM_COLOR nta; char ntc; /* The "always_text" flag */ @@ -1014,10 +1010,10 @@ static void Term_fresh_row_both(TERM_LEN y, int x1, int x2) /* Pending attr */ byte fa = Term->attr_blank; - byte oa; + TERM_COLOR oa; char oc; - byte na; + TERM_COLOR na; char nc; #ifdef JP @@ -1582,16 +1578,16 @@ errr Term_fresh(void) if (!old->cu && old->cv) { int csize = 1; - int tx = old->cx; - int ty = old->cy; + TERM_LEN tx = old->cx; + TERM_LEN ty = old->cy; - byte *old_aa = old->a[ty]; + TERM_COLOR *old_aa = old->a[ty]; char *old_cc = old->c[ty]; - byte *old_taa = old->ta[ty]; + TERM_COLOR *old_taa = old->ta[ty]; char *old_tcc = old->tc[ty]; - byte ota = old_taa[tx]; + TERM_COLOR ota = old_taa[tx]; char otc = old_tcc[tx]; #ifdef JP @@ -1835,7 +1831,7 @@ errr Term_gotoxy(TERM_LEN x, TERM_LEN y) * Do not change the cursor position * No visual changes until "Term_fresh()". */ -errr Term_draw(TERM_LEN x, TERM_LEN y, byte a, char c) +errr Term_draw(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c) { int w = Term->wid; int h = Term->hgt; @@ -1871,9 +1867,9 @@ errr Term_draw(TERM_LEN x, TERM_LEN y, byte a, char c) * positive value, future calls to either function will * return negative ones. */ -errr Term_addch(byte a, char c) +errr Term_addch(TERM_COLOR a, char c) { - int w = Term->wid; + TERM_LEN w = Term->wid; /* Handle "unusable" cursor */ if (Term->scr->cu) return (-1); @@ -1906,7 +1902,7 @@ errr Term_addch(byte a, char c) * Otherwise, queue a pair of attr/char for display at the current * cursor location, and advance the cursor to the right by two. */ -errr Term_add_bigch(byte a, char c) +errr Term_add_bigch(TERM_COLOR a, char c) { if (!use_bigtile) return Term_addch(a, c); @@ -1952,12 +1948,10 @@ errr Term_add_bigch(byte a, char c) * positive value, future calls to either function will * return negative ones. */ -errr Term_addstr(int n, byte a, cptr s) +errr Term_addstr(int n, TERM_COLOR a, cptr s) { int k; - - int w = Term->wid; - + TERM_LEN w = Term->wid; errr res = 0; /* Handle "unusable" cursor */ @@ -1989,7 +1983,7 @@ errr Term_addstr(int n, byte a, cptr s) /* * Move to a location and, using an attr, add a char */ -errr Term_putch(TERM_LEN x, TERM_LEN y, byte a, char c) +errr Term_putch(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c) { errr res; @@ -2007,7 +2001,7 @@ errr Term_putch(TERM_LEN x, TERM_LEN y, byte a, char c) /* * Move to a location and, using an attr, add a string */ -errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s) +errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s) { errr res; diff --git a/src/z-term.h b/src/z-term.h index f4a64fb93..af8b65fc7 100644 --- a/src/z-term.h +++ b/src/z-term.h @@ -37,16 +37,16 @@ struct term_win bool cu, cv; byte cx, cy; - SYMBOL_COLOR **a; + TERM_COLOR **a; char **c; - byte *va; + TERM_COLOR *va; char *vc; - byte **ta; + TERM_COLOR **ta; char **tc; - byte *vta; + TERM_COLOR *vta; char *vtc; }; @@ -109,9 +109,9 @@ struct term errr (*curs_hook)(TERM_LEN x, TERM_LEN y); //!< Hook for placing the cursor errr (*bigcurs_hook)(TERM_LEN x, TERM_LEN y); errr (*wipe_hook)(TERM_LEN x, TERM_LEN y, int n); //!< Hook for drawing some blank spaces - errr (*text_hook)(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s); //!< Hook for drawing a string of chars using an attr + errr (*text_hook)(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s); //!< Hook for drawing a string of chars using an attr void (*resize_hook)(void); - errr (*pict_hook)(TERM_LEN x, TERM_LEN y, int n, const byte *ap, const char *cp, const byte *tap, const char *tcp); //!< Hook for drawing a sequence of special attr / char pairs + errr (*pict_hook)(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR *ap, const char *cp, const TERM_COLOR *tap, const char *tcp); //!< Hook for drawing a sequence of special attr / char pairs }; @@ -169,22 +169,22 @@ extern term *Term; extern errr Term_user(int n); extern errr Term_xtra(int n, int v); -extern void Term_queue_char(TERM_LEN x, TERM_LEN y, byte a, char c, byte ta, char tc); -extern void Term_queue_bigchar(TERM_LEN x, TERM_LEN y, byte a, char c, byte ta, char tc); +extern void Term_queue_char(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c, TERM_COLOR ta, char tc); +extern void Term_queue_bigchar(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c, TERM_COLOR ta, char tc); -extern void Term_queue_line(TERM_LEN x, TERM_LEN y, int n, byte *a, char *c, byte *ta, char *tc); +extern void Term_queue_line(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR *a, char *c, TERM_COLOR *ta, char *tc); -extern void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s); +extern void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s); extern errr Term_fresh(void); extern errr Term_set_cursor(int v); extern errr Term_gotoxy(TERM_LEN x, TERM_LEN y); -extern errr Term_draw(TERM_LEN x, TERM_LEN y, byte a, char c); -extern errr Term_addch(byte a, char c); -extern errr Term_add_bigch(byte a, char c); -extern errr Term_addstr(int n, byte a, cptr s); -extern errr Term_putch(TERM_LEN x, TERM_LEN y, byte a, char c); -extern errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s); +extern errr Term_draw(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c); +extern errr Term_addch(TERM_COLOR a, char c); +extern errr Term_add_bigch(TERM_COLOR a, char c); +extern errr Term_addstr(int n, TERM_COLOR a, cptr s); +extern errr Term_putch(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c); +extern errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s); #ifdef JP extern errr Term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s); #endif