update_creature(creature_ptr);
creature_ptr->redraw |= (PR_STATE);
update_output(creature_ptr);
- term_fresh();
+ if (need_term_fresh())
+ term_fresh();
}
Term->scr->cu = cu;
Term->scr->cv = cv;
- term_fresh();
+ if (need_term_fresh())
+ term_fresh();
C_KILL(who, current_world_ptr->max_m_idx, MONSTER_IDX);
TERM_COLOR a = object_attr(it_ptr->q_ptr);
print_rel(creature_ptr, c, a, it_ptr->ny[it_ptr->cur_dis], it_ptr->nx[it_ptr->cur_dis]);
move_cursor_relative(it_ptr->ny[it_ptr->cur_dis], it_ptr->nx[it_ptr->cur_dis]);
- term_fresh();
- term_xtra(TERM_XTRA_DELAY, it_ptr->msec);
- lite_spot(creature_ptr, it_ptr->ny[it_ptr->cur_dis], it_ptr->nx[it_ptr->cur_dis]);
- term_fresh();
+ if (need_term_fresh()) {
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, it_ptr->msec);
+ lite_spot(creature_ptr, it_ptr->ny[it_ptr->cur_dis], it_ptr->nx[it_ptr->cur_dis]);
+ term_fresh();
+ }
}
static bool check_racial_target_monster(player_type *creature_ptr, it_type *it_ptr)
SYMBOL_CODE c = object_char(it_ptr->q_ptr);
byte a = object_attr(it_ptr->q_ptr);
- print_rel(creature_ptr, c, a, it_ptr->ny[i], it_ptr->nx[i]);
- move_cursor_relative(it_ptr->ny[i], it_ptr->nx[i]);
- term_fresh();
- term_xtra(TERM_XTRA_DELAY, it_ptr->msec);
- lite_spot(creature_ptr, it_ptr->ny[i], it_ptr->nx[i]);
- term_fresh();
+ if (need_term_fresh()) {
+ print_rel(creature_ptr, c, a, it_ptr->ny[i], it_ptr->nx[i]);
+ move_cursor_relative(it_ptr->ny[i], it_ptr->nx[i]);
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, it_ptr->msec);
+ lite_spot(creature_ptr, it_ptr->ny[i], it_ptr->nx[i]);
+ term_fresh();
+ }
}
display_boomerang_throw(creature_ptr, it_ptr);
/* 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);
- lite_spot(shooter_ptr, ny, nx);
- term_fresh();
+ if (need_term_fresh()) {
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
+ lite_spot(shooter_ptr, ny, nx);
+ term_fresh();
+ }
}
/* The player cannot see the missile */
lite_spot(shooter_ptr, ny, nx);
lite_spot(shooter_ptr, oy, ox);
- term_fresh();
- term_xtra(TERM_XTRA_DELAY, msec);
+ if (need_term_fresh()) {
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
+ }
x = nx;
y = ny;
if (!player_ptr->window)
return;
+ if (!need_term_fresh())
+ return;
+
BIT_FLAGS mask = 0L;
for (int j = 0; j < 8; j++) {
if (angband_term[j])
player_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
player_ptr->update |= (PU_COMBINE | PU_REORDER);
handle_stuff(player_ptr);
- term_fresh();
+ if (need_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))))
handle_stuff(player_ptr);
move_cursor_relative(player_ptr->y, player_ptr->x);
- if (fresh_after)
+ if (need_term_fresh())
term_fresh();
if (!player_ptr->playing || player_ptr->is_dead)
handle_stuff(player_ptr);
move_cursor_relative(player_ptr->y, player_ptr->x);
- if (fresh_after)
+ if (need_term_fresh())
term_fresh();
if (!player_ptr->playing || player_ptr->is_dead)
handle_stuff(player_ptr);
move_cursor_relative(player_ptr->y, player_ptr->x);
- if (fresh_after)
+ if (need_term_fresh()) {
term_fresh();
+ }
if (!player_ptr->playing || player_ptr->is_dead)
break;
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);
- lite_spot(caster_ptr, y, x);
- term_fresh();
+ if (need_term_fresh()) {
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
+ lite_spot(caster_ptr, y, x);
+ term_fresh();
+ }
if (flag & (PROJECT_BEAM)) {
p = bolt_pict(y, x, y, x, typ);
a = PICT_A(p);
}
move_cursor_relative(by, bx);
- term_fresh();
+
+ if (need_term_fresh())
+ term_fresh();
if (visual || drawn) {
term_xtra(TERM_XTRA_DELAY, msec);
}
}
move_cursor_relative(by, bx);
- term_fresh();
+ if (need_term_fresh())
+ term_fresh();
}
}
msg_flag = FALSE;
num_more = 0;
inkey_flag = TRUE;
+ if (need_term_fresh()) {
+ term_fresh();
+ }
cmd = inkey();
if (!shopping && command_menu && ((cmd == '\r') || (cmd == '\n') || (cmd == 'x') || (cmd == 'X')) && !keymap_act[mode][(byte)(cmd)])
cmd = inkey_from_menu(player_ptr);
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);
+ if (need_term_fresh()) {
+ term_fresh();
+ term_xtra(TERM_XTRA_DELAY, msec);
+ }
}
}
}
caster_ptr->redraw |= (PR_HP);
caster_ptr->window |= (PW_PLAYER);
handle_stuff(caster_ptr);
- term_fresh();
+ if (need_term_fresh())
+ term_fresh();
int msec = delay_factor * delay_factor * delay_factor;
term_xtra(TERM_XTRA_DELAY, msec);
Term->scr->cu = cu;
Term->scr->cv = cv;
- term_fresh();
+ if (need_term_fresh())
+ term_fresh();
if (probe) {
chg_virtue(caster_ptr, V_KNOWLEDGE, 1);
#include "game-option/special-options.h"
#include "term/term-color-types.h"
#include "term/z-virt.h"
+#include "term/gameterm.h"
+#include "game-option/map-screen-options.h"
/* Special flags in the attr data */
#define AF_BIGTILE2 0xf0
}
}
+bool macro_running(void) {
+ int diff = angband_term[0]->key_head - angband_term[0]->key_tail;
+ return diff < -1 || 1 < diff;
+}
+
+bool need_term_fresh(void) { return !macro_running() || fresh_after; }
/*
* @brief Actually perform all requested changes to the window
*/
void term_queue_bigchar(TERM_LEN x, TERM_LEN y, 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);
+bool need_term_fresh(void);
errr term_fresh(void);
errr term_set_cursor(int v);
term_activate(angband_term[j]);
display_spell_list(player_ptr);
- term_fresh();
+ if (need_term_fresh()) {
+ term_fresh();
+ player_ptr->window &= ~(PW_SPELL);
+ }
term_activate(old);
}
}
}
prt(format(q, i, correct, matches, better, worse, other), 0, 0);
- term_fresh();
+ if (need_term_fresh())
+ term_fresh();
}
object_type forge;