} else if (travel.run > 0)
travel.run--;
- Term_xtra(TERM_XTRA_DELAY, delay_factor);
+ term_xtra(TERM_XTRA_DELAY, delay_factor);
}
/*!
int col0 = 5 + level * 7;
int row0 = 1 + level * 3;
int row1 = row0 + 1;
- Term_putstr(col0, row0, -1, TERM_WHITE, linestr);
+ term_putstr(col0, row0, -1, TERM_WHITE, linestr);
*menu_key = 0;
for (int i = start; menu_data[i].level >= level; i++)
str = format("| %c) %-*s %2s | ", *menu_key + 'a', max_len, menu_data[i].name, com_key_str);
- Term_putstr(col0, row1++, -1, TERM_WHITE, str);
+ term_putstr(col0, row1++, -1, TERM_WHITE, str);
(*menu_key)++;
}
- Term_putstr(col0, row1, -1, TERM_WHITE, linestr);
+ term_putstr(col0, row1, -1, TERM_WHITE, linestr);
*redraw = FALSE;
}
{
int by1 = 0, by2 = 0;
- Term_get_size(&tb->wid, &tb->hgt);
+ term_get_size(&tb->wid, &tb->hgt);
/*
* Top line (-1), description line (-3), separator (-1)
if (tb->dirty_flags & DIRTY_SCREEN)
{
tb->dirty_flags |= (DIRTY_ALL | DIRTY_MODE);
- Term_clear();
+ term_clear();
}
if (tb->dirty_flags & DIRTY_MODE)
for (; j < sepa_length; j++)
buf[j] = '-';
buf[j] = '\0';
- Term_putstr(0, tb->hgt + 1, sepa_length, TERM_WHITE, buf);
+ term_putstr(0, tb->hgt + 1, sepa_length, TERM_WHITE, buf);
}
process_dirty_expression(player_ptr, tb);
#endif
}
- Term_erase(0, i + 1, tb->wid);
+ term_erase(0, i + 1, tb->wid);
if (tb->states[y] & LSTAT_AUTOREGISTER)
{
color = TERM_L_RED;
if (!tb->mark || (y < by1 || by2 < y))
{
- Term_putstr(leftcol, i + 1, tb->wid - 1, color, msg);
+ term_putstr(leftcol, i + 1, tb->wid - 1, color, msg);
}
else if (by1 != by2)
{
- Term_putstr(leftcol, i + 1, tb->wid - 1, TERM_YELLOW, msg);
+ term_putstr(leftcol, i + 1, tb->wid - 1, TERM_YELLOW, msg);
}
else
{
if (bx2 > len) bx2 = len;
- Term_gotoxy(leftcol, i + 1);
- if (x0 < bx1) Term_addstr(bx1 - x0, color, msg);
- if (x0 < bx2) Term_addstr(bx2 - bx1, TERM_YELLOW, msg + (bx1 - x0));
- Term_addstr(-1, color, msg + (bx2 - x0));
+ term_gotoxy(leftcol, i + 1);
+ if (x0 < bx1) term_addstr(bx1 - x0, color, msg);
+ if (x0 < bx2) term_addstr(bx2 - bx1, TERM_YELLOW, msg + (bx1 - x0));
+ term_addstr(-1, color, msg + (bx2 - x0));
}
}
for (; i < tb->hgt; i++)
{
- Term_erase(0, i + 1, tb->wid);
+ term_erase(0, i + 1, tb->wid);
}
bool is_dirty_diary = (tb->dirty_flags & (DIRTY_ALL | DIRTY_NOT_FOUND | DIRTY_NO_SEARCH)) != 0;
concptr str1 = NULL, str2 = NULL;
for (int j = 0; j < DESCRIPT_HGT; j++)
{
- Term_erase(0, tb->hgt + 2 + j, tb->wid);
+ term_erase(0, tb->hgt + 2 + j, tb->wid);
}
if (tb->dirty_flags & DIRTY_NOT_FOUND)
case EC_INSERT_MACRO:
{
draw_text_editor(player_ptr, tb);
- Term_erase(0, tb->cy - tb->upper + 1, tb->wid);
- Term_putstr(0, tb->cy - tb->upper + 1, tb->wid - 1, TERM_YELLOW, _("P:<トリガーキー>: ", "P:<Trigger key>: "));
+ term_erase(0, tb->cy - tb->upper + 1, tb->wid);
+ term_putstr(0, tb->cy - tb->upper + 1, tb->wid - 1, TERM_YELLOW, _("P:<トリガーキー>: ", "P:<Trigger key>: "));
if (!insert_macro_line(tb)) break;
tb->cx = 2;
case EC_INSERT_KEYMAP:
{
draw_text_editor(player_ptr, tb);
- Term_erase(0, tb->cy - tb->upper + 1, tb->wid);
- Term_putstr(0, tb->cy - tb->upper + 1, tb->wid - 1, TERM_YELLOW,
+ term_erase(0, tb->cy - tb->upper + 1, tb->wid);
+ term_putstr(0, tb->cy - tb->upper + 1, tb->wid - 1, TERM_YELLOW,
format(_("C:%d:<コマンドキー>: ", "C:%d:<Keypress>: "), (rogue_like_commands ? KEYMAP_MODE_ROGUE : KEYMAP_MODE_ORIG)));
if (!insert_keymap_line(tb)) break;
int pos = 0;
while (TRUE) {
bool back = FALSE;
- Term_erase(col, 0, 255);
- Term_putstr(col, 0, -1, color, buf);
- Term_gotoxy(col + pos, 0);
+ term_erase(col, 0, 255);
+ term_putstr(col, 0, -1, color, buf);
+ term_gotoxy(col + pos, 0);
int skey = inkey_special(TRUE);
switch (skey) {
static void display_initial_birth_message(player_type *creature_ptr)
{
- Term_clear();
+ term_clear();
put_str(_("名前 :", "Name :"), 1, 26);
put_str(_("性別 :", "Sex :"), 3, 1);
put_str(_("種族 :", "Race :"), 4, 1);
birth_put_stats(creature_ptr);
put_str(format("%10ld", auto_round), 10, col + 20);
- Term_fresh();
+ term_fresh();
inkey_scan = TRUE;
if (inkey()) {
get_ahw(creature_ptr);
creature_ptr->chp = creature_ptr->mhp;
creature_ptr->csp = creature_ptr->msp;
display_player(creature_ptr, mode);
- Term_gotoxy(2, 23);
+ term_gotoxy(2, 23);
const char b1 = '[';
- Term_addch(TERM_WHITE, b1);
- Term_addstr(-1, TERM_WHITE, _("'r' 次の数値", "'r'eroll"));
+ term_addch(TERM_WHITE, b1);
+ term_addstr(-1, TERM_WHITE, _("'r' 次の数値", "'r'eroll"));
if (prev)
- Term_addstr(-1, TERM_WHITE, _(", 'p' 前の数値", "'p'previous"));
+ term_addstr(-1, TERM_WHITE, _(", 'p' 前の数値", "'p'previous"));
if (mode)
- Term_addstr(-1, TERM_WHITE, _(", 'h' その他の情報", ", 'h' Misc."));
+ term_addstr(-1, TERM_WHITE, _(", 'h' その他の情報", ", 'h' Misc."));
else
- Term_addstr(-1, TERM_WHITE, _(", 'h' 生い立ちを表示", ", 'h'istory"));
+ term_addstr(-1, TERM_WHITE, _(", 'h' 生い立ちを表示", ", 'h'istory"));
- Term_addstr(-1, TERM_WHITE, _(", Enter この数値に決定", ", or Enter to accept"));
+ term_addstr(-1, TERM_WHITE, _(", Enter この数値に決定", ", or Enter to accept"));
const char b2 = ']';
- Term_addch(TERM_WHITE, b2);
+ term_addch(TERM_WHITE, b2);
*c = inkey();
if (*c == 'Q')
birth_quit();
while (TRUE) {
int col = 42;
if (autoroller || autochara) {
- Term_clear();
+ term_clear();
put_str(_("回数 :", "Round:"), 10, col + 13);
put_str(_("(ESCで停止)", "(Hit ESC to stop)"), 12, col + 13);
} else {
#endif
c_put_str(TERM_L_BLUE, format("%c", creature_ptr->history[y][x]), y + 12, x + 10);
- Term_gotoxy(x + 10, y + 12);
+ term_gotoxy(x + 10, y + 12);
int skey = inkey_special(TRUE);
if (!(skey & SKEY_MASK))
c = (char)skey;
x--;
#endif
} else if (c == '\r' || c == '\n') {
- Term_erase(0, 11, 255);
- Term_erase(0, 17, 255);
+ term_erase(0, 11, 255);
+ term_erase(0, 17, 255);
put_str(_("(キャラクターの生い立ち - 編集済み)", "(Character Background - Edited)"), 11, 20);
break;
} else if (c == ESCAPE) {
if (!previous_char.quick_ok)
return FALSE;
- Term_clear();
+ term_clear();
put_str(_("クイック・スタートを使うと以前と全く同じキャラクターで始められます。",
"Do you want to use the quick start function(same character as your last one)."),
11, 2);
update_creature(creature_ptr);
creature_ptr->redraw |= (PR_STATE);
update_output(creature_ptr);
- Term_fresh();
+ term_fresh();
}
Term->scr->cu = cu;
Term->scr->cv = cv;
- Term_fresh();
+ term_fresh();
C_KILL(who, current_world_ptr->max_m_idx, MONSTER_IDX);
}
/* Clear lines, position cursor (really should use strlen here) */
- Term_erase(14, 14, 255);
- Term_erase(14, 13, 255);
- Term_erase(14, 12, 255);
- Term_erase(14, 11, 255);
+ term_erase(14, 14, 255);
+ term_erase(14, 13, 255);
+ term_erase(14, 12, 255);
+ term_erase(14, 11, 255);
shape_buffer(exe_spell(caster_ptr, use_realm, spell, SPELL_DESC), 62, temp, sizeof(temp));
if (reinit_wilderness) player_ptr->leaving = TRUE;
current_world_ptr->character_icky--;
- Term_clear();
+ term_clear();
player_ptr->update |= (PU_VIEW | PU_MONSTERS | PU_BONUS | PU_LITE | PU_MON_LITE);
player_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY | PR_MAP);
prt(format("(%d,%d)-(%d,%d)", tb->mx, tb->my, tb->cx, tb->cy), 0, 60);
}
- Term_gotoxy(tb->cx - tb->left, tb->cy - tb->upper + 1);
+ term_gotoxy(tb->cx - tb->left, tb->cy - tb->upper + 1);
tb->dirty_flags = 0;
tb->dirty_line = -1;
tb->old_cy = tb->cy;
int i;
while (TRUE)
{
- Term_clear();
+ term_clear();
prt(_("[ 記録の設定 ]", "[ Play Record ]"), 2, 0);
prt(_("(1) 記録を見る", "(1) Display your record"), 4, 5);
prt(_("(2) 文章を記録する", "(2) Add record"), 5, 5);
screen_save();
while (TRUE)
{
- Term_clear();
+ term_clear();
prt(_("[ カラーの設定 ]", "Interact with Colors"), 2, 0);
prt(_("(1) ユーザー設定ファイルのロード", "(1) Load a user pref file"), 4, 5);
prt(_("(2) カラーの設定をファイルに書き出す", "(2) Dump colors"), 5, 5);
if (!askfor(tmp, 70)) continue;
(void)process_pref_file(creature_ptr, tmp, process_autopick_file_command);
- Term_xtra(TERM_XTRA_REACT, 0);
- Term_redraw();
+ term_xtra(TERM_XTRA_REACT, 0);
+ term_redraw();
}
else if (i == '2')
{
clear_from(10);
for (byte j = 0; j < 16; j++)
{
- Term_putstr(j * 4, 20, -1, a, "###");
- Term_putstr(j * 4, 22, -1, j, format("%3d", j));
+ term_putstr(j * 4, 20, -1, a, "###");
+ term_putstr(j * 4, 22, -1, j, format("%3d", j));
}
name = ((a < 16) ? color_names[a] : _("未定義", "undefined"));
- Term_putstr(5, 10, -1, TERM_WHITE,
+ term_putstr(5, 10, -1, TERM_WHITE,
format(_("カラー = %d, 名前 = %s", "Color = %d, Name = %s"), a, name));
- Term_putstr(5, 12, -1, TERM_WHITE,
+ term_putstr(5, 12, -1, TERM_WHITE,
format("K = 0x%02x / R,G,B = 0x%02x,0x%02x,0x%02x",
angband_color_table[a][0],
angband_color_table[a][1],
angband_color_table[a][2],
angband_color_table[a][3]));
- Term_putstr(0, 14, -1, TERM_WHITE,
+ term_putstr(0, 14, -1, TERM_WHITE,
_("コマンド (n/N/k/K/r/R/g/G/b/B): ", "Command (n/N/k/K/r/R/g/G/b/B): "));
i = inkey();
if (i == ESCAPE) break;
if (i == 'b') angband_color_table[a][3] = (byte)(angband_color_table[a][3] + 1);
if (i == 'B') angband_color_table[a][3] = (byte)(angband_color_table[a][3] - 1);
- Term_xtra(TERM_XTRA_REACT, 0);
- Term_redraw();
+ term_xtra(TERM_XTRA_REACT, 0);
+ term_redraw();
}
}
else
char ch;
int i, k = 0, n = 2;
char buf[80];
- Term_clear();
+ term_clear();
while (TRUE) {
sprintf(buf,
_("%s ( リターンで次へ, y/n でセット, F で頻度を入力, ESC で決定 ) ", "%s (RET to advance, y/n to set, 'F' for frequency, ESC to accept) "), info);
case '?': {
(void)show_file(player_ptr, TRUE, _("joption.txt#Autosave", "option.txt#Autosave"), NULL, 0, 0);
- Term_clear();
+ term_clear();
break;
}
old_flag[j] = window_flag[j];
}
- Term_clear();
+ term_clear();
while (go) {
prt(_("ウィンドウ・フラグ (<方向>で移動, tでチェンジ, y/n でセット, ESC)", "Window Flags (<dir>, t, y, n, ESC) "), 0, 0);
for (j = 0; j < 8; j++) {
if (j == x)
a = TERM_L_BLUE;
- Term_putstr(35 + j * 5 - strlen(s) / 2, 2 + j % 2, -1, a, s);
+ term_putstr(35 + j * 5 - strlen(s) / 2, 2 + j % 2, -1, a, s);
}
for (i = 0; i < 16; i++) {
if (!str)
str = _("(未使用)", "(Unused option)");
- Term_putstr(0, i + 5, -1, a, str);
+ term_putstr(0, i + 5, -1, a, str);
for (j = 0; j < 8; j++) {
char c = '.';
a = TERM_WHITE;
if (window_flag[j] & (1L << i))
c = 'X';
- Term_putch(35 + j * 5, i + 5, a, c);
+ term_putch(35 + j * 5, i + 5, a, c);
}
}
- Term_gotoxy(35 + x * 5, y + 5);
+ term_gotoxy(35 + x * 5, y + 5);
ch = inkey();
switch (ch) {
case ESCAPE: {
}
case '?': {
(void)show_file(player_ptr, TRUE, _("joption.txt#Window", "option.txt#Window"), NULL, 0, 0);
- Term_clear();
+ term_clear();
break;
}
default: {
if (window_flag[j] == old_flag[j])
continue;
- Term_activate(angband_term[j]);
- Term_clear();
- Term_fresh();
- Term_activate(old);
+ term_activate(angband_term[j]);
+ term_clear();
+ term_fresh();
+ term_activate(old);
}
}
char ch;
int i, k = 0, n = MAX_CHEAT_OPTIONS;
char buf[80];
- Term_clear();
+ term_clear();
while (TRUE) {
DIRECTION dir;
sprintf(buf, _("%s ( リターンで次へ, y/n でセット, ESC で決定 )", "%s (RET to advance, y/n to set, ESC to accept) "), info);
case '?': {
strnfmt(buf, sizeof(buf), _("joption.txt#%s", "option.txt#%s"), cheat_info[k].o_text);
(void)show_file(player_ptr, TRUE, buf, NULL, 0, 0);
- Term_clear();
+ term_clear();
break;
}
default: {
if (!current_world_ptr->noscore && !allow_debug_opts)
n--;
- Term_clear();
+ term_clear();
prt(_("[ オプションの設定 ]", "Game options"), 1, 0);
while (TRUE) {
for (i = 0; i < n; i++) {
byte a = TERM_WHITE;
if (i == y)
a = TERM_L_BLUE;
- Term_putstr(5, option_fields[i].row, -1, a, format("(%c) %s", toupper(option_fields[i].key), option_fields[i].name));
+ term_putstr(5, option_fields[i].row, -1, a, format("(%c) %s", toupper(option_fields[i].key), option_fields[i].name));
}
prt(_("<方向>で移動, Enterで決定, ESCでキャンセル, ?でヘルプ: ", "Move to <dir>, Select to Enter, Cancel to ESC, ? to help: "), 21, 0);
break;
else if (k == '?') {
(void)show_file(player_ptr, TRUE, _("joption.txt#BaseDelay", "option.txt#BaseDelay"), NULL, 0, 0);
- Term_clear();
+ term_clear();
} else if (isdigit(k))
delay_factor = D2I(k);
else
break;
else if (k == '?') {
(void)show_file(player_ptr, TRUE, _("joption.txt#Hitpoint", "option.txt#Hitpoint"), NULL, 0, 0);
- Term_clear();
+ term_clear();
} else if (isdigit(k))
hitpoint_warn = D2I(k);
else
break;
else if (k == '?') {
(void)show_file(player_ptr, TRUE, _("joption.txt#Manapoint", "option.txt#Manapoint"), NULL, 0, 0);
- Term_clear();
+ term_clear();
} else if (isdigit(k))
mana_warn = D2I(k);
else
}
case '?':
(void)show_file(player_ptr, TRUE, _("joption.txt", "option.txt"), NULL, 0, 0);
- Term_clear();
+ term_clear();
break;
default: {
bell();
opt[n++] = i;
}
- Term_clear();
+ term_clear();
while (TRUE) {
DIRECTION dir;
sprintf(buf, _("%s (リターン:次, %sESC:終了, ?:ヘルプ) ", "%s (RET:next, %s, ?:help) "), info,
case '?': {
strnfmt(buf, sizeof(buf), _("joption.txt#%s", "option.txt#%s"), option_info[opt[k]].o_text);
(void)show_file(player_ptr, TRUE, buf, NULL, 0, 0);
- Term_clear();
+ term_clear();
break;
}
default: {
bool need_redraw = FALSE;
screen_save();
while (TRUE) {
- Term_clear();
+ term_clear();
prt(format(_("%d/2 ページ", "page %d/2"), (p + 1)), 2, 65);
prt(_("現在の知識を確認する", "Display current knowledge"), 3, 0);
if (p == 0) {
}
roff_top(r_idx);
- Term_addstr(-1, TERM_WHITE, _(" ['r'思い出, ESC]", " [(r)ecall, ESC]"));
+ term_addstr(-1, TERM_WHITE, _(" ['r'思い出, ESC]", " [(r)ecall, ESC]"));
query = inkey();
if (recall) {
screen_load();
flush();
char tmp[1024];
ascii_to_text(tmp, buf);
- Term_addstr(-1, TERM_WHITE, tmp);
+ term_addstr(-1, TERM_WHITE, tmp);
}
buf[0] = inkey();
buf[1] = '\0';
ascii_to_text(tmp, buf);
- Term_addstr(-1, TERM_WHITE, tmp);
+ term_addstr(-1, TERM_WHITE, tmp);
flush();
}
screen_save();
while (TRUE)
{
- Term_clear();
+ term_clear();
prt(_("[ マクロの設定 ]", "Interact with Macros"), 2, 0);
prt(_("マクロ行動が(もしあれば)下に表示されます:", "Current action (if any) shown below:"), 20, 0);
ascii_to_text(buf, macro__buf);
for (TERM_LEN x = 0; x < wid - 1; x++)
{
concptr cc = NULL;
- (void)(Term_what(x, y, &a, &c));
+ (void)(term_what(x, y, &a, &c));
switch (c)
{
case '&': cc = "&"; break;
void do_cmd_save_screen_html_aux(char *filename, int message)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
FILE *fff;
fff = angband_fopen(filename, "w");
if (!check_screen_html_can_open(fff, filename, message)) return;
TERM_LEN x;
for (x = 0; x < wid - 1; x++)
{
- (void)(Term_what(x, y, &a, &c));
+ (void)(term_what(x, y, &a, &c));
buf[x] = c;
}
TERM_LEN x;
for (x = 0; x < wid - 1; x++)
{
- (void)(Term_what(x, y, &a, &c));
+ (void)(term_what(x, y, &a, &c));
buf[x] = hack[a & 0x0F];
}
if (!ask_html_dump(&html_dump)) return;
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
bool old_use_graphics = update_use_graphics(creature_ptr, process_autopick_file_command);
{
if (buf[x] == '\n' || buf[x] == '\0') break;
- Term_draw(x, y, TERM_WHITE, buf[x]);
+ term_draw(x, y, TERM_WHITE, buf[x]);
}
}
{
if (buf[x] == '\n' || buf[x] == '\0') break;
- (void)(Term_what(x, y, &a, &c));
+ (void)(term_what(x, y, &a, &c));
for (int i = 0; i < 16; i++)
{
if (hack[i] == buf[x]) a = (byte)i;
}
- Term_draw(x, y, a, c);
+ term_draw(x, y, a, c);
}
}
}
FILE *fff;
char buf[1024];
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "dump.txt");
fff = angband_fopen(buf, "r");
if (!fff)
}
screen_save();
- Term_clear();
+ term_clear();
bool okay = draw_white_characters(buf, fff, wid, hgt);
draw_colored_characters(buf, fff, wid, hgt, okay);
msg_print(NULL);
handle_stuff(creature_ptr);
prt(_("ゲームをセーブしています...", "Saving game..."), 0, 0);
- Term_fresh();
+ term_fresh();
(void)strcpy(creature_ptr->died_from, _("(セーブ)", "(saved)"));
signals_ignore_tstp();
if (save_player(creature_ptr))
prt(_("ゲームをセーブしています... 失敗!", "Saving game... failed!"), 0, 0);
signals_handle_tstp();
- Term_fresh();
+ term_fresh();
(void)strcpy(creature_ptr->died_from, _("(元気に生きている)", "(alive and well)"));
current_world_ptr->is_loading_now = FALSE;
update_creature(creature_ptr);
if (command_new == ESCAPE) {
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
command_new = 0;
command_gap = wid - 30;
} else {
if (command_new == ESCAPE) {
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
command_new = 0;
command_gap = wid - 30;
}
char temp[70 * 20];
/* Clear lines, position cursor (really should use strlen here) */
- Term_erase(7, 23, 255);
- Term_erase(7, 22, 255);
- Term_erase(7, 21, 255);
- Term_erase(7, 20, 255);
+ term_erase(7, 23, 255);
+ term_erase(7, 22, 255);
+ term_erase(7, 21, 255);
+ term_erase(7, 20, 255);
shape_buffer(k_text + k_info[lookup_kind(tval, i)].text, 62, temp, sizeof(temp));
for (j = 0, line = 21; temp[j]; j += 1 + strlen(&temp[j]))
int line, j;
/* Clear lines, position cursor (really should use strlen here) */
- Term_erase(14, 21, 255);
- Term_erase(14, 20, 255);
- Term_erase(14, 19, 255);
- Term_erase(14, 18, 255);
- Term_erase(14, 17, 255);
- Term_erase(14, 16, 255);
+ term_erase(14, 21, 255);
+ term_erase(14, 20, 255);
+ term_erase(14, 19, 255);
+ term_erase(14, 18, 255);
+ term_erase(14, 17, 255);
+ term_erase(14, 16, 255);
shape_buffer(kaji_tips[mode - 1], 62, temp, sizeof(temp));
for (j = 0, line = 17; temp[j]; j += (1 + strlen(&temp[j]))) {
TERM_COLOR a = object_attr(q_ptr);
print_rel(creature_ptr, c, a, ny[cur_dis], nx[cur_dis]);
move_cursor_relative(ny[cur_dis], nx[cur_dis]);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
lite_spot(creature_ptr, ny[cur_dis], nx[cur_dis]);
- Term_fresh();
+ term_fresh();
} else {
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
prev_y = y;
byte a = object_attr(q_ptr);
print_rel(creature_ptr, c, a, ny[i], nx[i]);
move_cursor_relative(ny[i], nx[i]);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
lite_spot(creature_ptr, ny[i], nx[i]);
- Term_fresh();
+ term_fresh();
} else {
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
}
*/
void do_cmd_redraw(player_type *creature_ptr)
{
- Term_xtra(TERM_XTRA_REACT, 0);
+ term_xtra(TERM_XTRA_REACT, 0);
creature_ptr->update |= (PU_COMBINE | PU_REORDER);
creature_ptr->update |= (PU_TORCH);
{
if (!angband_term[j]) continue;
- Term_activate(angband_term[j]);
- Term_redraw();
- Term_fresh();
- Term_activate(old);
+ term_activate(angband_term[j]);
+ term_redraw();
+ term_fresh();
+ term_activate(old);
}
}
display_player(creature_ptr, mode);
}
- Term_putstr(2, 23, -1, TERM_WHITE,
+ term_putstr(2, 23, -1, TERM_WHITE,
_("['c'で名前変更, 'f'でファイルへ書出, 'h'でモード変更, ESCで終了]", "['c' to change name, 'f' to file, 'h' to change mode, or ESC]"));
char c = inkey();
if (c == ESCAPE) break;
char back_str[81];
concptr shower = NULL;
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
int num_lines = hgt - 4;
strcpy(finder_str, "");
strcpy(shower_str, "");
int n = message_num();
int i = 0;
screen_save();
- Term_clear();
+ term_clear();
while (TRUE)
{
int j;
while ((str = angband_strstr(str, shower)) != NULL)
{
int len = strlen(shower);
- Term_putstr(str - msg, num_lines + 1 - j, len, TERM_YELLOW, shower);
+ term_putstr(str - msg, num_lines + 1 - j, len, TERM_YELLOW, shower);
str += len;
}
}
for (; j < num_lines; j++)
- Term_erase(0, num_lines + 1 - j, 255);
+ term_erase(0, num_lines + 1 - j, 255);
prt(format(_("以前のメッセージ %d-%d 全部で(%d)", "Message Recall (%d-%d of %d)"),
i, i + j - 1, n), 0, 0);
{
screen_save();
prt(_("お待ち下さい...", "Please wait..."), 0, 0);
- Term_fresh();
- Term_clear();
+ term_fresh();
+ term_clear();
display_autopick = 0;
int cy, cx;
display_autopick = ITEM_DISPLAY;
while (TRUE) {
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
int row_message = hgt - 1;
put_str(_("何かキーを押してください('M':拾う 'N':放置 'D':M+N 'K':壊すアイテムを表示)",
" Hit M, N(for ~), K(for !), or D(same as M+N) to display auto-picker items."),
else
break;
- Term_fresh();
+ term_fresh();
if (~display_autopick & flag)
display_autopick |= flag;
else
screen_save();
while (TRUE) {
- Term_clear();
+ term_clear();
print_visuals_menu(NULL);
int i = inkey();
if (i == ESCAPE)
TERM_COLOR ca = r_ptr->x_attr;
byte cc = r_ptr->x_char;
- Term_putstr(5, 17, -1, TERM_WHITE, format(_("モンスター = %d, 名前 = %-40.40s", "Monster = %d, Name = %-40.40s"), r, (r_name + r_ptr->name)));
- Term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3u / %3u", "Default attr/char = %3u / %3u"), da, dc));
- Term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
- Term_queue_bigchar(43, 19, da, dc, 0, 0);
- Term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3u / %3u", "Current attr/char = %3u / %3u"), ca, cc));
- Term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
- Term_queue_bigchar(43, 20, ca, cc, 0, 0);
- Term_putstr(0, 22, -1, TERM_WHITE, _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "));
+ term_putstr(5, 17, -1, TERM_WHITE, format(_("モンスター = %d, 名前 = %-40.40s", "Monster = %d, Name = %-40.40s"), r, (r_name + r_ptr->name)));
+ term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3u / %3u", "Default attr/char = %3u / %3u"), da, dc));
+ term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
+ term_queue_bigchar(43, 19, da, dc, 0, 0);
+ term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3u / %3u", "Current attr/char = %3u / %3u"), ca, cc));
+ term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
+ term_queue_bigchar(43, 20, ca, cc, 0, 0);
+ term_putstr(0, 22, -1, TERM_WHITE, _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "));
i = inkey();
if (i == ESCAPE)
break;
break;
case 'v':
do_cmd_knowledge_monsters(creature_ptr, &need_redraw, TRUE, r);
- Term_clear();
+ term_clear();
print_visuals_menu(choice_msg);
break;
}
TERM_COLOR ca = k_ptr->x_attr;
SYMBOL_CODE cc = k_ptr->x_char;
- Term_putstr(5, 17, -1, TERM_WHITE,
+ term_putstr(5, 17, -1, TERM_WHITE,
format(
_("アイテム = %d, 名前 = %-40.40s", "Object = %d, Name = %-40.40s"), k, k_name + (!k_ptr->flavor ? k_ptr->name : k_ptr->flavor_name)));
- Term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), da, dc));
- Term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
- Term_queue_bigchar(43, 19, da, dc, 0, 0);
- Term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), ca, cc));
- Term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
- Term_queue_bigchar(43, 20, ca, cc, 0, 0);
- Term_putstr(0, 22, -1, TERM_WHITE, _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "));
+ term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), da, dc));
+ term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
+ term_queue_bigchar(43, 19, da, dc, 0, 0);
+ term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), ca, cc));
+ term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
+ term_queue_bigchar(43, 20, ca, cc, 0, 0);
+ term_putstr(0, 22, -1, TERM_WHITE, _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "));
i = inkey();
if (i == ESCAPE)
break;
case 'v':
do_cmd_knowledge_objects(creature_ptr, &need_redraw, TRUE, k);
- Term_clear();
+ term_clear();
print_visuals_menu(choice_msg);
break;
}
byte cc = f_ptr->x_char[lighting_level];
prt("", 17, 5);
- Term_putstr(5, 17, -1, TERM_WHITE,
+ term_putstr(5, 17, -1, TERM_WHITE,
format(_("地形 = %d, 名前 = %s, 明度 = %s", "Terrain = %d, Name = %s, Lighting = %s"), f, (f_name + f_ptr->name),
lighting_level_str[lighting_level]));
- Term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), da, dc));
- Term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
- Term_queue_bigchar(43, 19, da, dc, 0, 0);
- Term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), ca, cc));
- Term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
- Term_queue_bigchar(43, 20, ca, cc, 0, 0);
- Term_putstr(0, 22, -1, TERM_WHITE,
+ term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), da, dc));
+ term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
+ term_queue_bigchar(43, 19, da, dc, 0, 0);
+ term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), ca, cc));
+ term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
+ term_queue_bigchar(43, 20, ca, cc, 0, 0);
+ term_putstr(0, 22, -1, TERM_WHITE,
_("コマンド (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): "));
i = inkey();
break;
case 'v':
do_cmd_knowledge_features(&need_redraw, TRUE, f, &lighting_level);
- Term_clear();
+ term_clear();
print_visuals_menu(choice_msg);
break;
}
/* Draw, Hilite, Fresh, Pause, Erase */
print_rel(shooter_ptr, c, a, ny, nx);
move_cursor_relative(ny, nx);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
lite_spot(shooter_ptr, ny, nx);
- Term_fresh();
+ term_fresh();
}
/* The player cannot see the missile */
else {
/* Pause anyway, for consistancy */
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
/* Sniper */
lite_spot(shooter_ptr, ny, nx);
lite_spot(shooter_ptr, oy, ox);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
x = nx;
y = ny;
byte color = TERM_YELLOW;
int y, x;
- Term_locate(&x, &y);
+ term_locate(&x, &y);
if (len < 1)
len = 1;
if ((x < 0) || (x >= 80))
int pos = 0;
while (TRUE) {
- Term_erase(x, y, len);
- Term_putstr(x, y, -1, color, buf);
+ term_erase(x, y, len);
+ term_putstr(x, y, -1, color, buf);
- Term_gotoxy(x + pos, y);
+ term_gotoxy(x + pos, y);
int skey = inkey_special(numpad_cursor);
switch (skey) {
print_tomb(player_ptr);
flush();
show_death_info(player_ptr, update_playtime, display_player);
- Term_clear();
+ term_clear();
if (check_score(player_ptr)) {
send_world_score_on_closing(player_ptr, do_send);
if (!player_ptr->wait_report_score)
player_ptr->hack_mutation = FALSE;
current_world_ptr->character_icky = TRUE;
- Term_activate(angband_term[0]);
+ term_activate(angband_term[0]);
angband_term[0]->resize_hook = resize_map;
for (MONSTER_IDX i = 1; i < 8; i++) {
if (angband_term[i]) {
}
}
- (void)Term_set_cursor(0);
+ (void)term_set_cursor(0);
if (!load_player(player_ptr)) {
quit(_("セーブファイルが壊れています", "broken savefile"));
}
set_floor_and_wall(player_ptr->dungeon_idx);
flavor_init();
prt(_("お待ち下さい...", "Please wait..."), 0, 0);
- Term_fresh();
+ term_fresh();
if (arg_wizard) {
if (enter_wizard_mode(player_ptr)) {
player_outfit(player_ptr);
}
- Term_xtra(TERM_XTRA_REACT, 0);
+ term_xtra(TERM_XTRA_REACT, 0);
player_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
player_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
static void process_fishing(player_type *creature_ptr)
{
- Term_xtra(TERM_XTRA_DELAY, 10);
+ term_xtra(TERM_XTRA_DELAY, 10);
if (one_in_(1000)) {
MONRACE_IDX r_idx;
bool success = FALSE;
handle_stuff(creature_ptr);
move_cursor_relative(creature_ptr->y, creature_ptr->x);
if (fresh_before)
- Term_fresh();
+ term_fresh();
pack_overflow(creature_ptr);
if (!command_new)
TERM_LEN wid, hgt, per_screen;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
per_screen = (hgt - 4) / 4;
/* Paranoia -- it may not have opened */
/* Show per_screen per page, until "done" */
for (k = from, place = k+1; k < i; k += per_screen)
{
- Term_clear();
+ term_clear();
/* Title */
put_str(_(" 変愚蛮怒: 勇者の殿堂", " Hengband Hall of Fame"), 0, 0);
/* Paranoia -- No score file */
if (highscore_fd < 0) quit(_("スコア・ファイルが使用できません。", "Score file unavailable."));
- Term_clear();
+ term_clear();
/* Display the scores */
display_scores_aux(from, to, -1, NULL);
errr err;
prt("", 0, 0);
prt(_("送信中..", "Sending..."), 0, 0);
- Term_fresh();
+ term_fresh();
screen_save();
err = report_score(current_player_ptr, update_playtime, display_player);
screen_load();
/* Restore the level */
winner_ptr->lev = winner_ptr->max_plv;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
cy = hgt / 2;
cx = wid / 2;
/* Hack -- Instant Gold */
winner_ptr->au += 10000000L;
- Term_clear();
+ term_clear();
/* Display a crown */
put_str("#", cy - 11, cx - 1);
*/
bool check_score(player_type *current_player_ptr)
{
- Term_clear();
+ term_clear();
/* No score file */
if (highscore_fd < 0)
}
int cx = 0;
- Term_gotoxy(cx, cy);
+ term_gotoxy(cx, cy);
static const char tag_str[] = "[[[[";
byte color = TERM_WHITE;
if (bracketcol < endcol) endcol = bracketcol;
if (showercol < endcol) endcol = showercol;
- Term_addstr(endcol, color, &str[i]);
+ term_addstr(endcol, color, &str[i]);
cx += endcol;
i += endcol;
if (shower && endcol == showercol)
{
int showerlen = strlen(shower);
- Term_addstr(showerlen, TERM_YELLOW, &str[i]);
+ term_addstr(showerlen, TERM_YELLOW, &str[i]);
cx += showerlen;
i += showerlen;
continue;
if (color == 255 || str[i + 1] == '\0')
{
color = TERM_WHITE;
- Term_addstr(-1, TERM_WHITE, tag_str);
+ term_addstr(-1, TERM_WHITE, tag_str);
cx += sizeof(tag_str) - 1;
continue;
}
i++;
}
- Term_erase(cx, cy, 255);
+ term_erase(cx, cy, 255);
}
bool show_file(player_type *creature_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
{
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
char finder_str[81];
strcpy(finder_str, "");
if (line == -1)
line = ((size - 1) / rows)*rows;
- Term_clear();
+ term_clear();
concptr find = NULL;
while (TRUE)
while (row_count < rows)
{
- Term_erase(0, row_count + 2, 255);
+ term_erase(0, row_count + 2, 255);
row_count++;
}
p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
handle_stuff(p_ptr);
- Term_redraw();
+ term_redraw();
}
/*!
if (creature_ptr->redraw & (PR_WIPE)) {
creature_ptr->redraw &= ~(PR_WIPE);
msg_print(NULL);
- Term_clear();
+ term_clear();
}
if (creature_ptr->redraw & (PR_MAP)) {
player_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
player_ptr->update |= (PU_COMBINE | PU_REORDER);
handle_stuff(player_ptr);
- Term_fresh();
+ term_fresh();
if (quest_num
&& (is_fixed_quest_idx(quest_num) && !((quest_num == QUEST_OBERON) || (quest_num == QUEST_SERPENT) || !(quest[quest_num].flags & QUEST_FLAG_PRESET))))
move_cursor_relative(player_ptr->y, player_ptr->x);
if (fresh_after)
- Term_fresh();
+ term_fresh();
if (!player_ptr->playing || player_ptr->is_dead)
break;
move_cursor_relative(player_ptr->y, player_ptr->x);
if (fresh_after)
- Term_fresh();
+ term_fresh();
if (!player_ptr->playing || player_ptr->is_dead)
break;
move_cursor_relative(player_ptr->y, player_ptr->x);
if (fresh_after)
- Term_fresh();
+ term_fresh();
if (!player_ptr->playing || player_ptr->is_dead)
break;
TERM_LEN wid, hgt;
char floor_label[52 + 1];
bool dont_need_to_show_weights = TRUE;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
int len = MAX((*min_width), 20);
floor_num = scan_floor_items(owner_ptr, floor_list, y, x, 0x03, item_tester_tval);
floor_type *floor_ptr = owner_ptr->current_floor_ptr;
}
/* Draw the char using the attr */
- Term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, 0, 0);
+ term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, 0, 0);
}
}
}
/* Hack -- Queue it */
- Term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, ta, tc);
+ term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, ta, tc);
/* Update sub-windows */
player_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
{
int grp = grp_idx[grp_top + i];
TERM_COLOR attr = (grp_top + i == grp_cur) ? TERM_L_BLUE : TERM_WHITE;
- Term_erase(col, row + i, wid);
+ term_erase(col, row + i, wid);
c_put_str(attr, group_text[grp], row + i, col);
}
}
{
for (int i = 0; i < height; i++)
{
- Term_erase(col, row + i, width);
+ term_erase(col, row + i, width);
}
if (use_bigtile) width /= 2;
SYMBOL_CODE c = (SYMBOL_CODE)ic;
if (c & 0x80) a |= 0x80;
- Term_queue_bigchar(x, y, a, c, 0, 0);
+ term_queue_bigchar(x, y, a, c, 0, 0);
}
}
}
TERM_LEN y = row + i;
if (use_bigtile) x += j;
- Term_gotoxy(x, y);
+ term_gotoxy(x, y);
}
{
int browser_rows;
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
browser_rows = hgt - 8;
if (!col)
{
TERM_LEN x;
for (x = 0; x < 79; x++)
{
- (void)(Term_what(x, y, &a, &c));
+ (void)(term_what(x, y, &a, &c));
if (!change_color)
{
buf[x] = c;
{
int ox, oy;
int nx, ny;
- Term_get_size(&ox, &oy);
+ term_get_size(&ox, &oy);
nx = ox;
ny = oy;
ny = y + 1;
if (nx != ox || ny != oy)
- Term_resize(nx, ny);
+ term_resize(nx, ny);
}
static bool flush_ringbuf_client(void)
case 'x':
if (x == TERM_XTRA_CLEAR)
- Term_clear();
+ term_clear();
(void)((*angband_term[0]->xtra_hook)(x, 0));
break;
FD_ZERO(&fdset);
FD_SET(sd, &fdset);
- Term_clear();
- Term_fresh();
- Term_xtra(TERM_XTRA_REACT, 0);
+ term_clear();
+ term_fresh();
+ term_xtra(TERM_XTRA_REACT, 0);
while (TRUE) {
fd_set tmp_fdset;
/* ソケットにデータが来ているかどうか調べる */
select(sd + 1, &tmp_fdset, (fd_set *)NULL, (fd_set *)NULL, &tmp_tv);
if (FD_ISSET(sd, &tmp_fdset) == 0) {
- Term_xtra(TERM_XTRA_FLUSH, 0);
+ term_xtra(TERM_XTRA_FLUSH, 0);
continue;
}
void browse_movie(void)
{
- Term_clear();
- Term_fresh();
- Term_xtra(TERM_XTRA_REACT, 0);
+ term_clear();
+ term_fresh();
+ term_xtra(TERM_XTRA_REACT, 0);
while (read_movie_file() == 0) {
while (fresh_queue.next != fresh_queue.tail) {
if (!flush_ringbuf_client()) {
- Term_xtra(TERM_XTRA_FLUSH, 0);
+ term_xtra(TERM_XTRA_FLUSH, 0);
/* ソケットにデータが来ているかどうか調べる */
#ifdef WINDOWS
void move_cursor_relative(int row, int col)
{
row -= panel_row_prt;
- Term_gotoxy(panel_col_of(col), row);
+ term_gotoxy(panel_col_of(col), row);
}
/*
}
c = '*';
- Term_queue_bigchar(panel_col_of(nx), ny - panel_row_prt, a, c, ta, tc);
+ term_queue_bigchar(panel_col_of(nx), ny - panel_row_prt, a, c, ta, tc);
}
if ((g_ptr->info & CAVE_MARK) && !cave_have_flag_grid(g_ptr, FF_PROJECT))
while (TRUE) {
char ch;
- if (Term_inkey(&ch, FALSE, TRUE))
+ if (term_inkey(&ch, FALSE, TRUE))
break;
if (ch == 0)
break;
*
* This function does almost all of the "macro" processing.
*
- * We use the "Term_key_push()" function to handle "failed" macros, as well
+ * We use the "term_key_push()" function to handle "failed" macros, as well
* as "extra" keys read in while choosing the proper macro, and also to hold
* the action for the macro, plus a special "ascii 30" character indicating
* that any macro action in progress is complete. Embedded macros are thus
num_more = 0;
if (parse_macro) {
- if (Term_inkey(&ch, FALSE, TRUE)) {
+ if (term_inkey(&ch, FALSE, TRUE)) {
parse_macro = FALSE;
}
} else {
- (void)(Term_inkey(&ch, TRUE, TRUE));
+ (void)(term_inkey(&ch, TRUE, TRUE));
}
if (ch == 30)
if (k < 0)
break;
- if (0 == Term_inkey(&ch, FALSE, TRUE)) {
+ if (0 == term_inkey(&ch, FALSE, TRUE)) {
buf[p++] = ch;
buf[p] = '\0';
w = 0;
if (w >= 10)
break;
- Term_xtra(TERM_XTRA_DELAY, w);
+ term_xtra(TERM_XTRA_DELAY, w);
}
}
k = macro_find_ready(buf);
if (k < 0) {
while (p > 0) {
- if (Term_key_push(buf[--p]))
+ if (term_key_push(buf[--p]))
return 0;
}
- (void)Term_inkey(&ch, TRUE, TRUE);
+ (void)term_inkey(&ch, TRUE, TRUE);
return (ch);
}
concptr pat = macro__pat[k];
n = strlen(pat);
while (p > n) {
- if (Term_key_push(buf[--p]))
+ if (term_key_push(buf[--p]))
return 0;
}
parse_macro = TRUE;
- if (Term_key_push(30))
+ if (term_key_push(30))
return 0;
concptr act = macro__act[k];
n = strlen(act);
while (n > 0) {
- if (Term_key_push(act[--n]))
+ if (term_key_push(act[--n]))
return 0;
}
if (inkey_xtra) {
parse_macro = FALSE;
parse_under = FALSE;
- Term_flush();
+ term_flush();
}
int v;
- (void)Term_get_cursor(&v);
+ (void)term_get_cursor(&v);
/* Show the cursor if waiting, except sometimes in "command" mode */
if (!inkey_scan && (!inkey_flag || hilite_player || current_world_ptr->character_icky)) {
- (void)Term_set_cursor(1);
+ (void)term_set_cursor(1);
}
- Term_activate(angband_term[0]);
+ term_activate(angband_term[0]);
char kk;
while (!ch) {
- if (!inkey_base && inkey_scan && (0 != Term_inkey(&kk, FALSE, FALSE))) {
+ if (!inkey_base && inkey_scan && (0 != term_inkey(&kk, FALSE, FALSE))) {
break;
}
- if (!done && (0 != Term_inkey(&kk, FALSE, FALSE))) {
- Term_activate(old);
- Term_fresh();
- Term_activate(angband_term[0]);
+ if (!done && (0 != term_inkey(&kk, FALSE, FALSE))) {
+ term_activate(old);
+ term_fresh();
+ term_activate(angband_term[0]);
current_world_ptr->character_saved = FALSE;
signal_count = 0;
if (inkey_base) {
int w = 0;
if (!inkey_scan) {
- if (0 == Term_inkey(&ch, TRUE, TRUE)) {
+ if (0 == term_inkey(&ch, TRUE, TRUE)) {
break;
}
}
while (TRUE) {
- if (0 == Term_inkey(&ch, FALSE, TRUE)) {
+ if (0 == term_inkey(&ch, FALSE, TRUE)) {
break;
} else {
w += 10;
if (w >= 100)
break;
- Term_xtra(TERM_XTRA_DELAY, w);
+ term_xtra(TERM_XTRA_DELAY, w);
}
}
}
}
- Term_activate(old);
- Term_set_cursor(v);
+ term_activate(old);
+ term_set_cursor(v);
inkey_base = inkey_xtra = inkey_flag = inkey_scan = FALSE;
return (ch);
}
break;
}
case '!': {
- (void)Term_user(0);
+ (void)term_user(0);
break;
}
case '"': {
};
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
/* Alloc buffer */
BUF *screen_buf;
int rv, gv, bv;
concptr cc = NULL;
/* Get the attr/char */
- (void)(Term_what(x, y, &a, &c));
+ (void)(term_what(x, y, &a, &c));
switch (c)
{
}
#endif
- Term_clear();
+ term_clear();
int sd;
while (TRUE)
#else
prt("connecting...", 0, 0);
#endif
- Term_fresh();
+ term_fresh();
/* プロキシを設定する */
set_proxy(HTTP_PROXY, HTTP_PROXY_PORT);
#else
prt("Sending the score...", 0, 0);
#endif
- Term_fresh();
+ term_fresh();
if (!http_post(sd, SCORE_PATH, score)) {
disconnect_server(sd);
p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
handle_stuff(p_ptr);
- Term_redraw();
+ term_redraw();
if (can_save)
move_cursor_relative(p_ptr->y, p_ptr->x);
- Term_fresh();
+ term_fresh();
}
/*!
*/
void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p)
{
- Term_get_size(wid_p, hgt_p);
+ term_get_size(wid_p, hgt_p);
*hgt_p -= ROW_MAP + 2;
*wid_p -= COL_MAP + 2;
if (use_bigtile)
{
(void)signal(sig, SIG_IGN);
#ifdef SIGSTOP
- Term_fresh();
- Term_xtra(TERM_XTRA_ALIVE, 0);
+ term_fresh();
+ term_xtra(TERM_XTRA_ALIVE, 0);
(void)kill(0, SIGSTOP);
- Term_xtra(TERM_XTRA_ALIVE, 1);
- Term_redraw();
- Term_fresh();
+ term_xtra(TERM_XTRA_ALIVE, 1);
+ term_redraw();
+ term_fresh();
#endif
(void)signal(sig, handle_signal_suspend);
}
close_game(p_ptr);
quit(_("強制終了", "interrupt"));
} else if (signal_count >= 4) {
- Term_xtra(TERM_XTRA_NOISE, 0);
- Term_erase(0, 0, 255);
- Term_putstr(0, 0, -1, TERM_WHITE, _("熟慮の上の自殺!", "Contemplating suicide!"));
- Term_fresh();
+ term_xtra(TERM_XTRA_NOISE, 0);
+ term_erase(0, 0, 255);
+ term_putstr(0, 0, -1, TERM_WHITE, _("熟慮の上の自殺!", "Contemplating suicide!"));
+ term_fresh();
} else if (signal_count >= 2) {
- Term_xtra(TERM_XTRA_NOISE, 0);
+ term_xtra(TERM_XTRA_NOISE, 0);
}
(void)signal(sig, handle_signal_simple);
static void handle_signal_abort(int sig)
{
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
(void)signal(sig, SIG_IGN);
if (!current_world_ptr->character_generated || current_world_ptr->character_saved)
forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
- Term_erase(0, hgt - 1, 255);
- Term_putstr(0, hgt - 1, -1, TERM_RED, _("恐ろしいソフトのバグが飛びかかってきた!", "A gruesome software bug LEAPS out at you!"));
+ term_erase(0, hgt - 1, 255);
+ term_putstr(0, hgt - 1, -1, TERM_RED, _("恐ろしいソフトのバグが飛びかかってきた!", "A gruesome software bug LEAPS out at you!"));
- Term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ...", "Panic save..."));
+ term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ...", "Panic save..."));
exe_write_diary(p_ptr, DIARY_GAMESTART, 0, _("----ゲーム異常終了----", "-- Tried Panic Save and Aborted Game --"));
- Term_fresh();
+ term_fresh();
p_ptr->panic_save = 1;
(void)strcpy(p_ptr->died_from, _("(緊急セーブ)", "(panic save)"));
signals_ignore_tstp();
if (save_player(p_ptr)) {
- Term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ成功!", "Panic save succeeded!"));
+ term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ成功!", "Panic save succeeded!"));
} else {
- Term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ失敗!", "Panic save failed!"));
+ term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ失敗!", "Panic save failed!"));
}
- Term_fresh();
+ term_fresh();
quit(_("ソフトのバグ", "software bug"));
}
screen_roff(subject_ptr, m_ptr->ap_r_idx, 0);
/* Hack -- Complete the prompt (again) */
- Term_addstr(-1, TERM_WHITE, format(_(" [r思 %s%s]", " [r,%s%s]"), x_info, info));
+ term_addstr(-1, TERM_WHITE, format(_(" [r思 %s%s]", " [r,%s%s]"), x_info, info));
query = inkey();
c_prt(attr, format("%d", f_idx), row_i, f_idx_col);
}
- Term_queue_bigchar(lit_col[F_LIT_STANDARD], row_i, f_ptr->x_attr[F_LIT_STANDARD], f_ptr->x_char[F_LIT_STANDARD], 0, 0);
- Term_putch(lit_col[F_LIT_NS_BEGIN], row_i, TERM_SLATE, '(');
+ term_queue_bigchar(lit_col[F_LIT_STANDARD], row_i, f_ptr->x_attr[F_LIT_STANDARD], f_ptr->x_char[F_LIT_STANDARD], 0, 0);
+ term_putch(lit_col[F_LIT_NS_BEGIN], row_i, TERM_SLATE, '(');
for (int j = F_LIT_NS_BEGIN + 1; j < F_LIT_MAX; j++)
{
- Term_putch(lit_col[j], row_i, TERM_SLATE, '/');
+ term_putch(lit_col[j], row_i, TERM_SLATE, '/');
}
- Term_putch(lit_col[F_LIT_MAX - 1] + (use_bigtile ? 3 : 2), row_i, TERM_SLATE, ')');
+ term_putch(lit_col[F_LIT_MAX - 1] + (use_bigtile ? 3 : 2), row_i, TERM_SLATE, ')');
for (int j = F_LIT_NS_BEGIN; j < F_LIT_MAX; j++)
{
- Term_queue_bigchar(lit_col[j] + 1, row_i, f_ptr->x_attr[j], f_ptr->x_char[j], 0, 0);
+ term_queue_bigchar(lit_col[j] + 1, row_i, f_ptr->x_attr[j], f_ptr->x_char[j], 0, 0);
}
}
for (; i < per_page; i++)
{
- Term_erase(col, row + i, 255);
+ term_erase(col, row + i, 255);
}
}
(void)C_WIPE(char_old, F_LIT_MAX, SYMBOL_CODE);
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
FEAT_IDX *feat_idx;
C_MAKE(feat_idx, max_f_idx, FEAT_IDX);
for (FEAT_IDX i = 0; i < 78; i++)
{
- Term_putch(i, 5, TERM_WHITE, '=');
+ term_putch(i, 5, TERM_WHITE, '=');
}
if (direct_f_idx < 0)
{
for (FEAT_IDX i = 0; i < browser_rows; i++)
{
- Term_putch(max + 1, 6 + i, TERM_WHITE, '|');
+ term_putch(max + 1, 6 + i, TERM_WHITE, '|');
}
}
}
else if (!column)
{
- Term_gotoxy(0, 6 + (grp_cur - grp_top));
+ term_gotoxy(0, 6 + (grp_cur - grp_top));
}
else
{
- Term_gotoxy(max + 3, 6 + (feat_cur - feat_top));
+ term_gotoxy(max + 3, 6 + (feat_cur - feat_top));
}
ch = inkey();
a = flavor_k_ptr->x_attr;
c = flavor_k_ptr->x_char;
- Term_queue_bigchar(use_bigtile ? 76 : 77, row + i, a, c, 0, 0);
+ term_queue_bigchar(use_bigtile ? 76 : 77, row + i, a, c, 0, 0);
}
for (; i < per_page; i++) {
- Term_erase(col, row + i, 255);
+ term_erase(col, row + i, 255);
}
}
byte mode;
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
int browser_rows = hgt - 8;
C_MAKE(object_idx, max_k_idx, KIND_OBJECT_IDX);
#endif
for (IDX i = 0; i < 78; i++) {
- Term_putch(i, 5, TERM_WHITE, '=');
+ term_putch(i, 5, TERM_WHITE, '=');
}
if (direct_k_idx < 0) {
for (IDX i = 0; i < browser_rows; i++) {
- Term_putch(max + 1, 6 + i, TERM_WHITE, '|');
+ term_putch(max + 1, 6 + i, TERM_WHITE, '|');
}
}
if (visual_list) {
place_visual_list_cursor(max + 3, 7, flavor_k_ptr->x_attr, flavor_k_ptr->x_char, attr_top, char_left);
} else if (!column) {
- Term_gotoxy(0, 6 + (grp_cur - grp_top));
+ term_gotoxy(0, 6 + (grp_cur - grp_top));
} else {
- Term_gotoxy(max + 3, 6 + (object_cur - object_top));
+ term_gotoxy(max + 3, 6 + (object_cur - object_top));
}
char ch = inkey();
c_prt(attr, format("%d", r_idx), row + i, 62);
}
- Term_erase(69, row + i, 255);
- Term_queue_bigchar(use_bigtile ? 69 : 70, row + i, r_ptr->x_attr, r_ptr->x_char, 0, 0);
+ term_erase(69, row + i, 255);
+ term_queue_bigchar(use_bigtile ? 69 : 70, row + i, r_ptr->x_attr, r_ptr->x_char, 0, 0);
if (!visual_only)
{
if (!(r_ptr->flags1 & RF1_UNIQUE))
for (; i < per_page; i++)
{
- Term_erase(col, row + i, 255);
+ term_erase(col, row + i, 255);
}
}
void do_cmd_knowledge_monsters(player_type *creature_ptr, bool *need_redraw, bool visual_only, IDX direct_r_idx)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
IDX *mon_idx;
C_MAKE(mon_idx, max_r_idx, MONRACE_IDX);
for (IDX i = 0; i < 78; i++)
{
- Term_putch(i, 5, TERM_WHITE, '=');
+ term_putch(i, 5, TERM_WHITE, '=');
}
if (direct_r_idx < 0)
{
for (IDX i = 0; i < browser_rows; i++)
{
- Term_putch(max + 1, 6 + i, TERM_WHITE, '|');
+ term_putch(max + 1, 6 + i, TERM_WHITE, '|');
}
}
}
else if (!column)
{
- Term_gotoxy(0, 6 + (grp_cur - grp_top));
+ term_gotoxy(0, 6 + (grp_cur - grp_top));
}
else
{
- Term_gotoxy(max + 3, 6 + (mon_cur - mon_top));
+ term_gotoxy(max + 3, 6 + (mon_cur - mon_top));
}
char ch = inkey();
return;
}
- Term_activate(&td->t);
- Term_redraw();
- Term_activate(term_screen);
+ term_activate(&td->t);
+ term_redraw();
+ term_activate(term_screen);
}
void term_inversed_area(HWND hWnd, int x, int y, int w, int h)
term *old = Term;
term_data *td = &data[i];
if ((td->cols != td->t.wid) || (td->rows != td->t.hgt)) {
- Term_activate(&td->t);
- Term_resize(td->cols, td->rows);
- Term_redraw();
- Term_activate(old);
+ term_activate(&td->t);
+ term_resize(td->cols, td->rows);
+ term_redraw();
+ term_activate(old);
}
}
}
term_curs_win(player_ptr->x - min_x, player_ptr->y - min_y);
- Term_inkey(&c, TRUE, TRUE);
- Term_flush();
+ term_inkey(&c, TRUE, TRUE);
+ term_flush();
td->map_active = FALSE;
term_xtra_win_clear();
- Term_redraw();
+ term_redraw();
}
/*
plog(_("プレイ中は新しいゲームを始めることができません!", "You can't start a new game while you're still playing!"));
} else {
game_in_progress = TRUE;
- Term_flush();
+ term_flush();
play_game(player_ptr, TRUE);
quit(NULL);
}
if (GetOpenFileName(&ofn)) {
validate_file(savefile);
game_in_progress = TRUE;
- Term_flush();
+ term_flush();
play_game(player_ptr, FALSE);
quit(NULL);
}
forget_view(player_ptr->current_floor_ptr);
clear_mon_lite(player_ptr->current_floor_ptr);
- Term_key_push(SPECIAL_KEY_QUIT);
+ term_key_push(SPECIAL_KEY_QUIT);
break;
}
msg_print("Score file unavailable.");
} else {
screen_save();
- Term_clear();
+ term_clear();
display_scores_aux(0, MAX_HISCORES, -1, NULL);
(void)fd_close(highscore_fd);
highscore_fd = -1;
screen_load();
- Term_fresh();
+ term_fresh();
}
break;
if (arg_graphics != GRAPHICS_NONE) {
arg_graphics = GRAPHICS_NONE;
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
}
break;
if (arg_graphics != GRAPHICS_ORIGINAL) {
arg_graphics = GRAPHICS_ORIGINAL;
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
}
break;
if (arg_graphics != GRAPHICS_ADAM_BOLT) {
arg_graphics = GRAPHICS_ADAM_BOLT;
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
}
break;
if (arg_graphics != GRAPHICS_HENGBAND) {
arg_graphics = GRAPHICS_HENGBAND;
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
}
break;
}
arg_bigtile = !arg_bigtile;
- Term_activate(&td->t);
- Term_resize(td->cols, td->rows);
+ term_activate(&td->t);
+ term_resize(td->cols, td->rows);
InvalidateRect(td->w, NULL, TRUE);
break;
}
arg_music = !arg_music;
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
break;
}
case IDM_OPTIONS_SOUND: {
arg_sound = !arg_sound;
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
break;
}
case IDM_OPTIONS_BG: {
use_bg = !use_bg;
init_bg();
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
break;
}
case IDM_OPTIONS_OPEN_BG: {
}
term_xtra_win_react(player_ptr);
- Term_key_push(KTRL('R'));
+ term_key_push(KTRL('R'));
break;
}
case IDM_DUMP_SCREEN_HTML: {
bool ext_key = (lParam & 0x1000000L) ? TRUE : FALSE;
bool numpad = FALSE;
- Term_keypress(31);
+ term_keypress(31);
if (mc)
- Term_keypress('C');
+ term_keypress('C');
if (ms)
- Term_keypress('S');
+ term_keypress('S');
if (ma)
- Term_keypress('A');
+ term_keypress('A');
int i = LOBYTE(HIWORD(lParam));
- Term_keypress('x');
+ term_keypress('x');
switch (wParam) {
case VK_DIVIDE:
term_no_press = TRUE;
}
if (numpad)
- Term_keypress('K');
+ term_keypress('K');
- Term_keypress(hexsym[i / 16]);
- Term_keypress(hexsym[i % 16]);
- Term_keypress(13);
+ term_keypress(hexsym[i / 16]);
+ term_keypress(hexsym[i % 16]);
+ term_keypress(13);
return 1;
}
if (term_no_press)
term_no_press = FALSE;
else
- Term_keypress(wParam);
+ term_keypress(wParam);
return 0;
}
case WM_LBUTTONDOWN: {
EmptyClipboard();
SetClipboardData(CF_TEXT, hGlobal);
CloseClipboard();
- Term_redraw();
+ term_redraw();
return 0;
}
case WM_MOUSEMOVE: {
forget_lite(p_ptr->current_floor_ptr);
forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
- Term_key_push(SPECIAL_KEY_QUIT);
+ term_key_push(SPECIAL_KEY_QUIT);
return 0;
}
case WM_QUERYENDSESSION: {
normsize.y = td->rows;
}
- Term_activate(&td->t);
- Term_resize(td->cols, td->rows);
+ term_activate(&td->t);
+ term_resize(td->cols, td->rows);
InvalidateRect(td->w, NULL, TRUE);
}
term *old_term = Term;
td->cols = cols;
td->rows = rows;
- Term_activate(&td->t);
- Term_resize(td->cols, td->rows);
- Term_activate(old_term);
+ term_activate(&td->t);
+ term_resize(td->cols, td->rows);
+ term_activate(old_term);
InvalidateRect(td->w, NULL, TRUE);
p_ptr->window = 0xFFFFFFFF;
handle_stuff(p_ptr);
if (term_no_press)
term_no_press = FALSE;
else
- Term_keypress(wParam);
+ term_keypress(wParam);
return 0;
}
case WM_PALETTECHANGED: {
}
signals_init();
- Term_activate(term_screen);
+ term_activate(term_screen);
init_angband(p_ptr, process_autopick_file_command);
initialized = TRUE;
#ifdef CHUUKEI
#endif
prt(_("[ファイル] メニューの [新規] または [開く] を選択してください。", "[Choose 'New' or 'Open' from the 'File' menu]"), 23, _(8, 17));
- Term_fresh();
+ term_fresh();
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
*/
static void init_note(concptr str)
{
- Term_erase(0, 23, 255);
- Term_putstr(20, 23, -1, TERM_WHITE, str);
- Term_fresh();
+ term_erase(0, 23, 255);
+ term_putstr(20, 23, -1, TERM_WHITE, str);
+ term_fresh();
}
* be available when this function is called is the "z-term.c"
* package, and that may not be fully initialized until the
* end of this function, when the default "user pref files"
- * are loaded and "Term_xtra(TERM_XTRA_REACT,0)" is called.
+ * are loaded and "term_xtra(TERM_XTRA_REACT,0)" is called.
* Note that this function attempts to verify the "news" file,
* and the game aborts (cleanly) on failure, since without the
* "news" file, it is likely that the "lib" folder has not been
(void)fd_close(fd);
/*** Display the "news" file ***/
- Term_clear();
+ term_clear();
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
/* Open the News file */
while (0 == angband_fgets(fp, buf, sizeof(buf)))
{
/* Display and advance */
- Term_putstr(0, i++, -1, TERM_WHITE, buf);
+ term_putstr(0, i++, -1, TERM_WHITE, buf);
}
angband_fclose(fp);
}
- Term_flush();
+ term_flush();
/*** Verify (or create) the "high score" file ***/
path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
*/
void bell(void)
{
- Term_fresh();
+ term_fresh();
if (ring_bell)
- Term_xtra(TERM_XTRA_NOISE, 0);
+ term_xtra(TERM_XTRA_NOISE, 0);
flush();
}
if (!use_sound)
return;
- Term_xtra(TERM_XTRA_SOUND, val);
+ term_xtra(TERM_XTRA_SOUND, val);
}
/*
if (!use_music)
return 1;
- return Term_xtra(type, val);
+ return term_xtra(type, val);
}
/*
while (notpicked) {
r_idx = who[i];
roff_top(r_idx);
- Term_addstr(-1, TERM_WHITE, _(" ['r'思い出, ' 'で続行, ESC]", " [(r)ecall, ESC, space to continue]"));
+ term_addstr(-1, TERM_WHITE, _(" ['r'思い出, ' 'で続行, ESC]", " [(r)ecall, ESC, space to continue]"));
while (TRUE) {
if (recall) {
lore_do_probe(player_ptr, r_idx);
byte action_color;
char tmp_str[80];
- Term_clear();
+ term_clear();
sprintf(tmp_str, "%s (%s) %35s", bldg->owner_name, bldg->owner_race, bldg->name);
prt(tmp_str, 2, 1);
u16b p = bolt_pict(y, x, y, x, GF_MANA);
print_rel(caster_ptr, PICT_C(p), PICT_A(p), y, x);
move_cursor_relative(y, x);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
}
}
}
sprintf(psi_desc, " %c) %-30s%2d %4d",
I2A(i), spell.name, spell.min_lev, spell.mana_cost);
- Term_putstr(x, y + i + 1, -1, TERM_WHITE, psi_desc);
+ term_putstr(x, y + i + 1, -1, TERM_WHITE, psi_desc);
}
return;
}
/* Dump the spells */
for (i = 0; i < MAX_SNIPE_POWERS; i++)
{
- Term_erase(x, y + i + 1, 255);
+ term_erase(x, y + i + 1, 255);
/* Access the spell */
spell = snipe_powers[i];
}
/* Clear lines, position cursor (really should use strlen here) */
- Term_erase(12, 22, 255);
- Term_erase(12, 21, 255);
- Term_erase(12, 20, 255);
- Term_erase(12, 19, 255);
- Term_erase(12, 18, 255);
+ term_erase(12, 22, 255);
+ term_erase(12, 21, 255);
+ term_erase(12, 20, 255);
+ term_erase(12, 19, 255);
+ term_erase(12, 18, 255);
shape_buffer(snipe_tips[n], 62, temp, sizeof(temp));
for(j = 0, line = 19; temp[j]; j += (1 + strlen(&temp[j])))
}
/* Clear lines, position cursor (really should use strlen here) */
- Term_erase(12, 21, 255);
- Term_erase(12, 20, 255);
- Term_erase(12, 19, 255);
- Term_erase(12, 18, 255);
- Term_erase(12, 17, 255);
- Term_erase(12, 16, 255);
+ term_erase(12, 21, 255);
+ term_erase(12, 20, 255);
+ term_erase(12, 19, 255);
+ term_erase(12, 18, 255);
+ term_erase(12, 17, 255);
+ term_erase(12, 16, 255);
shape_buffer(mind_tips[use_mind][n], 62, temp, sizeof(temp));
for(j=0, line = 17;temp[j];j+=(1+strlen(&temp[j])))
reset_target(m_ptr);
handle_stuff(target_ptr);
- if (vs_player) Term_xtra(TERM_XTRA_DELAY, 500);
+ if (vs_player) term_xtra(TERM_XTRA_DELAY, 500);
}
target_ptr->redraw |= (PR_MAP);
screen_save();
int wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
if (!(mode & SCROBJ_FAKE_OBJECT))
describe_flavor(player_ptr, o_name, o_ptr, 0);
monster_race *r_ptr = &r_info[o_ptr->pval];
int namelen = strlen(r_name + r_ptr->name);
prt(format("%s: '", r_name + r_ptr->name), 1, 15);
- Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
+ term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
} else {
prt(_(" アイテムの能力:", " Item Attributes:"), 1, 15);
concptr str;
char *str2;
- Term_clear();
+ term_clear();
/* 桜散る */
for (i = 0; i < 40; i++)
- Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "υ");
+ term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "υ");
str = death_message;
if (strncmp(str, "「", 2) == 0)
len = str2 - str;
if (len != 0) {
- Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len, TERM_WHITE, str);
+ term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len, TERM_WHITE, str);
if (str2 == NULL)
break;
i++;
}
/* Hide cursor */
- Term_putstr(w - 1, h - 1, 1, TERM_WHITE, " ");
+ term_putstr(w - 1, h - 1, 1, TERM_WHITE, " ");
flush();
#ifdef WORLD_SCORE
*/
void print_tomb(player_type *dead_ptr)
{
- Term_clear();
+ term_clear();
char buf[1024];
read_dead_file(buf, sizeof(buf));
concptr p = (current_world_ptr->total_winner || (dead_ptr->lev > PY_MAX_LEVEL)) ? _("偉大なる者", "Magnificant")
static bool show_dead_player_items(player_type *creature_ptr)
{
if (creature_ptr->equip_cnt) {
- Term_clear();
+ term_clear();
(void)show_equipment(creature_ptr, 0, USE_FULL, 0);
prt(_("装備していたアイテム: -続く-", "You are using: -more-"), 0, 0);
if (inkey() == ESCAPE)
}
if (creature_ptr->inven_cnt) {
- Term_clear();
+ term_clear();
(void)show_inventory(creature_ptr, 0, USE_FULL, 0);
prt(_("持っていたアイテム: -続く-", "You are carrying: -more-"), 0, 0);
continue;
for (int i = 0, k = 0; i < store_ptr->stock_num; k++) {
- Term_clear();
+ term_clear();
for (int j = 0; (j < 12) && (i < store_ptr->stock_num); j++, i++) {
GAME_TEXT o_name[MAX_NLEN];
char tmp_val[80];
#endif
strcat(tmp, creature_ptr->name);
- Term_erase(34, 1, 255);
+ term_erase(34, 1, 255);
c_put_str(TERM_L_BLUE, tmp, 1, 34);
clear_from(22);
}
if (++y >= 24)
y = 2;
- Term_fresh();
+ term_fresh();
}
/*!
current_world_ptr->z_patch = vvv[2];
current_world_ptr->sf_extra = vvv[3];
- Term_clear();
+ term_clear();
/* Attempt to load */
err = rd_savefile(player_ptr);
caster_ptr->redraw |= (PR_HP);
caster_ptr->window |= (PW_PLAYER);
handle_stuff(caster_ptr);
- Term_fresh();
+ term_fresh();
int msec = delay_factor * delay_factor * delay_factor;
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
return !resist;
}
handle_stuff(caster_ptr);
move_cursor_relative(m_ptr->fy, m_ptr->fx);
inkey();
- Term_erase(0, 0, 255);
+ term_erase(0, 0, 255);
if (lore_do_probe(caster_ptr, m_ptr->r_idx)) {
strcpy(buf, (r_name + r_ptr->name));
#ifdef JP
Term->scr->cu = cu;
Term->scr->cv = cv;
- Term_fresh();
+ term_fresh();
if (probe) {
chg_virtue(caster_ptr, V_KNOWLEDGE, 1);
while (!flag) {
int n = 0;
- Term_erase(x, y, 255);
+ term_erase(x, y, 255);
prt(_(" 名前", " Name"), y, x + 5);
for (spell = 0; spell < 32; spell++) {
if (hex_spelling(caster_ptr, spell)) {
- Term_erase(x, y + n + 1, 255);
+ term_erase(x, y + n + 1, 255);
put_str(format("%c) %s", I2A(n), exe_spell(caster_ptr, REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
sp[n++] = spell;
}
SYMBOL_CODE c = PICT_C(p);
print_rel(caster_ptr, c, a, y, x);
move_cursor_relative(y, x);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
lite_spot(caster_ptr, y, x);
- Term_fresh();
+ term_fresh();
if (flag & (PROJECT_BEAM)) {
p = bolt_pict(y, x, y, x, typ);
a = PICT_A(p);
visual = TRUE;
} else if (visual) {
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
}
c = PICT_C(p);
print_rel(caster_ptr, c, a, y, x);
move_cursor_relative(y, x);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
lite_spot(caster_ptr, y, x);
- Term_fresh();
+ term_fresh();
if (flag & (PROJECT_BEAM)) {
p = bolt_pict(y, x, y, x, typ);
a = PICT_A(p);
visual = TRUE;
} else if (visual) {
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
}
c = PICT_C(p);
print_rel(caster_ptr, c, a, y, x);
move_cursor_relative(y, x);
- Term_fresh();
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
lite_spot(caster_ptr, y, x);
- Term_fresh();
+ term_fresh();
if (flag & (PROJECT_BEAM)) {
p = bolt_pict(y, x, y, x, typ);
a = PICT_A(p);
visual = TRUE;
} else if (visual) {
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
}
}
}
move_cursor_relative(by, bx);
- Term_fresh();
+ term_fresh();
if (visual || drawn) {
- Term_xtra(TERM_XTRA_DELAY, msec);
+ term_xtra(TERM_XTRA_DELAY, msec);
}
}
}
move_cursor_relative(by, bx);
- Term_fresh();
+ term_fresh();
}
}
TERM_COLOR a = object_attr(o_ptr);
SYMBOL_CODE c = object_char(o_ptr);
- Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
+ term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
if (use_bigtile)
cur_col++;
*/
static void display_store(player_type *player_ptr)
{
- Term_clear();
+ term_clear();
if (cur_store_num == STORE_HOME) {
put_str(_("我が家", "Your Home"), 3, 31);
put_str(_("アイテムの一覧", "Item Description"), 5, 4);
break;
}
case '!': {
- (void)Term_user(0);
+ (void)term_user(0);
break;
}
case '"': {
if (player_ptr->wild_mode)
return;
TERM_LEN w, h;
- Term_get_size(&w, &h);
+ term_get_size(&w, &h);
xtra_stock = MIN(14 + 26, ((h > 24) ? (h - 24) : 0));
store_bottom = MIN_STOCK + xtra_stock;
get_com_no_macros = FALSE;
msg_erase();
- Term_clear();
+ term_clear();
player_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
player_ptr->update |= (PU_MONSTERS);
/*
* Move the cursor
*/
-void move_cursor(int row, int col) { Term_gotoxy(col, row); }
+void move_cursor(int row, int col) { term_gotoxy(col, row); }
/*
* Flush all input chars. Actually, remember the flush,
{
msg_print(NULL);
if (screen_depth++ == 0)
- Term_save();
+ term_save();
current_world_ptr->character_icky++;
}
{
msg_print(NULL);
if (--screen_depth == 0)
- Term_load();
+ term_load();
current_world_ptr->character_icky--;
}
* At the given location, using the given attribute, if allowed,
* add the given string. Do not clear the line.
*/
-void c_put_str(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col) { Term_putstr(col, row, -1, attr, str); }
+void c_put_str(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col) { term_putstr(col, row, -1, attr, str); }
/*
* As above, but in "white"
*/
-void put_str(concptr str, TERM_LEN row, TERM_LEN col) { Term_putstr(col, row, -1, TERM_WHITE, str); }
+void put_str(concptr str, TERM_LEN row, TERM_LEN col) { term_putstr(col, row, -1, TERM_WHITE, str); }
/*
* Display a string on the screen using an attribute, and clear
*/
void c_prt(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col)
{
- Term_erase(col, row, 255);
- Term_addstr(-1, attr, str);
+ term_erase(col, row, 255);
+ term_addstr(-1, attr, str);
}
/*
void c_roff(TERM_COLOR a, concptr str)
{
int w, h;
- (void)Term_get_size(&w, &h);
+ (void)term_get_size(&w, &h);
int x, y;
- (void)Term_locate(&x, &y);
+ (void)term_locate(&x, &y);
if (y == h - 1 && x > w - 3)
return;
if (y == h)
break;
- Term_erase(x, y, 255);
+ term_erase(x, y, 255);
break;
}
#endif
{
for (i = w - 2; i >= 0; i--) {
- Term_what(i, y, &av[i], &cv[i]);
+ term_what(i, y, &av[i], &cv[i]);
if (cv[i] == ' ')
break;
/* 現在が全角文字のとき */
/* 文頭が「。」「、」等になるときは、その1つ前の語で改行 */
if (strncmp(s, "。", 2) == 0 || strncmp(s, "、", 2) == 0) {
- Term_what(x, y, &av[x], &cv[x]);
- Term_what(x - 1, y, &av[x - 1], &cv[x - 1]);
- Term_what(x - 2, y, &av[x - 2], &cv[x - 2]);
+ term_what(x, y, &av[x], &cv[x]);
+ term_what(x - 1, y, &av[x - 1], &cv[x - 1]);
+ term_what(x - 2, y, &av[x - 2], &cv[x - 2]);
n = x - 2;
cv[x] = '\0';
}
if (n == 0)
n = w;
- Term_erase(n, y, 255);
+ term_erase(n, y, 255);
x = 0;
y++;
if (y == h)
break;
- Term_erase(x, y, 255);
+ term_erase(x, y, 255);
for (i = n; i < w - 1; i++) {
#ifdef JP
if (cv[i] == '\0')
break;
#endif
- Term_addch(av[i], cv[i]);
+ term_addch(av[i], cv[i]);
if (++x > w)
x = w;
}
}
#ifdef JP
- Term_addch((byte)(a | 0x10), ch);
+ term_addch((byte)(a | 0x10), ch);
#else
- Term_addch(a, ch);
+ term_addch(a, ch);
#endif
#ifdef JP
s++;
x++;
ch = *s;
- Term_addch((byte)(a | 0x20), ch);
+ term_addch((byte)(a | 0x20), ch);
}
#endif
void clear_from(int row)
{
for (int y = row; y < Term->hgt; y++) {
- Term_erase(0, y, 255);
+ term_erase(0, y, 255);
}
}
/*
* Execute the "Term->user_hook" hook, if available (see above).
*/
-errr Term_user(int n)
+errr term_user(int n)
{
/* Verify the hook */
if (!Term->user_hook)
/*
* Execute the "Term->xtra_hook" hook, if available (see above).
*/
-errr Term_xtra(int n, int v)
+errr term_xtra(int n, int v)
{
/* Verify the hook */
if (!Term->xtra_hook)
/*** Fake hooks ***/
/*
- * Fake hook for "Term_curs()" (see above)
+ * Fake hook for "term_curs()" (see above)
*/
-static errr Term_curs_hack(TERM_LEN x, TERM_LEN y)
+static errr term_curs_hack(TERM_LEN x, TERM_LEN y)
{
/* Unused */
(void)x;
}
/*
- * Fake hook for "Term_bigcurs()" (see above)
+ * Fake hook for "term_bigcurs()" (see above)
*/
-static errr Term_bigcurs_hack(TERM_LEN x, TERM_LEN y) { return (*Term->curs_hook)(x, y); }
+static errr term_bigcurs_hack(TERM_LEN x, TERM_LEN y) { return (*Term->curs_hook)(x, y); }
/*
- * Fake hook for "Term_wipe()" (see above)
+ * Fake hook for "term_wipe()" (see above)
*/
-static errr Term_wipe_hack(TERM_LEN x, TERM_LEN y, int n)
+static errr term_wipe_hack(TERM_LEN x, TERM_LEN y, int n)
{
/* Unused */
(void)x;
}
/*
- * Fake hook for "Term_text()" (see above)
+ * Fake hook for "term_text()" (see above)
*/
-static errr Term_text_hack(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr cp)
+static errr term_text_hack(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr cp)
{
/* Unused */
(void)x;
}
/*
- * Fake hook for "Term_pict()" (see above)
+ * Fake hook for "term_pict()" (see above)
*/
-static errr Term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, concptr cp, const TERM_COLOR *tap, concptr tcp)
+static errr term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, concptr cp, const TERM_COLOR *tap, concptr tcp)
{
/* Unused */
(void)x;
* 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, TERM_COLOR a, char c, TERM_COLOR 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;
}
/*
- * Bigtile version of Term_queue_char().
- * If use_bigtile is FALSE, simply call Term_queue_char().
+ * 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, TERM_COLOR a, char c, TERM_COLOR 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
/* If non bigtile mode, call orginal function */
if (!use_bigtile) {
- Term_queue_char(x, y, a, c, ta, tc);
+ term_queue_char(x, y, a, c, ta, tc);
return;
}
}
/* Display pair of attr/char */
- Term_queue_char(x, y, a, c, ta, tc);
- Term_queue_char(x + 1, y, a2, c2, 0, 0);
+ term_queue_char(x, y, a, c, ta, tc);
+ term_queue_char(x + 1, y, a2, c2, 0, 0);
}
/*
* 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, TERM_COLOR *a, char *c, TERM_COLOR *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;
* 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, TERM_COLOR a, concptr s)
+void term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr s)
{
TERM_LEN x1 = -1, x2 = -1;
{
int w, h;
- Term_get_size(&w, &h);
+ term_get_size(&w, &h);
if (x != w && !(scr_aa[x] & AF_TILE1) && (scr_aa[x] & AF_KANJI2)) {
scr_cc[x] = ' ';
scr_aa[x] &= AF_KANJIC;
/*** Refresh routines ***/
/*
- * Flush a row of the current window (see "Term_fresh")
- * Display text using "Term_pict()"
+ * Flush a row of the current window (see "term_fresh")
+ * Display text using "term_pict()"
*/
-static void Term_fresh_row_pict(TERM_LEN y, TERM_LEN x1, TERM_LEN x2)
+static void term_fresh_row_pict(TERM_LEN y, TERM_LEN x1, TERM_LEN x2)
{
TERM_COLOR *old_aa = Term->old->a[y];
char *old_cc = Term->old->c[y];
}
/*
- * Flush a row of the current window (see "Term_fresh")
+ * Flush a row of the current window (see "term_fresh")
*
- * Display text using "Term_text()" and "Term_wipe()",
- * but use "Term_pict()" for high-bit attr/char pairs
+ * Display text using "term_text()" and "term_wipe()",
+ * but use "term_pict()" for high-bit attr/char pairs
*/
-static void Term_fresh_row_both(TERM_LEN y, int x1, int x2)
+static void term_fresh_row_both(TERM_LEN y, int x1, int x2)
{
TERM_COLOR *old_aa = Term->old->a[y];
char *old_cc = Term->old->c[y];
}
/*
- * Flush a row of the current window (see "Term_fresh")
+ * Flush a row of the current window (see "term_fresh")
*
- * Display text using "Term_text()" and "Term_wipe()"
+ * Display text using "term_text()" and "term_wipe()"
*/
-static void Term_fresh_row_text(TERM_LEN y, TERM_LEN x1, TERM_LEN x2)
+static void term_fresh_row_text(TERM_LEN y, TERM_LEN x1, TERM_LEN x2)
{
TERM_COLOR *old_aa = Term->old->a[y];
char *old_cc = Term->old->c[y];
/*
* @brief Actually perform all requested changes to the window
*/
-errr Term_fresh(void)
+errr term_fresh(void)
{
int w = Term->wid;
int h = Term->hgt;
char nc = Term->char_blank;
/* Physically erase the entire window */
- Term_xtra(TERM_XTRA_CLEAR, 0);
+ term_xtra(TERM_XTRA_CLEAR, 0);
/* clear all "cursor" data */
old->cv = old->cu = old->cx = old->cy = 0;
if (tx + 1 < Term->wid && !(old_aa[tx] & AF_TILE1) && iskanji(old_cc[tx]))
csize = 2;
#endif
- /* Use "Term_pict()" always */
+ /* Use "term_pict()" always */
if (Term->always_pict)
(void)((*Term->pict_hook)(tx, ty, csize, &old_aa[tx], &old_cc[tx], &ota, &otc));
- /* Use "Term_pict()" sometimes */
+ /* Use "term_pict()" sometimes */
else if (Term->higher_pict && (old_aa[tx] & AF_TILE1) && (old_cc[tx] & 0x80))
(void)((*Term->pict_hook)(tx, ty, 1, &old_aa[tx], &old_cc[tx], &ota, &otc));
/* Cursor will be invisible */
if (scr->cu || !scr->cv) {
/* Make the cursor invisible */
- Term_xtra(TERM_XTRA_SHAPE, 0);
+ term_xtra(TERM_XTRA_SHAPE, 0);
}
}
/* Flush each "modified" row */
if (x1 <= x2) {
- /* Always use "Term_pict()" */
+ /* Always use "term_pict()" */
if (Term->always_pict) {
/* Flush the row */
- Term_fresh_row_pict(y, x1, x2);
+ term_fresh_row_pict(y, x1, x2);
}
- /* Sometimes use "Term_pict()" */
+ /* Sometimes use "term_pict()" */
else if (Term->higher_pict) {
/* Flush the row */
- Term_fresh_row_both(y, x1, x2);
+ term_fresh_row_both(y, x1, x2);
}
- /* Never use "Term_pict()" */
+ /* Never use "term_pict()" */
else {
/* Flush the row */
- Term_fresh_row_text(y, x1, x2);
+ term_fresh_row_text(y, x1, x2);
}
/* This row is all done */
/* Flush that row (if allowed) */
if (!Term->never_frosh)
- Term_xtra(TERM_XTRA_FROSH, y);
+ term_xtra(TERM_XTRA_FROSH, y);
}
}
(void)((*Term->curs_hook)(w - 1, scr->cy));
/* Make the cursor invisible */
- /* Term_xtra(TERM_XTRA_SHAPE, 0); */
+ /* term_xtra(TERM_XTRA_SHAPE, 0); */
}
/* The cursor is invisible, hide it */
(void)((*Term->curs_hook)(scr->cx, scr->cy));
/* Make the cursor invisible */
- /* Term_xtra(TERM_XTRA_SHAPE, 0); */
+ /* term_xtra(TERM_XTRA_SHAPE, 0); */
}
/* The cursor is visible, display it correctly */
(void)((*Term->curs_hook)(scr->cx, scr->cy));
/* Make the cursor visible */
- Term_xtra(TERM_XTRA_SHAPE, 1);
+ term_xtra(TERM_XTRA_SHAPE, 1);
}
}
old->cy = scr->cy;
/* Actually flush the output */
- Term_xtra(TERM_XTRA_FRESH, 0);
+ term_xtra(TERM_XTRA_FRESH, 0);
return 0;
}
/*
* Set the cursor visibility
*/
-errr Term_set_cursor(int v)
+errr term_set_cursor(int v)
{
/* Already done */
if (Term->scr->cv == v)
*
* Note -- "illegal" requests do not move the cursor.
*/
-errr Term_gotoxy(TERM_LEN x, TERM_LEN y)
+errr term_gotoxy(TERM_LEN x, TERM_LEN y)
{
int w = Term->wid;
int h = Term->hgt;
/*
* At a given location, place an attr/char
* Do not change the cursor position
- * No visual changes until "Term_fresh()".
+ * No visual changes until "term_fresh()".
*/
-errr Term_draw(TERM_LEN x, TERM_LEN y, TERM_COLOR 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;
return (-2);
/* Queue it for later */
- Term_queue_char(x, y, a, c, 0, 0);
+ term_queue_char(x, y, a, c, 0, 0);
return 0;
}
* positive value, future calls to either function will
* return negative ones.
*/
-errr Term_addch(TERM_COLOR a, char c)
+errr term_addch(TERM_COLOR a, char c)
{
TERM_LEN w = Term->wid;
return (-2);
/* Queue the given character for display */
- Term_queue_char(Term->scr->cx, Term->scr->cy, a, c, 0, 0);
+ term_queue_char(Term->scr->cx, Term->scr->cy, a, c, 0, 0);
/* Advance the cursor */
Term->scr->cx++;
}
/*
- * Bigtile version of Term_addch().
+ * Bigtile version of term_addch().
*
- * If use_bigtile is FALSE, simply call Term_addch() .
+ * If use_bigtile is FALSE, simply call term_addch() .
*
* 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(TERM_COLOR a, char c)
+errr term_add_bigch(TERM_COLOR a, char c)
{
if (!use_bigtile)
- return Term_addch(a, c);
+ return term_addch(a, c);
/* Handle "unusable" cursor */
if (Term->scr->cu)
return (-2);
/* Queue the given character for display */
- Term_queue_bigchar(Term->scr->cx, Term->scr->cy, a, c, 0, 0);
+ term_queue_bigchar(Term->scr->cx, Term->scr->cy, a, c, 0, 0);
/* Advance the cursor */
Term->scr->cx += 2;
* positive value, future calls to either function will
* return negative ones.
*/
-errr Term_addstr(int n, TERM_COLOR a, concptr s)
+errr term_addstr(int n, TERM_COLOR a, concptr s)
{
int k;
TERM_LEN w = Term->wid;
res = n = w - Term->scr->cx;
/* Queue the first "n" characters for display */
- Term_queue_chars(Term->scr->cx, Term->scr->cy, n, a, s);
+ term_queue_chars(Term->scr->cx, Term->scr->cy, n, a, s);
/* Advance the cursor */
Term->scr->cx += (byte)n;
/*
* Move to a location and, using an attr, add a char
*/
-errr Term_putch(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c)
+errr term_putch(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c)
{
errr res;
/* Move first */
- if ((res = Term_gotoxy(x, y)) != 0)
+ if ((res = term_gotoxy(x, y)) != 0)
return (res);
/* Then add the char */
- if ((res = Term_addch(a, c)) != 0)
+ if ((res = term_addch(a, c)) != 0)
return (res);
return 0;
/*
* Move to a location and, using an attr, add a string
*/
-errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr s)
+errr term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr s)
{
errr res;
/* Move first */
- if ((res = Term_gotoxy(x, y)) != 0)
+ if ((res = term_gotoxy(x, y)) != 0)
return (res);
/* Then add the string */
- if ((res = Term_addstr(n, a, s)) != 0)
+ if ((res = term_addstr(n, a, s)) != 0)
return (res);
return 0;
/*
* Move to a location and, using an attr, add a string vertically
*/
-errr Term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, concptr s)
+errr term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, concptr s)
{
errr res;
int y0 = y;
for (int i = 0; i < n && s[i] != 0; i++) {
/* Move first */
- if ((res = Term_gotoxy(x, y0)) != 0)
+ if ((res = term_gotoxy(x, y0)) != 0)
return (res);
if (iskanji(s[i])) {
- if ((res = Term_addstr(2, a, &s[i])) != 0)
+ if ((res = term_addstr(2, a, &s[i])) != 0)
return (res);
i++;
y0++;
if (s[i] == 0)
break;
} else {
- if ((res = Term_addstr(1, a, &s[i])) != 0)
+ if ((res = term_addstr(1, a, &s[i])) != 0)
return (res);
y0++;
}
/*
* Place cursor at (x,y), and clear the next "n" chars
*/
-errr Term_erase(TERM_LEN x, TERM_LEN y, int n)
+errr term_erase(TERM_LEN x, TERM_LEN y, int n)
{
TERM_LEN w = Term->wid;
/* int h = Term->hgt; */
char *scr_tcc;
/* Place cursor */
- if (Term_gotoxy(x, y))
+ if (term_gotoxy(x, y))
return -1;
/* Force legal size */
*
* Note the use of the special "total_erase" code
*/
-errr Term_clear(void)
+errr term_clear(void)
{
TERM_LEN w = Term->wid;
TERM_LEN h = Term->hgt;
/*
* Redraw (and refresh) the whole window.
*/
-errr Term_redraw(void)
+errr term_redraw(void)
{
/* Force "total erase" */
Term->total_erase = TRUE;
- Term_fresh();
+ term_fresh();
return 0;
}
/*
* Redraw part of a window.
*/
-errr Term_redraw_section(TERM_LEN x1, TERM_LEN y1, TERM_LEN x2, TERM_LEN y2)
+static errr term_redraw_section(TERM_LEN x1, TERM_LEN y1, TERM_LEN x2, TERM_LEN y2)
{
char *g_ptr;
#endif
}
- Term_fresh();
+ term_fresh();
return 0;
}
/*
* Extract the cursor visibility
*/
-errr Term_get_cursor(int *v)
+errr term_get_cursor(int *v)
{
/* Extract visibility */
(*v) = Term->scr->cv;
/*
* Extract the current window size
*/
-errr Term_get_size(TERM_LEN *w, TERM_LEN *h)
+errr term_get_size(TERM_LEN *w, TERM_LEN *h)
{
/* Access the cursor */
(*w) = Term->wid;
/*
* Extract the current cursor location
*/
-errr Term_locate(TERM_LEN *x, TERM_LEN *y)
+errr term_locate(TERM_LEN *x, TERM_LEN *y)
{
/* Access the cursor */
(*x) = Term->scr->cx;
/*
* At a given location, determine the "current" attr and char
* Note that this refers to what will be on the window after the
- * next call to "Term_fresh()". It may or may not already be there.
+ * next call to "term_fresh()". It may or may not already be there.
*/
-errr Term_what(TERM_LEN x, TERM_LEN y, TERM_COLOR *a, char *c)
+errr term_what(TERM_LEN x, TERM_LEN y, TERM_COLOR *a, char *c)
{
TERM_LEN w = Term->wid;
TERM_LEN h = Term->hgt;
/*
* Flush and forget the input
*/
-errr Term_flush(void)
+errr term_flush(void)
{
/* Flush all events */
- Term_xtra(TERM_XTRA_FLUSH, 0);
+ term_xtra(TERM_XTRA_FLUSH, 0);
/* Forget all keypresses */
Term->key_head = Term->key_tail = 0;
/*
* Add a keypress to the "queue"
*/
-errr Term_keypress(int k)
+errr term_keypress(int k)
{
/* Refuse to enqueue non-keys */
if (!k)
/*
* Add a keypress to the FRONT of the "queue"
*/
-errr Term_key_push(int k)
+errr term_key_push(int k)
{
/* Refuse to enqueue non-keys */
if (!k)
*
* Remove the keypress if "take" is true.
*/
-errr Term_inkey(char *ch, bool wait, bool take)
+errr term_inkey(char *ch, bool wait, bool take)
{
/* Assume no key */
(*ch) = '\0';
/* get bored */
if (!Term->never_bored) {
/* Process random events */
- Term_xtra(TERM_XTRA_BORED, 0);
+ term_xtra(TERM_XTRA_BORED, 0);
}
/* Wait */
/* Process pending events while necessary */
while (Term->key_head == Term->key_tail) {
/* Process events (wait for one) */
- Term_xtra(TERM_XTRA_EVENT, TRUE);
+ term_xtra(TERM_XTRA_EVENT, TRUE);
}
}
/* Process pending events if necessary */
if (Term->key_head == Term->key_tail) {
/* Process events (do not wait) */
- Term_xtra(TERM_XTRA_EVENT, FALSE);
+ term_xtra(TERM_XTRA_EVENT, FALSE);
}
}
/*
* Save the "requested" screen into the "memorized" screen
*
- * Every "Term_save()" should match exactly one "Term_load()"
+ * Every "term_save()" should match exactly one "term_load()"
*/
-errr Term_save(void)
+errr term_save(void)
{
TERM_LEN w = Term->wid;
TERM_LEN h = Term->hgt;
/*
* Restore the "requested" contents (see above).
*
- * Every "Term_save()" should match exactly one "Term_load()"
+ * Every "term_save()" should match exactly one "term_load()"
*/
-errr Term_load(void)
+errr term_load(void)
{
TERM_LEN w = Term->wid;
TERM_LEN h = Term->hgt;
/*
* Exchange the "requested" screen with the "tmp" screen
*/
-errr Term_exchange(void)
+static errr term_exchange(void)
{
TERM_LEN w = Term->wid;
TERM_LEN h = Term->hgt;
/*
* React to a new physical window size.
*/
-errr Term_resize(TERM_LEN w, TERM_LEN h)
+errr term_resize(TERM_LEN w, TERM_LEN h)
{
TERM_LEN wid, hgt;
* It is the only function that should "modify" the value of "Term".
*
* To "create" a valid "term", one should do "term_init(t)", then
- * set the various flags and hooks, and then do "Term_activate(t)".
+ * set the various flags and hooks, and then do "term_activate(t)".
*/
-errr Term_activate(term *t)
+errr term_activate(term *t)
{
/* already done */
if (Term == t)
/* Deactivate the old Term */
if (Term)
- Term_xtra(TERM_XTRA_LEVEL, 0);
+ term_xtra(TERM_XTRA_LEVEL, 0);
/* Call the special "init" hook */
if (t && !t->active_flag) {
/* Activate the new Term */
if (Term)
- Term_xtra(TERM_XTRA_LEVEL, 1);
+ term_xtra(TERM_XTRA_LEVEL, 1);
return 0;
}
t->char_blank = ' ';
/* Prepare "fake" hooks to prevent core dumps */
- t->curs_hook = Term_curs_hack;
- t->bigcurs_hook = Term_bigcurs_hack;
- t->wipe_hook = Term_wipe_hack;
- t->text_hook = Term_text_hack;
- t->pict_hook = Term_pict_hack;
+ t->curs_hook = term_curs_hack;
+ t->bigcurs_hook = term_bigcurs_hack;
+ t->wipe_hook = term_wipe_hack;
+ t->text_hook = term_text_hack;
+ t->pict_hook = term_pict_hack;
return 0;
}
#include "system/angband.h"
#include "system/h-basic.h"
-typedef struct term_win term_win;
/*!
* @brief A term_win is a "window" for a Term
*/
- struct term_win
-{
+typedef struct term_win {
bool cu, cv; //!< Cursor Useless / Visible codes
TERM_LEN cx, cy; //!< Cursor Location (see "Useless")
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]
-};
-
-
+} term_win;
/*!
* @brief term実装構造体 / An actual "term" structure
*/
-typedef struct term term;
-struct term
-{
+typedef struct term {
vptr user; //!< Extra "user" info (used by application)
vptr data; //!< Extra "data" info (used by implementation)
errr (*text_hook)(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr 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 TERM_COLOR *ap, concptr cp, const TERM_COLOR *tap, concptr tcp); //!< タイル描画実装部 / Hook for drawing a sequence of special attr / char pairs
-};
-
-
-
-
-
-
+} term;
/**** Available Constants ****/
-
/*
- * Definitions for the "actions" of "Term_xtra()"
+ * Definitions for the "actions" of "term_xtra()"
*
- * These values may be used as the first parameter of "Term_xtra()",
+ * These values may be used as the first parameter of "term_xtra()",
* with the second parameter depending on the "action" itself. Many
* of the actions shown below are optional on at least one platform.
*
#define TERM_XTRA_MUSIC_MUTE 18
/**** Available Variables ****/
-
extern term *Term;
-
/**** Available Functions ****/
+extern errr term_user(int n);
+extern errr term_xtra(int n, int v);
-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, 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_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, TERM_COLOR *a, char *c, TERM_COLOR *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, TERM_COLOR a, concptr s);
-extern void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr 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, 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, concptr 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, concptr 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, 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, concptr 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, concptr s);
#ifdef JP
-extern errr Term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, concptr s);
+extern errr term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, concptr s);
#endif
-extern errr Term_erase(TERM_LEN x, TERM_LEN y, int n);
-extern errr Term_clear(void);
-extern errr Term_redraw(void);
-extern errr Term_redraw_section(TERM_LEN x1, TERM_LEN y1, TERM_LEN x2, TERM_LEN y2);
-
-extern errr Term_get_cursor(int *v);
-extern errr Term_get_size(TERM_LEN *w, TERM_LEN *h);
-extern errr Term_locate(TERM_LEN *x, TERM_LEN *y);
-extern errr Term_what(TERM_LEN x, TERM_LEN y, TERM_COLOR *a, char *c);
+extern errr term_erase(TERM_LEN x, TERM_LEN y, int n);
+extern errr term_clear(void);
+extern errr term_redraw(void);
-extern errr Term_flush(void);
-extern errr Term_keypress(int k);
-extern errr Term_key_push(int k);
-extern errr Term_inkey(char *ch, bool wait, bool take);
+extern errr term_get_cursor(int *v);
+extern errr term_get_size(TERM_LEN *w, TERM_LEN *h);
+extern errr term_locate(TERM_LEN *x, TERM_LEN *y);
+extern errr term_what(TERM_LEN x, TERM_LEN y, TERM_COLOR *a, char *c);
-extern errr Term_save(void);
-extern errr Term_load(void);
+extern errr term_flush(void);
+extern errr term_keypress(int k);
+extern errr term_key_push(int k);
+extern errr term_inkey(char *ch, bool wait, bool take);
-extern errr Term_exchange(void);
+extern errr term_save(void);
+extern errr term_load(void);
-extern errr Term_resize(TERM_LEN w, TERM_LEN h);
+extern errr term_resize(TERM_LEN w, TERM_LEN h);
-extern errr Term_activate(term *t);
+extern errr term_activate(term *t);
extern errr term_nuke(term *t);
extern errr term_init(term *t, TERM_LEN w, TERM_LEN h, int k);
-
-
#endif
-
-
int col = command_gap;
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
int len = wid - col - 1;
for (i = 0; i < INVEN_PACK; i++) {
o_ptr = &owner_ptr->inventory_list[i];
if (show_item_graph) {
TERM_COLOR a = object_attr(o_ptr);
SYMBOL_CODE c = object_char(o_ptr);
- Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+ term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
if (use_bigtile)
cur_col++;
if (!owner_ptr || !owner_ptr->inventory_list)
return;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
for (i = 0; i < INVEN_PACK; i++) {
o_ptr = &owner_ptr->inventory_list[i];
if (!o_ptr->k_idx)
tmp_val[1] = ')';
}
- Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
+ term_putstr(0, i, 3, TERM_WHITE, tmp_val);
describe_flavor(owner_ptr, o_name, o_ptr, 0);
n = strlen(o_name);
attr = tval_to_attr[o_ptr->tval % 128];
attr = TERM_L_DARK;
}
- Term_putstr(3, i, n, attr, o_name);
- Term_erase(3 + n, i, 255);
+ term_putstr(3, i, n, attr, o_name);
+ term_erase(3 + n, i, 255);
if (show_weights) {
int wgt = o_ptr->weight * o_ptr->number;
}
for (i = z; i < hgt; i++)
- Term_erase(0, i, 255);
+ term_erase(0, i, 255);
}
TERM_COLOR a1 = r_ptr->d_attr;
TERM_COLOR a2 = r_ptr->x_attr;
- Term_erase(0, 0, 255);
- Term_gotoxy(0, 0);
+ term_erase(0, 0, 255);
+ term_gotoxy(0, 0);
#ifdef JP
#else
if (!(r_ptr->flags1 & RF1_UNIQUE)) {
- Term_addstr(-1, TERM_WHITE, "The ");
+ term_addstr(-1, TERM_WHITE, "The ");
}
#endif
- Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
+ term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
- Term_addstr(-1, TERM_WHITE, " ('");
- Term_add_bigch(a1, c1);
- Term_addstr(-1, TERM_WHITE, "')");
+ term_addstr(-1, TERM_WHITE, " ('");
+ term_add_bigch(a1, c1);
+ term_addstr(-1, TERM_WHITE, "')");
- Term_addstr(-1, TERM_WHITE, "/('");
- Term_add_bigch(a2, c2);
- Term_addstr(-1, TERM_WHITE, "'):");
+ term_addstr(-1, TERM_WHITE, "/('");
+ term_add_bigch(a2, c2);
+ term_addstr(-1, TERM_WHITE, "'):");
if (!current_world_ptr->wizard)
return;
char buf[16];
sprintf(buf, "%d", r_idx);
- Term_addstr(-1, TERM_WHITE, " (");
- Term_addstr(-1, TERM_L_BLUE, buf);
- Term_addch(TERM_WHITE, ')');
+ term_addstr(-1, TERM_WHITE, " (");
+ term_addstr(-1, TERM_L_BLUE, buf);
+ term_addch(TERM_WHITE, ')');
}
/*!
void screen_roff(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
msg_erase();
- Term_erase(0, 1, 255);
+ term_erase(0, 1, 255);
hook_c_roff = c_roff;
process_monster_lore(player_ptr, r_idx, mode);
roff_top(r_idx);
void display_roff(player_type *player_ptr)
{
for (int y = 0; y < Term->hgt; y++) {
- Term_erase(0, y, 255);
+ term_erase(0, y, 255);
}
- Term_gotoxy(0, 1);
+ term_gotoxy(0, 1);
hook_c_roff = c_roff;
MONRACE_IDX r_idx = player_ptr->monster_race_idx;
process_monster_lore(player_ptr, r_idx, 0);
player_ptr->now_damaged = FALSE;
if (!player_ptr->playing || !nagasu) {
- Term_putstr(x, 0, -1, a, _("-続く-", "-more-"));
+ term_putstr(x, 0, -1, a, _("-続く-", "-more-"));
while (TRUE) {
int cmd = inkey();
if (cmd == ESCAPE) {
}
}
- Term_erase(0, 0, 255);
+ term_erase(0, 0, 255);
}
void msg_erase(void) { msg_print(NULL); }
*
* These messages are memorized for later reference (see above).
*
- * We could do "Term_fresh()" to provide "flicker" if needed.
+ * We could do "term_fresh()" to provide "flicker" if needed.
*
* The global "msg_flag" variable can be cleared to tell us to
* "erase" any "pending" messages still on the screen.
return;
if (!msg_flag) {
- Term_erase(0, 0, 255);
+ term_erase(0, 0, 255);
p = 0;
}
char oops = t[split];
t[split] = '\0';
- Term_putstr(0, 0, split, TERM_WHITE, t);
+ term_putstr(0, 0, split, TERM_WHITE, t);
msg_flush(p_ptr, split + 1);
t[split] = oops;
t[--split] = ' ';
n -= split;
}
- Term_putstr(p, 0, n, TERM_WHITE, t);
+ term_putstr(p, 0, n, TERM_WHITE, t);
p_ptr->window |= (PW_MESSAGE);
update_output(p_ptr);
#endif
if (fresh_message)
- Term_fresh();
+ term_fresh();
}
/*
c = 's';
}
- Term_putch(*col, row + stat + 1, a, c);
+ term_putch(*col, row + stat + 1, a, c);
}
(*col)++;
c = 's';
}
- Term_putch(col, row + stat + 1, a, c);
+ term_putch(col, row + stat + 1, a, c);
}
}
a = TERM_DARK;
}
- Term_putch(x + i - INVEN_RARM, y, a, c);
+ term_putch(x + i - INVEN_RARM, y, a, c);
}
}
int row = disp_player_line[entry].row;
int col = disp_player_line[entry].col;
int len = disp_player_line[entry].len;
- Term_putstr(col, row, -1, TERM_WHITE, head);
+ term_putstr(col, row, -1, TERM_WHITE, head);
if (!val) return;
if (len <= 0)
{
- Term_putstr(col + head_len, row, -1, attr, val);
+ term_putstr(col + head_len, row, -1, attr, val);
return;
}
int val_len = len - head_len;
char buf[40];
sprintf(buf, "%*.*s", val_len, val_len, val);
- Term_putstr(col + head_len, row, -1, attr, buf);
+ term_putstr(col + head_len, row, -1, attr, buf);
}
REALM_IDX use_realm;
GAME_TEXT o_name[MAX_NLEN];
for (int y = 0; y < Term->hgt; y++) {
- Term_erase(0, y, 255);
+ term_erase(0, y, 255);
}
if (!k_idx)
object_prep(owner_ptr, q_ptr, k_idx);
describe_flavor(owner_ptr, o_name, q_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY | OD_STORE));
- Term_putstr(0, 0, -1, TERM_WHITE, o_name);
+ term_putstr(0, 0, -1, TERM_WHITE, o_name);
sval = q_ptr->sval;
use_realm = tval2realm(q_ptr->tval);
mindcraft_info(caster_ptr, comment, use_mind, i);
sprintf(psi_desc, " %c) %-30s%2d %4d %3d%%%s", I2A(i), spell.name, spell.min_lev, spell.mana_cost, chance, comment);
- Term_putstr(x, y + i + 1, -1, a, psi_desc);
+ term_putstr(x, y + i + 1, -1, a, psi_desc);
}
return;
sprintf(out_val, "%c/%c) %-20.20s", I2A(n / 8), I2A(n % 8), name);
m[j] = y + n;
- Term_putstr(x, m[j], -1, a, out_val);
+ term_putstr(x, m[j], -1, a, out_val);
n++;
}
}
if (!(window_flag[j] & (PW_SPELL)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
display_spell_list(player_ptr);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
if (!(window_flag[j] & (PW_INVEN)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
display_inventory(player_ptr, item_tester_tval);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
MONRACE_IDX r_idx = m_ptr->ap_r_idx;
monster_race *r_ptr = &r_info[r_idx];
- Term_gotoxy(x, y);
+ term_gotoxy(x, y);
if (!r_ptr)
return;
if (r_ptr->flags1 & RF1_UNIQUE) {
}
}
- Term_addstr(-1, TERM_WHITE, is_bounty ? " W" : " U");
+ term_addstr(-1, TERM_WHITE, is_bounty ? " W" : " U");
} else {
sprintf(buf, "%3d", n_same);
- Term_addstr(-1, TERM_WHITE, buf);
+ term_addstr(-1, TERM_WHITE, buf);
}
- Term_addstr(-1, TERM_WHITE, " ");
- Term_add_bigch(r_ptr->x_attr, r_ptr->x_char);
+ term_addstr(-1, TERM_WHITE, " ");
+ term_add_bigch(r_ptr->x_attr, r_ptr->x_char);
if (r_ptr->r_tkills && !(m_ptr->mflag2 & MFLAG2_KAGE)) {
sprintf(buf, " %2d", (int)r_ptr->level);
strcpy(buf, " ??");
}
- Term_addstr(-1, TERM_WHITE, buf);
+ term_addstr(-1, TERM_WHITE, buf);
sprintf(buf, " %s ", r_name + r_ptr->name);
- Term_addstr(-1, TERM_WHITE, buf);
+ term_addstr(-1, TERM_WHITE, buf);
}
/*!
}
if (line - y - 1 == max_lines && i != tmp_pos.n) {
- Term_gotoxy(x, line);
- Term_addstr(-1, TERM_WHITE, "-- and more --");
+ term_gotoxy(x, line);
+ term_addstr(-1, TERM_WHITE, "-- and more --");
} else {
if (last_mons)
print_monster_line(x, line++, last_mons, n_same);
if (!(window_flag[j] & (PW_MONSTER_LIST)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
int w, h;
- Term_get_size(&w, &h);
- Term_clear();
+ term_get_size(&w, &h);
+ term_clear();
target_set_prepare_look(player_ptr);
print_monster_list(player_ptr->current_floor_ptr, 0, 0, h);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
return;
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
TERM_COLOR attr = TERM_WHITE;
char tmp_val[80];
tmp_val[1] = ')';
}
- Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
+ term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
if ((((i == INVEN_RARM) && owner_ptr->hidarite) || ((i == INVEN_LARM) && owner_ptr->migite)) && owner_ptr->ryoute) {
strcpy(o_name, _("(武器を両手持ち)", "(wielding with two-hands)"));
attr = TERM_WHITE;
if (o_ptr->timeout)
attr = TERM_L_DARK;
- Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
- Term_erase(3 + n, i - INVEN_RARM, 255);
+ term_putstr(3, i - INVEN_RARM, n, attr, o_name);
+ term_erase(3 + n, i - INVEN_RARM, 255);
if (show_weights) {
int wgt = o_ptr->weight * o_ptr->number;
sprintf(tmp_val, _("%3d.%1d kg", "%3d.%1d lb"), _(lbtokg1(wgt), wgt / 10), _(lbtokg2(wgt), wgt % 10));
}
if (show_labels) {
- Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
+ term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
prt(mention_use(owner_ptr, i), i - INVEN_RARM, wid - 15);
}
}
for (int i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
- Term_erase(0, i, 255);
+ term_erase(0, i, 255);
}
/*!
if (!(window_flag[j] & (PW_EQUIP)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
display_equipment(player_ptr, item_tester_tval);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
if (!(window_flag[j] & (PW_PLAYER)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
update_playtime();
display_player(player_ptr, 0);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
if (!(window_flag[j] & (PW_MESSAGE)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
TERM_LEN w, h;
- Term_get_size(&w, &h);
+ term_get_size(&w, &h);
for (int i = 0; i < h; i++) {
- Term_putstr(0, (h - 1) - i, -1, (byte)((i < now_message) ? TERM_WHITE : TERM_SLATE), message_str((s16b)i));
+ term_putstr(0, (h - 1) - i, -1, (byte)((i < now_message) ? TERM_WHITE : TERM_SLATE), message_str((s16b)i));
TERM_LEN x, y;
- Term_locate(&x, &y);
- Term_erase(x, y, 255);
+ term_locate(&x, &y);
+ term_erase(x, y, 255);
}
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
if (!(window_flag[j] & (PW_OVERHEAD)))
continue;
- Term_activate(angband_term[j]);
- Term_get_size(&wid, &hgt);
+ term_activate(angband_term[j]);
+ term_get_size(&wid, &hgt);
if (wid > COL_MAP + 2 && hgt > ROW_MAP + 2) {
int cy, cx;
display_map(player_ptr, &cy, &cx);
- Term_fresh();
+ term_fresh();
}
- Term_activate(old);
+ term_activate(old);
}
}
feature_type *f_ptr = &f_info[feat_none];
a = f_ptr->x_attr[F_LIT_STANDARD];
c = f_ptr->x_char[F_LIT_STANDARD];
- Term_queue_char(x - player_ptr->x + Term->wid / 2 - 1, y - player_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
+ term_queue_char(x - player_ptr->x + Term->wid / 2 - 1, y - player_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
continue;
}
a = TERM_L_DARK;
}
- Term_queue_char(x - player_ptr->x + Term->wid / 2 - 1, y - player_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
+ term_queue_char(x - player_ptr->x + Term->wid / 2 - 1, y - player_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
}
}
}
if (!(window_flag[j] & (PW_DUNGEON)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
display_dungeon(player_ptr);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
if (!(window_flag[j] & (PW_MONSTER)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
if (player_ptr->monster_race_idx)
display_roff(player_ptr);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
if (!(window_flag[j] & (PW_OBJECT)))
continue;
- Term_activate(angband_term[j]);
+ term_activate(angband_term[j]);
if (player_ptr->object_kind_idx)
display_koff(player_ptr, player_ptr->object_kind_idx);
- Term_fresh();
- Term_activate(old);
+ term_fresh();
+ term_activate(old);
}
}
TERM_LEN wid, hgt;
char equip_label[52 + 1];
int col = command_gap;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
int len = wid - col - 1;
for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++) {
o_ptr = &owner_ptr->inventory_list[i];
if (show_item_graph) {
TERM_COLOR a = object_attr(o_ptr);
SYMBOL_CODE c = object_char(o_ptr);
- Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+ term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
if (use_bigtile)
cur_col++;
TERM_COLOR attr = TERM_WHITE;
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
TERM_LEN col_depth = wid + COL_DEPTH;
TERM_LEN row_depth = hgt + ROW_DEPTH;
row = ROW_INFO - 2;
col = COL_INFO + 2;
- Term_putstr(col - 2, row, 12, TERM_WHITE, " / ");
- Term_putstr(col - 2, row + 1, 12, TERM_WHITE, " / ");
- Term_putstr(col - 2, row + 2, 12, TERM_WHITE, " / ");
- Term_putstr(col - 2, row + 3, 12, TERM_WHITE, " / ");
+ term_putstr(col - 2, row, 12, TERM_WHITE, " / ");
+ term_putstr(col - 2, row + 1, 12, TERM_WHITE, " / ");
+ term_putstr(col - 2, row + 2, 12, TERM_WHITE, " / ");
+ term_putstr(col - 2, row + 3, 12, TERM_WHITE, " / ");
if (creature_ptr->current_floor_ptr->m_list[1].r_idx) {
- Term_putstr(col - 2, row, 2, r_info[creature_ptr->current_floor_ptr->m_list[1].r_idx].x_attr,
+ term_putstr(col - 2, row, 2, r_info[creature_ptr->current_floor_ptr->m_list[1].r_idx].x_attr,
format("%c", r_info[creature_ptr->current_floor_ptr->m_list[1].r_idx].x_char));
- Term_putstr(col - 1, row, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[1].hp));
- Term_putstr(col + 5, row, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[1].max_maxhp));
+ term_putstr(col - 1, row, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[1].hp));
+ term_putstr(col + 5, row, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[1].max_maxhp));
}
if (creature_ptr->current_floor_ptr->m_list[2].r_idx) {
- Term_putstr(col - 2, row + 1, 2, r_info[creature_ptr->current_floor_ptr->m_list[2].r_idx].x_attr,
+ term_putstr(col - 2, row + 1, 2, r_info[creature_ptr->current_floor_ptr->m_list[2].r_idx].x_attr,
format("%c", r_info[creature_ptr->current_floor_ptr->m_list[2].r_idx].x_char));
- Term_putstr(col - 1, row + 1, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[2].hp));
- Term_putstr(col + 5, row + 1, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[2].max_maxhp));
+ term_putstr(col - 1, row + 1, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[2].hp));
+ term_putstr(col + 5, row + 1, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[2].max_maxhp));
}
if (creature_ptr->current_floor_ptr->m_list[3].r_idx) {
- Term_putstr(col - 2, row + 2, 2, r_info[creature_ptr->current_floor_ptr->m_list[3].r_idx].x_attr,
+ term_putstr(col - 2, row + 2, 2, r_info[creature_ptr->current_floor_ptr->m_list[3].r_idx].x_attr,
format("%c", r_info[creature_ptr->current_floor_ptr->m_list[3].r_idx].x_char));
- Term_putstr(col - 1, row + 2, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[3].hp));
- Term_putstr(col + 5, row + 2, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[3].max_maxhp));
+ term_putstr(col - 1, row + 2, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[3].hp));
+ term_putstr(col + 5, row + 2, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[3].max_maxhp));
}
if (creature_ptr->current_floor_ptr->m_list[4].r_idx) {
- Term_putstr(col - 2, row + 3, 2, r_info[creature_ptr->current_floor_ptr->m_list[4].r_idx].x_attr,
+ term_putstr(col - 2, row + 3, 2, r_info[creature_ptr->current_floor_ptr->m_list[4].r_idx].x_attr,
format("%c", r_info[creature_ptr->current_floor_ptr->m_list[4].r_idx].x_char));
- Term_putstr(col - 1, row + 3, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[4].hp));
- Term_putstr(col + 5, row + 3, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[4].max_maxhp));
+ term_putstr(col - 1, row + 3, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[4].hp));
+ term_putstr(col + 5, row + 3, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[4].max_maxhp));
}
return;
}
if (!health_who) {
- Term_erase(col, row, 12);
+ term_erase(col, row, 12);
return;
}
if (!m_ptr->ml) {
- Term_putstr(col, row, 12, TERM_WHITE, "[----------]");
+ term_putstr(col, row, 12, TERM_WHITE, "[----------]");
return;
}
if (creature_ptr->image) {
- Term_putstr(col, row, 12, TERM_WHITE, "[----------]");
+ term_putstr(col, row, 12, TERM_WHITE, "[----------]");
return;
}
if (m_ptr->hp < 0) {
- Term_putstr(col, row, 12, TERM_WHITE, "[----------]");
+ term_putstr(col, row, 12, TERM_WHITE, "[----------]");
return;
}
else if (pct >= 10)
attr = TERM_L_RED;
- Term_putstr(col, row, 12, TERM_WHITE, "[----------]");
- Term_putstr(col + 1, row, len, attr, "**********");
+ term_putstr(col, row, 12, TERM_WHITE, "[----------]");
+ term_putstr(col + 1, row, len, attr, "**********");
}
void print_speed(player_type *player_ptr)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
TERM_LEN col_speed = wid + COL_SPEED;
TERM_LEN row_speed = hgt + ROW_SPEED;
void print_study(player_type *player_ptr)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
TERM_LEN col_study = wid + COL_STUDY;
TERM_LEN row_study = hgt + ROW_STUDY;
void print_imitation(player_type *player_ptr)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
TERM_LEN col_study = wid + COL_STUDY;
TERM_LEN row_study = hgt + ROW_STUDY;
void print_status(player_type *creature_ptr)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
TERM_LEN row_statbar = hgt + ROW_STATBAR;
TERM_LEN max_col_statbar = wid + MAX_COL_STATBAR;
- Term_erase(0, row_statbar, max_col_statbar);
+ term_erase(0, row_statbar, max_col_statbar);
BIT_FLAGS bar_flags[3];
bar_flags[0] = bar_flags[1] = bar_flags[2] = 0L;
void print_map(player_type *player_ptr)
{
TERM_LEN wid, hgt;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
wid -= COL_MAP + 2;
hgt -= ROW_MAP + 2;
int v;
- (void)Term_get_cursor(&v);
+ (void)term_get_cursor(&v);
- (void)Term_set_cursor(0);
+ (void)term_set_cursor(0);
floor_type *floor_ptr = player_ptr->current_floor_ptr;
POSITION xmin = (0 < panel_col_min) ? panel_col_min : 0;
POSITION ymax = (floor_ptr->height - 1 > panel_row_max) ? panel_row_max : floor_ptr->height - 1;
for (POSITION y = 1; y <= ymin - panel_row_prt; y++) {
- Term_erase(COL_MAP, y, wid);
+ term_erase(COL_MAP, y, wid);
}
for (POSITION y = ymax - panel_row_prt; y <= hgt; y++) {
- Term_erase(COL_MAP, y, wid);
+ term_erase(COL_MAP, y, wid);
}
for (POSITION y = ymin; y <= ymax; y++) {
a = TERM_L_DARK;
}
- Term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, ta, tc);
+ term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, ta, tc);
}
}
lite_spot(player_ptr, player_ptr->y, player_ptr->x);
- (void)Term_set_cursor(v);
+ (void)term_set_cursor(v);
}
static void display_shortened_item_name(player_type *player_ptr, object_type *o_ptr, int y)
}
*c = '\0';
- Term_putstr(0, y, 12, attr, buf);
+ term_putstr(0, y, 12, attr, buf);
}
/*
TERM_LEN hgt, wid, yrat, xrat;
int **match_autopick_yx;
object_type ***object_autopick_yx;
- Term_get_size(&wid, &hgt);
+ term_get_size(&wid, &hgt);
hgt -= 2;
wid -= 14;
if (use_bigtile)
mc[y][0] = mc[y][x] = '|';
for (y = 0; y < hgt + 2; ++y) {
- Term_gotoxy(COL_MAP, y);
+ term_gotoxy(COL_MAP, y);
for (x = 0; x < wid + 2; ++x) {
ta = ma[y][x];
tc = mc[y][x];
ta = TERM_L_DARK;
}
- Term_add_bigch(ta, tc);
+ term_add_bigch(ta, tc);
}
}
}
}
- Term_putstr(0, y, 12, 0, " ");
+ term_putstr(0, y, 12, 0, " ");
if (match_autopick != -1)
display_shortened_item_name(player_ptr, autopick_obj, y);
}
u32b bitmask;
for (int i = bitmask = 1; i <= 32; i++, bitmask *= 2) {
if (flags & bitmask) {
- Term_putch(col++, row, TERM_BLUE, '*');
+ term_putch(col++, row, TERM_BLUE, '*');
} else {
- Term_putch(col++, row, TERM_WHITE, '-');
+ term_putch(col++, row, TERM_WHITE, '-');
}
}
}
}
for (int i = 0; i < 22; i++) {
- Term_putch(col, row + i + 1, TERM_WHITE, '|');
+ term_putch(col, row + i + 1, TERM_WHITE, '|');
prt(format("%2dF", (i * 5)), row + i + 1, col);
if ((i * K_MAX_DEPTH / 22 <= home) && (home < (i + 1) * K_MAX_DEPTH / 22))
c_prt(TERM_RED, format("%3d.%04d%%", display[i] / 1000, display[i] % 1000), row + i + 1, col + 3);
KIND_OBJECT_IDX choice[80];
char buf[160];
- Term_clear();
+ term_clear();
for (num = 0; (num < 80) && tvals[num].tval; num++) {
row = 2 + (num % 20);
col = 20 * (num / 20);
tval_type tval = tvals[num].tval;
concptr tval_desc = tvals[num].desc;
- Term_clear();
+ term_clear();
for (num = 0, i = 1; (num < 80) && (i < max_k_idx); i++) {
object_kind *k_ptr = &k_info[i];
if (k_ptr->tval != tval)
}
prt(format(q, i, correct, matches, better, worse, other), 0, 0);
- Term_fresh();
+ term_fresh();
}
q_ptr = &forge;
{
screen_save();
while (TRUE) {
- Term_clear();
+ term_clear();
prt("Create a spoiler file.", 2, 0);
prt("(1) Brief Object Info (obj-desc.txt)", 5, 5);
prt("(2) Brief Artifact Info (artifact.txt)", 6, 5);