* @param x2 2点目のx座標
* @return 2点間の距離
*/
-int distance (int y1, int x1, int y2, int x2)
+POSITION distance (POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
- int dy = (y1 > y2) ? (y1 - y2) : (y2 - y1);
- int dx = (x1 > x2) ? (x1 - x2) : (x2 - x1);
+ POSITION dy = (y1 > y2) ? (y1 - y2) : (y2 - y1);
+ POSITION dx = (x1 > x2) ? (x1 - x2) : (x2 - x1);
/* Squared distance */
- int target = (dy * dy) + (dx * dx);
+ POSITION target = (dy * dy) + (dx * dx);
/* Approximate distance: hypot(dy,dx) = max(dy,dx) + min(dy,dx) / 2 */
- int d = (dy > dx) ? (dy + (dx>>1)) : (dx + (dy>>1));
+ POSITION d = (dy > dx) ? (dy + (dx>>1)) : (dx + (dy>>1));
- int err;
+ POSITION err;
/* Simple case */
if (!dy || !dx) return d;
* @param feat 地形情報のID
* @return 罠持ちの地形ならばTRUEを返す。
*/
-bool is_trap(int feat)
+bool is_trap(IDX feat)
{
return have_flag(f_info[feat].flags, FF_TRAP);
}
* @param feat 地形情報のID
* @return 閉じたドアのある地形ならばTRUEを返す。
*/
-bool is_closed_door(int feat)
+bool is_closed_door(IDX feat)
{
feature_type *f_ptr = &f_info[feat];
*\n
* Use the "update_view()" function to determine player line-of-sight.\n
*/
-bool los(int y1, int x1, int y2, int x2)
+bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
/* Delta */
- int dx, dy;
+ POSITION dx, dy;
/* Absolute */
int ax, ay;
static bool check_local_illumination(int y, int x)
{
/* Hack -- move towards player */
- int yy = (y < py) ? (y + 1) : (y > py) ? (y - 1) : y;
- int xx = (x < px) ? (x + 1) : (x > px) ? (x - 1) : x;
+ int yy = (y < p_ptr->y) ? (y + 1) : (y > p_ptr->y) ? (y - 1) : y;
+ int xx = (x < p_ptr->x) ? (x + 1) : (x > p_ptr->x) ? (x - 1) : x;
/* Check for "local" illumination */
#ifdef COMPLEX_WALL_ILLUMINATION /* COMPLEX_WALL_ILLUMINATION */
- if ((y != py) && (x != px))
+ if ((y != p_ptr->y) && (x != p_ptr->x))
{
- yy = (y < py) ? (y - 1) : (y + 1);
- xx = (x < px) ? (x - 1) : (x + 1);
+ yy = (y < p_ptr->y) ? (y - 1) : (y + 1);
+ xx = (x < p_ptr->x) ? (x - 1) : (x + 1);
update_local_illumination_aux(yy, xx);
update_local_illumination_aux(y, xx);
update_local_illumination_aux(yy, x);
}
- else if (x != px) /* y == py */
+ else if (x != p_ptr->x) /* y == p_ptr->y */
{
- xx = (x < px) ? (x - 1) : (x + 1);
+ xx = (x < p_ptr->x) ? (x - 1) : (x + 1);
for (i = -1; i <= 1; i++)
{
yy = y + i;
yy = y + 1;
update_local_illumination_aux(yy, x);
}
- else if (y != py) /* x == px */
+ else if (y != p_ptr->y) /* x == p_ptr->x */
{
- yy = (y < py) ? (y - 1) : (y + 1);
+ yy = (y < p_ptr->y) ? (y - 1) : (y + 1);
for (i = -1; i <= 1; i++)
{
xx = x + i;
#else /* COMPLEX_WALL_ILLUMINATION */
- if ((y != py) && (x != px))
+ if ((y != p_ptr->y) && (x != p_ptr->x))
{
- yy = (y < py) ? (y - 1) : (y + 1);
- xx = (x < px) ? (x - 1) : (x + 1);
+ yy = (y < p_ptr->y) ? (y - 1) : (y + 1);
+ xx = (x < p_ptr->x) ? (x - 1) : (x + 1);
update_local_illumination_aux(yy, xx);
}
- else if (x != px) /* y == py */
+ else if (x != p_ptr->x) /* y == p_ptr->y */
{
- xx = (x < px) ? (x - 1) : (x + 1);
+ xx = (x < p_ptr->x) ? (x - 1) : (x + 1);
for (i = -1; i <= 1; i++)
{
yy = y + i;
update_local_illumination_aux(yy, xx);
}
}
- else if (y != py) /* x == px */
+ else if (y != p_ptr->y) /* x == p_ptr->x */
{
- yy = (y < py) ? (y - 1) : (y + 1);
+ yy = (y < p_ptr->y) ? (y - 1) : (y + 1);
for (i = -1; i <= 1; i++)
{
xx = x + i;
*/
bool no_lite(void)
{
- return (!player_can_see_bold(py, px));
+ return (!player_can_see_bold(p_ptr->y, p_ptr->x));
}
byte a;
char c;
- byte ta;
- char tc;
+ byte ta = 0;
+ char tc = '\0';
- for (x = px - Term->wid / 2 + 1; x <= px + Term->wid / 2; x++)
+ for (x = p_ptr->x - Term->wid / 2 + 1; x <= p_ptr->x + Term->wid / 2; x++)
{
- for (y = py - Term->hgt / 2 + 1; y <= py + Term->hgt / 2; y++)
+ for (y = p_ptr->y - Term->hgt / 2 + 1; y <= p_ptr->y + Term->hgt / 2; y++)
{
if (in_bounds2(y, x))
{
}
/* Hack -- Queue it */
- Term_queue_char(x - px + Term->wid / 2 - 1, y - py + Term->hgt / 2 - 1, a, c, ta, tc);
+ Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
}
else
{
c = f_ptr->x_char[F_LIT_STANDARD];
/* Hack -- Queue it */
- Term_queue_char(x - px + Term->wid / 2 - 1, y - py + Term->hgt / 2 - 1, a, c, ta, tc);
+ Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
}
}
}
}
/* Display player */
- lite_spot(py, px);
+ lite_spot(p_ptr->y, p_ptr->x);
/* Restore the cursor */
(void)Term_set_cursor(v);
int i;
int path_n;
u16b path_g[512];
- int default_color = TERM_SLATE;
+ byte_hack default_color = TERM_SLATE;
if (!display_path) return;
if (-1 == project_length)
return;
/* Get projection path */
- path_n = project_path(path_g, (project_length ? project_length : MAX_RANGE), py, px, y, x, PROJECT_PATH|PROJECT_THRU);
+ 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);
if (p_ptr->image)
{
attr = TERM_WHITE;
-#ifdef JP
- strcpy(buf, "何か奇妙な物");
-#else
- strcpy(buf, "something strange");
-#endif
+ strcpy(buf, _("何か奇妙な物", "something strange"));
}
for (c = buf; *c; c++)
map_info(j, i, &ta, &tc, &ta, &tc);
/* Extract the priority */
- tp = feat_priority;
+ tp = (byte_hack)feat_priority;
if(match_autopick!=-1
&& (match_autopick_yx[y][x] == -1
}
/* Player location */
- (*cy) = py / yrat + 1 + ROW_MAP;
+ (*cy) = p_ptr->y / yrat + 1 + ROW_MAP;
if (!use_bigtile)
- (*cx) = px / xrat + 1 + COL_MAP;
+ (*cx) = p_ptr->x / xrat + 1 + COL_MAP;
else
- (*cx) = (px / xrat + 1) * 2 + COL_MAP;
+ (*cx) = (p_ptr->x / xrat + 1) * 2 + COL_MAP;
/* Restore lighting effects */
view_special_lite = old_view_special_lite;
screen_save();
/* Note */
-#ifdef JP
-prt("お待ち下さい...", 0, 0);
-#else
- prt("Please wait...", 0, 0);
-#endif
+ prt(_("お待ち下さい...", "Please wait..."), 0, 0);
/* Flush */
Term_fresh();
Term_get_size(&wid, &hgt);
row_message = hgt - 1;
-#ifdef JP
- put_str("何かキーを押してください('M':拾う 'N':放置 'D':M+N 'K':壊すアイテムを表示)", row_message, 1);
-#else
- put_str(" Hit M, N(for ~), K(for !), or D(same as M+N) to display auto-picker items.", row_message, 1);
-#endif
+ 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."), row_message, 1);
/* Hilite the player */
move_cursor(cy, cx);
}
else
{
-#ifdef JP
- put_str("何かキーを押すとゲームに戻ります", 23, 30);
-#else
- put_str("Hit any key to continue", 23, 30);
-#endif /* Hilite the player */
+ put_str(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"), 23, 30);
+ /* Hilite the player */
move_cursor(cy, cx);
/* Get any key */
inkey();
/* forget_lite(); Perhaps don't need? */
/* Add it to later visual update */
- cave_redraw_later(&cave[py][px], py, px);
+ cave_redraw_later(&cave[p_ptr->y][p_ptr->x], p_ptr->y, p_ptr->x);
}
#endif
if (p >= 1)
{
/* Player grid */
- cave_lite_hack(py, px);
+ cave_lite_hack(p_ptr->y, p_ptr->x);
/* Adjacent grid */
- cave_lite_hack(py+1, px);
- cave_lite_hack(py-1, px);
- cave_lite_hack(py, px+1);
- cave_lite_hack(py, px-1);
+ cave_lite_hack(p_ptr->y+1, p_ptr->x);
+ cave_lite_hack(p_ptr->y-1, p_ptr->x);
+ cave_lite_hack(p_ptr->y, p_ptr->x+1);
+ cave_lite_hack(p_ptr->y, p_ptr->x-1);
/* Diagonal grids */
- cave_lite_hack(py+1, px+1);
- cave_lite_hack(py+1, px-1);
- cave_lite_hack(py-1, px+1);
- cave_lite_hack(py-1, px-1);
+ cave_lite_hack(p_ptr->y+1, p_ptr->x+1);
+ cave_lite_hack(p_ptr->y+1, p_ptr->x-1);
+ cave_lite_hack(p_ptr->y-1, p_ptr->x+1);
+ cave_lite_hack(p_ptr->y-1, p_ptr->x-1);
}
/* Radius 2 -- lantern radius */
if (p >= 2)
{
/* South of the player */
- if (cave_los_bold(py + 1, px))
+ if (cave_los_bold(p_ptr->y + 1, p_ptr->x))
{
- cave_lite_hack(py+2, px);
- cave_lite_hack(py+2, px+1);
- cave_lite_hack(py+2, px-1);
+ cave_lite_hack(p_ptr->y+2, p_ptr->x);
+ cave_lite_hack(p_ptr->y+2, p_ptr->x+1);
+ cave_lite_hack(p_ptr->y+2, p_ptr->x-1);
}
/* North of the player */
- if (cave_los_bold(py - 1, px))
+ if (cave_los_bold(p_ptr->y - 1, p_ptr->x))
{
- cave_lite_hack(py-2, px);
- cave_lite_hack(py-2, px+1);
- cave_lite_hack(py-2, px-1);
+ cave_lite_hack(p_ptr->y-2, p_ptr->x);
+ cave_lite_hack(p_ptr->y-2, p_ptr->x+1);
+ cave_lite_hack(p_ptr->y-2, p_ptr->x-1);
}
/* East of the player */
- if (cave_los_bold(py, px + 1))
+ if (cave_los_bold(p_ptr->y, p_ptr->x + 1))
{
- cave_lite_hack(py, px+2);
- cave_lite_hack(py+1, px+2);
- cave_lite_hack(py-1, px+2);
+ cave_lite_hack(p_ptr->y, p_ptr->x+2);
+ cave_lite_hack(p_ptr->y+1, p_ptr->x+2);
+ cave_lite_hack(p_ptr->y-1, p_ptr->x+2);
}
/* West of the player */
- if (cave_los_bold(py, px - 1))
+ if (cave_los_bold(p_ptr->y, p_ptr->x - 1))
{
- cave_lite_hack(py, px-2);
- cave_lite_hack(py+1, px-2);
- cave_lite_hack(py-1, px-2);
+ cave_lite_hack(p_ptr->y, p_ptr->x-2);
+ cave_lite_hack(p_ptr->y+1, p_ptr->x-2);
+ cave_lite_hack(p_ptr->y-1, p_ptr->x-2);
}
}
if (p > 14) p = 14;
/* South-East of the player */
- if (cave_los_bold(py + 1, px + 1))
+ if (cave_los_bold(p_ptr->y + 1, p_ptr->x + 1))
{
- cave_lite_hack(py+2, px+2);
+ cave_lite_hack(p_ptr->y+2, p_ptr->x+2);
}
/* South-West of the player */
- if (cave_los_bold(py + 1, px - 1))
+ if (cave_los_bold(p_ptr->y + 1, p_ptr->x - 1))
{
- cave_lite_hack(py+2, px-2);
+ cave_lite_hack(p_ptr->y+2, p_ptr->x-2);
}
/* North-East of the player */
- if (cave_los_bold(py - 1, px + 1))
+ if (cave_los_bold(p_ptr->y - 1, p_ptr->x + 1))
{
- cave_lite_hack(py-2, px+2);
+ cave_lite_hack(p_ptr->y-2, p_ptr->x+2);
}
/* North-West of the player */
- if (cave_los_bold(py - 1, px - 1))
+ if (cave_los_bold(p_ptr->y - 1, p_ptr->x - 1))
{
- cave_lite_hack(py-2, px-2);
+ cave_lite_hack(p_ptr->y-2, p_ptr->x-2);
}
/* Maximal north */
- min_y = py - p;
+ min_y = p_ptr->y - p;
if (min_y < 0) min_y = 0;
/* Maximal south */
- max_y = py + p;
+ max_y = p_ptr->y + p;
if (max_y > cur_hgt-1) max_y = cur_hgt-1;
/* Maximal west */
- min_x = px - p;
+ min_x = p_ptr->x - p;
if (min_x < 0) min_x = 0;
/* Maximal east */
- max_x = px + p;
+ max_x = p_ptr->x + p;
if (max_x > cur_wid-1) max_x = cur_wid-1;
/* Scan the maximal box */
{
for (x = min_x; x <= max_x; x++)
{
- int dy = (py > y) ? (py - y) : (y - py);
- int dx = (px > x) ? (px - x) : (x - px);
+ int dy = (p_ptr->y > y) ? (p_ptr->y - y) : (y - p_ptr->y);
+ int dx = (p_ptr->x > x) ? (p_ptr->x - x) : (x - p_ptr->x);
/* Skip the "central" grids (above) */
if ((dy <= 2) && (dx <= 2)) continue;
static bool mon_invis;
-static s16b mon_fy, mon_fx;
+static POSITION mon_fy, mon_fx;
/*
* Add a square to the changes array
*/
-static void mon_lite_hack(int y, int x)
+static void mon_lite_hack(POSITION y, POSITION x)
{
cave_type *c_ptr;
- int midpoint, dpf, d;
+ int dpf, d;
+ POSITION midpoint;
/* We trust this grid is in bounds */
/* if (!in_bounds2(y, x)) return; */
/* Hack -- Prevent monster lite leakage in walls */
/* Horizontal walls between player and a monster */
- if (((y < py) && (y > mon_fy)) || ((y > py) && (y < mon_fy)))
+ if (((y < p_ptr->y) && (y > mon_fy)) || ((y > p_ptr->y) && (y < mon_fy)))
{
- dpf = py - mon_fy;
+ dpf = p_ptr->y - mon_fy;
d = y - mon_fy;
- midpoint = mon_fx + ((px - mon_fx) * ABS(d)) / ABS(dpf);
+ midpoint = mon_fx + ((p_ptr->x - mon_fx) * ABS(d)) / ABS(dpf);
/* Only first wall viewed from mid-x is lit */
if (x < midpoint)
}
/* Vertical walls between player and a monster */
- if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx)))
+ if (((x < p_ptr->x) && (x > mon_fx)) || ((x > p_ptr->x) && (x < mon_fx)))
{
- dpf = px - mon_fx;
+ dpf = p_ptr->x - mon_fx;
d = x - mon_fx;
- midpoint = mon_fy + ((py - mon_fy) * ABS(d)) / ABS(dpf);
+ midpoint = mon_fy + ((p_ptr->y - mon_fy) * ABS(d)) / ABS(dpf);
/* Only first wall viewed from mid-y is lit */
if (y < midpoint)
/*
* Add a square to the changes array
*/
-static void mon_dark_hack(int y, int x)
+static void mon_dark_hack(POSITION y, POSITION x)
{
cave_type *c_ptr;
int midpoint, dpf, d;
/* Hack -- Prevent monster dark lite leakage in walls */
/* Horizontal walls between player and a monster */
- if (((y < py) && (y > mon_fy)) || ((y > py) && (y < mon_fy)))
+ if (((y < p_ptr->y) && (y > mon_fy)) || ((y > p_ptr->y) && (y < mon_fy)))
{
- dpf = py - mon_fy;
+ dpf = p_ptr->y - mon_fy;
d = y - mon_fy;
- midpoint = mon_fx + ((px - mon_fx) * ABS(d)) / ABS(dpf);
+ midpoint = mon_fx + ((p_ptr->x - mon_fx) * ABS(d)) / ABS(dpf);
/* Only first wall viewed from mid-x is lit */
if (x < midpoint)
}
/* Vertical walls between player and a monster */
- if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx)))
+ if (((x < p_ptr->x) && (x > mon_fx)) || ((x > p_ptr->x) && (x < mon_fx)))
{
- dpf = px - mon_fx;
+ dpf = p_ptr->x - mon_fx;
d = x - mon_fx;
- midpoint = mon_fy + ((py - mon_fy) * ABS(d)) / ABS(dpf);
+ midpoint = mon_fy + ((p_ptr->y - mon_fy) * ABS(d)) / ABS(dpf);
/* Only first wall viewed from mid-y is lit */
if (y < midpoint)
int i, rad;
cave_type *c_ptr;
- s16b fx, fy;
- void (*add_mon_lite)(int, int);
+ POSITION fx, fy;
+ void (*add_mon_lite)(POSITION, POSITION);
int f_flag;
s16b end_temp;
}
/* Add to end of temp array */
- temp_x[temp_n] = (byte)fx;
- temp_y[temp_n] = (byte)fy;
+ temp_x[temp_n] = fx;
+ temp_y[temp_n] = fy;
temp_n++;
}
/* Mega-Hack -- Visual update later */
p_ptr->update |= (PU_DELAY_VIS);
- p_ptr->monlite = (cave[py][px].info & CAVE_MNLT) ? TRUE : FALSE;
+ p_ptr->monlite = (cave[p_ptr->y][p_ptr->x].info & CAVE_MNLT) ? TRUE : FALSE;
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
{
if (p_ptr->monlite)
{
-#ifdef JP
- msg_print("影の覆いが薄れた気がする。");
-#else
- msg_print("Your mantle of shadow become thin.");
-#endif
+ msg_print(_("影の覆いが薄れた気がする。", "Your mantle of shadow become thin."));
}
else
{
-#ifdef JP
- msg_print("影の覆いが濃くなった!");
-#else
- msg_print("Your mantle of shadow restored its original darkness.");
-#endif
+ msg_print(_("影の覆いが濃くなった!", "Your mantle of shadow restored its original darkness."));
}
}
}
*
* This function assumes that (y,x) is legal (i.e. on the map).
*
- * Grid (y1,x1) is on the "diagonal" between (py,px) and (y,x)
- * Grid (y2,x2) is "adjacent", also between (py,px) and (y,x).
+ * Grid (y1,x1) is on the "diagonal" between (p_ptr->y,p_ptr->x) and (y,x)
+ * Grid (y2,x2) is "adjacent", also between (p_ptr->y,p_ptr->x) and (y,x).
*
* Note that we are using the "CAVE_XTRA" field for marking grids as
* "easily viewable". This bit is cleared at the end of "update_view()".
/* Hack -- check line of sight */
- if (los(py, px, y, x))
+ if (los(p_ptr->y, p_ptr->x, y, x))
{
cave_view_hack(c_ptr, y, x);
*/
void update_view(void)
{
- int n, m, d, k, y, x, z;
+ int n, m, d, k, z;
+ POSITION y, x;
int se, sw, ne, nw, es, en, ws, wn;
int full, over;
- int y_max = cur_hgt - 1;
- int x_max = cur_wid - 1;
+ POSITION y_max = cur_hgt - 1;
+ POSITION x_max = cur_wid - 1;
cave_type *c_ptr;
/*** Step 1 -- adjacent grids ***/
/* Now start on the player */
- y = py;
- x = px;
+ y = p_ptr->y;
+ x = p_ptr->x;
/* Access the grid */
c_ptr = &cave[y][x];
* it everytime the player moves out of LOS of the last
* "way-point".
*/
-static u16b flow_x = 0;
-static u16b flow_y = 0;
+static POSITION flow_x = 0;
+static POSITION flow_y = 0;
*/
void update_flow(void)
{
- int x, y, d;
+ POSITION x, y, d;
int flow_head = 1;
int flow_tail = 0;
}
/* Save player position */
- flow_y = py;
- flow_x = px;
+ flow_y = p_ptr->y;
+ flow_x = p_ptr->x;
/* Add the player's grid to the queue */
- temp_y[0] = py;
- temp_x[0] = px;
+ temp_y[0] = p_ptr->y;
+ temp_x[0] = p_ptr->x;
/* Now process the queue */
while (flow_head != flow_tail)
for (d = 0; d < 8; d++)
{
int old_head = flow_head;
- int m = cave[ty][tx].cost + 1;
- int n = cave[ty][tx].dist + 1;
+ byte_hack m = cave[ty][tx].cost + 1;
+ byte_hack n = cave[ty][tx].dist + 1;
cave_type *c_ptr;
/* Child location */
cave_type *c_ptr;
/* Translate table to map grids */
- y = i + py - 2;
- x = j + px - 2;
+ y = i + p_ptr->y - 2;
+ x = j + p_ptr->x - 2;
/* Check Bounds */
if (!in_bounds(y, x)) continue;
/*
* Hack -- map the current panel (plus some) ala "magic mapping"
*/
-void map_area(int range)
+void map_area(POSITION range)
{
int i, x, y;
cave_type *c_ptr;
{
for (x = 1; x < cur_wid - 1; x++)
{
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
c_ptr = &cave[y][x];
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
}
}
/*
* Change the "feat" flag for a grid, and notice/redraw the grid
*/
-void cave_set_feat(int y, int x, int feat)
+void cave_set_feat(POSITION y, POSITION x, IDX feat)
{
cave_type *c_ptr = &cave[y][x];
feature_type *f_ptr = &f_info[feat];
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
}
}
}
-int conv_dungeon_feat(int newfeat)
+IDX conv_dungeon_feat(IDX newfeat)
{
feature_type *f_ptr = &f_info[newfeat];
* Take a feature, determine what that feature becomes
* through applying the given action.
*/
-int feat_state(int feat, int action)
+IDX feat_state(IDX feat, int action)
{
feature_type *f_ptr = &f_info[feat];
int i;
void cave_alter_feat(int y, int x, int action)
{
/* Set old feature */
- int oldfeat = cave[y][x].feat;
+ IDX oldfeat = cave[y][x].feat;
/* Get the new feat */
- int newfeat = feat_state(oldfeat, action);
+ IDX newfeat = feat_state(oldfeat, action);
/* No change */
if (newfeat == oldfeat) return;
if (found && character_dungeon && player_can_see_bold(y, x))
{
-#ifdef JP
- msg_print("何かを発見した!");
-#else
- msg_print("You have found something!");
-#endif
+ msg_print(_("何かを発見した!", "You have found something!"));
}
}
*
* This is slightly (but significantly) different from "los(y1,x1,y2,x2)".
*/
-bool projectable(int y1, int x1, int y2, int x2)
+bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
- int y, x;
+ POSITION y, x;
int grid_n = 0;
u16b grid_g[512];
*
* Currently the "m" parameter is unused.
*/
-void scatter(int *yp, int *xp, int y, int x, int d, int m)
+void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, int m)
{
- int nx, ny;
+ POSITION nx, ny;
/* Unused */
m = m;
/*
* Track a new monster
*/
-void health_track(int m_idx)
+void health_track(MONSTER_IDX m_idx)
{
/* Mount monster is already tracked */
if (m_idx && m_idx == p_ptr->riding) return;
/*
* Hack -- track the given monster race
*/
-void monster_race_track(int r_idx)
+void monster_race_track(MONRACE_IDX r_idx)
{
/* Save this monster ID */
p_ptr->monster_race_idx = r_idx;
/*
* Hack -- track the given object kind
*/
-void object_kind_track(int k_idx)
+void object_kind_track(IDX k_idx)
{
/* Save this monster ID */
p_ptr->object_kind_idx = k_idx;