{
char *terrain;
int d;
- int reuse; /* true iff we should reuse old map */
+ bool reuse; /* true iff we should reuse old map */
loc_t old_loc;
loc_t old_dest;
old_dest = new_loc; /* and where we're going */
d = dist (new_loc, obj->loc);
- reuse = 1; /* try to reuse unless we learn otherwise */
+ reuse = true; /* try to reuse unless we learn otherwise */
if (comp_map[new_loc].contents == ' ' && d == 2) { /* are we exploring? */
vmap_mark_adjacent (pathmap, obj->loc);
- reuse = 0;
+ reuse = false;
}
else vmap_mark_path (pathmap, comp_map, new_loc); /* find routes to destination */
if (new_loc == obj->loc /* path is blocked? */
&& (obj->type != ARMY || !obj->ship)) { /* don't unblock armies on a ship */
vmap_mark_near_path (pathmap, obj->loc);
- reuse = 0;
+ reuse = false;
new_loc = vmap_find_dir (pathmap, comp_map, obj->loc,
terrain, adj_list);
}
if (new_loc == obj->loc && map[obj->loc].cityp != NULL
&& obj->type == ARMY) {
new_loc = move_away (comp_map, obj->loc, "+");
- reuse = 0;
+ reuse = false;
}
if (new_loc == obj->loc) {
obj->moved = piece_attr[obj->type].speed;
void
set_need_delay(void)
{
- need_delay = 1;
+ need_delay = true;
}
void
va_list ap;
va_start(ap, fmt);
- if (need_delay) delay ();
+ if (need_delay)
+ delay ();
topmsg (1, "");
topmsg (2, "");
vtopmsg (3, fmt, ap);
if (!print_debug) return;
va_start(ap, fmt);
- if (need_delay) delay ();
+ if (need_delay)
+ delay ();
topmsg (1, "");
topmsg (2, "");
vtopmsg (3, fmt, ap);