if (player_has_los_bold((Y), (X))) \
{ \
/* Update the monster */ \
- if (cave[(Y)][(X)].m_idx) update_mon(cave[(Y)][(X)].m_idx, FALSE); \
+ if (cave[(Y)][(X)].m_idx) update_monster(cave[(Y)][(X)].m_idx, FALSE); \
\
/* Notice and redraw */ \
note_spot((Y), (X)); \
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
/* Hack -- hallucination */
if (p_ptr->image) image_object(ap, cp);
- /* Done */
break;
}
}
int wid, hgt;
- /* Get size */
Term_get_size(&wid, &hgt);
/* Remove map offset */
/* Get projection path */
path_n = project_path(path_g, (project_length ? project_length : MAX_RANGE), p_ptr->y, p_ptr->x, y, x, PROJECT_PATH|PROJECT_THRU);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
-
- /* Redraw stuff */
redraw_stuff();
/* Draw path */
for (i = 0; i < path_n; i++)
{
- int ny = GRID_Y(path_g[i]);
- int nx = GRID_X(path_g[i]);
+ POSITION ny = GRID_Y(path_g[i]);
+ POSITION nx = GRID_X(path_g[i]);
cave_type *c_ptr = &cave[ny][nx];
if (panel_contains(ny, nx))
int **match_autopick_yx;
object_type ***object_autopick_yx;
- /* Get size */
Term_get_size(&wid, &hgt);
hgt -= 2;
wid -= 14;
{
for (j = 0; j < cur_hgt; ++j)
{
- /* Location */
x = i / xrat + 1;
y = j / yrat + 1;
{
for (i = 0; i < cur_wid; ++i)
{
- /* Location */
x = i / xrat + 1;
y = j / yrat + 1;
/*
* Display a "small-scale" map of the dungeon for the player
*
- * Currently, the "player" is displayed on the map. XXX XXX XXX
+ * Currently, the "player" is displayed on the map.
*/
void do_cmd_view_map(void)
{
/* Note */
prt(_("お待ち下さい...", "Please wait..."), 0, 0);
- /* Flush */
Term_fresh();
/* Clear the screen */
/* Forget "LITE" flag */
cave[y][x].info &= ~(CAVE_LITE);
- /* Redraw */
/* lite_spot(y, x); Perhaps don't need? */
}
/*
- * XXX XXX XXX
- *
* This macro allows us to efficiently add a grid to the "lite" array,
* note that we are never called for illegal grids, or for grids which
* have already been placed into the "lite" array, and we are never
{
POSITION y = view_y[i];
POSITION x = view_x[i];
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Forget that the grid is viewable */
/* Totally blocked by "unviewable neighbors" */
if (!v1 && !v2) return (TRUE);
-
- /* Access the grid */
c_ptr = &cave[y][x];
{
y = view_y[n];
x = view_x[n];
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Mark the grid as not in "view" */
/* Now start on the player */
y = p_ptr->y;
x = p_ptr->x;
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Assume the player grid is easily viewable */
{
y = view_y[n];
x = view_x[n];
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Clear the "CAVE_XTRA" flag */
{
y = temp_y[n];
x = temp_x[n];
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* No longer in the array */
{
y = redraw_y[i];
x = redraw_x[i];
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Update only needed grids (prevent multiple updating) */
/* If required, note */
if (c_ptr->info & CAVE_NOTE) note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
/* Hack -- Visual update of monster on this grid */
- if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);
+ if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
/* No longer in the array */
c_ptr->info &= ~(CAVE_NOTE | CAVE_REDRAW);
*/
void update_smell(void)
{
- int i, j;
- int y, x;
+ POSITION i, j;
+ POSITION y, x;
/* Create a table that controls the spread of scent */
const int scent_adjust[5][5] =
*/
void map_area(POSITION range)
{
- int i, x, y;
- cave_type *c_ptr;
- s16b feat;
- feature_type *f_ptr;
+ int i;
+ POSITION x, y;
+ cave_type *c_ptr;
+ FEAT_IDX feat;
+ feature_type *f_ptr;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
}
}
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
*/
void wiz_lite(bool ninja)
{
- int i, y, x;
- s16b feat;
+ OBJECT_IDX i;
+ POSITION y, x;
+ FEAT_IDX feat;
feature_type *f_ptr;
/* Memorize objects */
}
}
- /* Update the monsters */
p_ptr->update |= (PU_MONSTERS);
-
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
-
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
if (p_ptr->special_defense & NINJA_S_STEALTH)
*/
void wiz_dark(void)
{
- int i, y, x;
-
+ OBJECT_IDX i;
+ POSITION y, x;
/* Forget every grid */
for (y = 1; y < cur_hgt - 1; y++)
/* Forget travel route when we have forgotten map */
forget_travel_flow();
- /* Mega-Hack -- Forget the view and lite */
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
-
- /* Update the view and lite */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
-
- /* Update the monsters */
p_ptr->update |= (PU_MONSTERS);
-
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
-
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
-
-
-
-
/*
* Change the "feat" flag for a grid, and notice/redraw the grid
*/
-void cave_set_feat(POSITION y, POSITION x, IDX feat)
+void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
{
cave_type *c_ptr = &cave[y][x];
feature_type *f_ptr = &f_info[feat];
/* Hack -- glow the GLOW terrain */
if (have_flag(f_ptr->flags, FF_GLOW) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS))
{
- int i, yy, xx;
+ DIRECTION i;
+ POSITION yy, xx;
for (i = 0; i < 9; i++)
{
/* Check for change to boring grid */
if (!have_flag(f_ptr->flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
+ if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
- /* Update the monster */
- if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);
-
- /* Notice */
note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
/* Check if los has changed */
/* Hack -- glow the GLOW terrain */
if (have_flag(f_ptr->flags, FF_GLOW) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS))
{
- int i, yy, xx;
+ DIRECTION i;
+ POSITION yy, xx;
cave_type *cc_ptr;
for (i = 0; i < 9; i++)
if (player_has_los_grid(cc_ptr))
{
- /* Update the monster */
- if (cc_ptr->m_idx) update_mon(cc_ptr->m_idx, FALSE);
+ if (cc_ptr->m_idx) update_monster(cc_ptr->m_idx, FALSE);
- /* Notice */
note_spot(yy, xx);
- /* Redraw */
lite_spot(yy, xx);
}
}
-IDX conv_dungeon_feat(IDX newfeat)
+FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat)
{
feature_type *f_ptr = &f_info[newfeat];
* Take a feature, determine what that feature becomes
* through applying the given action.
*/
-IDX feat_state(IDX feat, int action)
+FEAT_IDX feat_state(FEAT_IDX feat, int action)
{
feature_type *f_ptr = &f_info[feat];
int i;
{
c_ptr->info &= ~(CAVE_GLOW);
if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
-
- /* Update the monster */
- if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);
+ if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
update_local_illumination(y, x);
}
- /* Notice */
note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
}
/* Save this monster ID */
p_ptr->monster_race_idx = r_idx;
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
/*
* Hack -- track the given object kind
*/
-void object_kind_track(IDX k_idx)
+void object_kind_track(KIND_OBJECT_IDX k_idx)
{
/* Save this monster ID */
p_ptr->object_kind_idx = k_idx;
- /* Window stuff */
p_ptr->window |= (PW_OBJECT);
}
*
* All disturbance cancels repeated commands, resting, and running.
*/
-void disturb(int stop_search, int stop_travel)
+void disturb(bool stop_search, bool stop_travel)
{
#ifndef TRAVEL
/* Unused */
*/
void glow_deep_lava_and_bldg(void)
{
- int y, x, i, yy, xx;
+ POSITION y, x, yy, xx;
+ DIRECTION i;
cave_type *c_ptr;
/* Not in the darkness dungeon */
/* Update the view and lite */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
}