OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / cave.c
index cb2d0f9..a921d35 100644 (file)
@@ -17,6 +17,7 @@
 
 
 #include "angband.h"
+#include "world.h"
 
 static byte display_autopick; /*!< 自動拾い状態の設定フラグ */
 static int match_autopick;
@@ -67,7 +68,7 @@ POSITION distance (POSITION y1, POSITION x1, POSITION y2, POSITION x2)
  * @param feat 地形情報のID
  * @return 罠持ちの地形ならばTRUEを返す。
  */
-bool is_trap(IDX feat)
+bool is_trap(FEAT_IDX feat)
 {
        return have_flag(f_info[feat].flags, FF_TRAP);
 }
@@ -90,7 +91,7 @@ bool is_known_trap(cave_type *c_ptr)
  * @param feat 地形情報のID
  * @return 閉じたドアのある地形ならばTRUEを返す。
  */
-bool is_closed_door(IDX feat)
+bool is_closed_door(FEAT_IDX feat)
 {
        feature_type *f_ptr = &f_info[feat];
 
@@ -160,22 +161,22 @@ bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
        POSITION dx, dy;
 
        /* Absolute */
-       int ax, ay;
+       POSITION ax, ay;
 
        /* Signs */
-       int sx, sy;
+       POSITION sx, sy;
 
        /* Fractions */
-       int qx, qy;
+       POSITION qx, qy;
 
        /* Scanners */
-       int tx, ty;
+       POSITION tx, ty;
 
        /* Scale factors */
-       int f1, f2;
+       POSITION f1, f2;
 
        /* Slope, or 1/Slope, of LOS */
-       int m;
+       POSITION m;
 
 
        /* Extract the offset */
@@ -1651,13 +1652,13 @@ void lite_spot(POSITION y, POSITION x)
  */
 void prt_map(void)
 {
-       int     x, y;
-       int     v;
+       POSITION x, y;
+       int v;
 
        /* map bounds */
-       s16b xmin, xmax, ymin, ymax;
+       POSITION xmin, xmax, ymin, ymax;
 
-       int wid, hgt;
+       TERM_LEN wid, hgt;
 
        Term_get_size(&wid, &hgt);
 
@@ -2184,16 +2185,12 @@ void do_cmd_view_map(void)
 {
        int cy, cx;
 
-
-       /* Save the screen */
        screen_save();
 
        /* Note */
        prt(_("お待ち下さい...", "Please wait..."), 0, 0);
 
        Term_fresh();
-
-       /* Clear the screen */
        Term_clear();
 
        display_autopick = 0;
@@ -2256,8 +2253,6 @@ void do_cmd_view_map(void)
                /* Get any key */
                inkey();
        }
-
-       /* Restore the screen */
        screen_load();
 }
 
@@ -4663,10 +4658,10 @@ FEAT_IDX feat_state(FEAT_IDX feat, int action)
 void cave_alter_feat(POSITION y, POSITION x, int action)
 {
        /* Set old feature */
-       IDX oldfeat = cave[y][x].feat;
+       FEAT_IDX oldfeat = cave[y][x].feat;
 
        /* Get the new feat */
-       IDX newfeat = feat_state(oldfeat, action);
+       FEAT_IDX newfeat = feat_state(oldfeat, action);
 
        /* No change */
        if (newfeat == oldfeat) return;