OSDN Git Service

[Refactor] #37353 cave_type 構造体を grid_type に改名。 / Rename cave_type structure to grid_...
authorDeskull <deskull@users.sourceforge.jp>
Mon, 11 Feb 2019 14:37:34 +0000 (23:37 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 11 Feb 2019 15:04:59 +0000 (00:04 +0900)
47 files changed:
src/autopick.c
src/cave.c
src/cmd-pet.c
src/cmd-pet.h
src/cmd2.c
src/cmd4.c
src/dungeon.c
src/externs.h
src/floor-events.c
src/floor-generate.c
src/floor-save.c
src/floor-streams.c
src/grid.c
src/init1.c
src/init2.c
src/load.c
src/melee1.c
src/mind.c
src/monster-process.c
src/monster1.c
src/monster2.c
src/mspells1.c
src/mutation.c
src/object1.c
src/object2.c
src/player-move.c
src/realm-hissatsu.c
src/rooms-normal.c
src/rooms-pitnest.c
src/rooms-special.c
src/rooms-trap.c
src/rooms-vault.c
src/rooms.c
src/save.c
src/shoot.c
src/spells-object.c
src/spells1.c
src/spells2.c
src/spells3.c
src/store.c
src/trap.c
src/types.h
src/variable.c
src/view-mainwindow.c
src/wild.c
src/wizard2.c
src/xtra2.c

index b1aaffc..6a9e877 100644 (file)
@@ -1699,7 +1699,7 @@ void autopick_alter_item(INVENTORY_IDX item, bool destroy)
 /*
  * Automatically pickup/destroy items in this grid.
  */
-void autopick_pickup_items(cave_type *c_ptr)
+void autopick_pickup_items(grid_type *c_ptr)
 {
        OBJECT_IDX this_o_idx, next_o_idx = 0;
        
index 5a8a76a..ad015e5 100644 (file)
@@ -79,7 +79,7 @@ bool is_trap(FEAT_IDX feat)
  * @param c_ptr マス構造体の参照ポインタ
  * @return 看破済みの罠があるならTRUEを返す。
  */
-bool is_known_trap(cave_type *c_ptr)
+bool is_known_trap(grid_type *c_ptr)
 {
        if (!c_ptr->mimic && !cave_have_flag_grid(c_ptr, FF_SECRET) &&
            is_trap(c_ptr->feat)) return TRUE;
@@ -105,7 +105,7 @@ bool is_closed_door(FEAT_IDX feat)
  * @param c_ptr マス構造体の参照ポインタ
  * @return 隠されたドアがあるならTRUEを返す。
  */
-bool is_hidden_door(cave_type *c_ptr)
+bool is_hidden_door(grid_type *c_ptr)
 {
        if ((c_ptr->mimic || cave_have_flag_grid(c_ptr, FF_SECRET)) &&
            is_closed_door(c_ptr->feat))
@@ -569,7 +569,7 @@ void update_local_illumination(POSITION y, POSITION x)
  */
 bool player_can_see_bold(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Blind players see nothing */
        if (p_ptr->blind) return FALSE;
@@ -617,7 +617,7 @@ bool no_lite(void)
  */
 bool cave_valid_bold(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        /* Forbid perma-grids */
@@ -944,7 +944,7 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
 void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
 {
        /* Get the cave */
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
@@ -1458,7 +1458,7 @@ void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x)
  */
 void note_spot(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        /* Blind players see nothing */
@@ -1743,7 +1743,7 @@ void prt_path(POSITION y, POSITION x)
        {
                POSITION ny = GRID_Y(path_g[i]);
                POSITION nx = GRID_X(path_g[i]);
-               cave_type *c_ptr = &cave[ny][nx];
+               grid_type *c_ptr = &cave[ny][nx];
 
                if (panel_contains(ny, nx))
                {
@@ -2557,7 +2557,7 @@ void update_lite(void)
 {
        int i, x, y, min_x, max_x, min_y, max_y;
        int p = p_ptr->cur_lite;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /*** Special case ***/
 
@@ -2781,7 +2781,7 @@ static POSITION mon_fy, mon_fx;
  */
 static void mon_lite_hack(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        int dpf, d;
        POSITION midpoint;
 
@@ -2868,7 +2868,7 @@ static void mon_lite_hack(POSITION y, POSITION x)
  */
 static void mon_dark_hack(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        int       midpoint, dpf, d;
 
        /* We trust this grid is in bounds */
@@ -2951,7 +2951,7 @@ static void mon_dark_hack(POSITION y, POSITION x)
 void update_mon_lite(void)
 {
        int i, rad;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        POSITION fx, fy;
        void (*add_mon_lite)(POSITION, POSITION);
@@ -3269,7 +3269,7 @@ void update_mon_lite(void)
 void clear_mon_lite(void)
 {
        int i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Clear all monster lit squares */
        for (i = 0; i < mon_lite_n; i++)
@@ -3294,7 +3294,7 @@ void forget_view(void)
 {
        int i;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* None to forget */
        if (!view_n) return;
@@ -3359,10 +3359,10 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
 {
        bool f1, f2, v1, v2, z1, z2, wall;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
-       cave_type *g1_c_ptr;
-       cave_type *g2_c_ptr;
+       grid_type *g1_c_ptr;
+       grid_type *g2_c_ptr;
 
        /* Access the grids */
        g1_c_ptr = &cave[y1][x1];
@@ -3551,7 +3551,7 @@ void update_view(void)
        POSITION y_max = cur_hgt - 1;
        POSITION x_max = cur_wid - 1;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /*** Initialize ***/
 
@@ -3996,7 +3996,7 @@ void update_view(void)
 void delayed_visual_update(void)
 {
        int       i, y, x;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Update needed grids */
        for (i = 0; i < redraw_n; i++)
@@ -4121,7 +4121,7 @@ void update_flow(void)
                        int old_head = flow_head;
                        byte_hack m = cave[ty][tx].cost + 1;
                        byte_hack n = cave[ty][tx].dist + 1;
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        /* Child location */
                        y = ty + ddy_ddd[d];
@@ -4217,7 +4217,7 @@ void update_smell(void)
        {
                for (j = 0; j < 5; j++)
                {
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        /* Translate table to map grids */
                        y = i + p_ptr->y - 2;
@@ -4251,7 +4251,7 @@ void map_area(POSITION range)
 {
        int i;
        POSITION x, y;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        FEAT_IDX feat;
        feature_type *f_ptr;
 
@@ -4354,7 +4354,7 @@ void wiz_lite(bool ninja)
                /* Scan all normal grids */
                for (x = 1; x < cur_wid - 1; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        /* Memorize terrain of the grid */
                        c_ptr->info |= (CAVE_KNOWN);
@@ -4430,7 +4430,7 @@ void wiz_dark(void)
        {
                for (x = 1; x < cur_wid - 1; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        /* Process the grid */
                        c_ptr->info &= ~(CAVE_MARK | CAVE_IN_DETECT | CAVE_KNOWN);
@@ -4482,7 +4482,7 @@ void wiz_dark(void)
  */
 void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[feat];
        bool old_los, old_mirror;
 
@@ -4559,7 +4559,7 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
        {
                DIRECTION i;
                POSITION yy, xx;
-               cave_type *cc_ptr;
+               grid_type *cc_ptr;
 
                for (i = 0; i < 9; i++)
                {
@@ -4701,7 +4701,7 @@ void cave_alter_feat(POSITION y, POSITION x, int action)
 /* Remove a mirror */
 void remove_mirror(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Remove the mirror */
        c_ptr->info &= ~(CAVE_OBJECT);
@@ -4725,7 +4725,7 @@ void remove_mirror(POSITION y, POSITION x)
 /*
  *  Return TRUE if there is a mirror on the grid.
  */
-bool is_mirror_grid(cave_type *c_ptr)
+bool is_mirror_grid(grid_type *c_ptr)
 {
        if ((c_ptr->info & CAVE_OBJECT) && have_flag(f_info[c_ptr->mimic].flags, FF_MIRROR))
                return TRUE;
@@ -4737,7 +4737,7 @@ bool is_mirror_grid(cave_type *c_ptr)
 /*
  *  Return TRUE if there is a mirror on the grid.
  */
-bool is_glyph_grid(cave_type *c_ptr)
+bool is_glyph_grid(grid_type *c_ptr)
 {
        if ((c_ptr->info & CAVE_OBJECT) && have_flag(f_info[c_ptr->mimic].flags, FF_GLYPH))
                return TRUE;
@@ -4749,7 +4749,7 @@ bool is_glyph_grid(cave_type *c_ptr)
 /*
  *  Return TRUE if there is a mirror on the grid.
  */
-bool is_explosive_rune_grid(cave_type *c_ptr)
+bool is_explosive_rune_grid(grid_type *c_ptr)
 {
        if ((c_ptr->info & CAVE_OBJECT) && have_flag(f_info[c_ptr->mimic].flags, FF_MINOR_GLYPH))
                return TRUE;
@@ -5013,7 +5013,7 @@ void glow_deep_lava_and_bldg(void)
 {
        POSITION y, x, yy, xx;
        DIRECTION i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Not in the darkness dungeon */
        if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) return;
@@ -5056,7 +5056,7 @@ void glow_deep_lava_and_bldg(void)
 bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode)
 {
        monster_type *m_ptr = &m_list[m_idx];
-       cave_type    *c_ptr = &cave[y][x];
+       grid_type    *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        /* Require "teleportable" space */
@@ -5086,7 +5086,7 @@ bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, B
 */
 bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode)
 {
-       cave_type    *c_ptr = &cave[y][x];
+       grid_type    *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        /* Require "teleportable" space */
index 222fe6d..a313c3e 100644 (file)
@@ -9,7 +9,7 @@
 * @param now_riding TRUEなら下馬処理、FALSEならば騎乗処理
 * @return 可能ならばTRUEを返す
 */
-bool player_can_ride_aux(cave_type *c_ptr, bool now_riding)
+bool player_can_ride_aux(grid_type *c_ptr, bool now_riding)
 {
        bool p_can_enter;
        bool old_character_xtra = character_xtra;
@@ -308,7 +308,7 @@ bool do_riding(bool force)
 {
        POSITION x, y;
        DIRECTION dir = 0;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        monster_type *m_ptr;
 
        if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
@@ -876,7 +876,7 @@ void do_cmd_pet(void)
                if (!target_set(TARGET_KILL)) pet_t_m_idx = 0;
                else
                {
-                       cave_type *c_ptr = &cave[target_row][target_col];
+                       grid_type *c_ptr = &cave[target_row][target_col];
                        if (c_ptr->m_idx && (m_list[c_ptr->m_idx].ml))
                        {
                                pet_t_m_idx = cave[target_row][target_col].m_idx;
@@ -1086,7 +1086,7 @@ bool rakuba(HIT_POINT dam, bool force)
                /* Check around the player */
                for (i = 0; i < 8; i++)
                {
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        /* Access the location */
                        y = p_ptr->y + ddy_ddd[i];
index de0c164..112c36e 100644 (file)
@@ -3,7 +3,7 @@ extern void check_pets_num_and_align(monster_type *m_ptr, bool inc);
 extern int calculate_upkeep(void);
 extern void do_cmd_pet_dismiss(void);
 extern void do_cmd_pet(void);
-extern bool player_can_ride_aux(cave_type *c_ptr, bool now_riding);
+extern bool player_can_ride_aux(grid_type *c_ptr, bool now_riding);
 extern bool rakuba(HIT_POINT dam, bool force);
 
 
index eab25ab..7077047 100644 (file)
@@ -136,7 +136,7 @@ void do_cmd_go_up(void)
        bool go_up = FALSE;
 
        /* Player grid */
-       cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
+       grid_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        int up_num = 0;
@@ -280,7 +280,7 @@ void do_cmd_go_up(void)
 void do_cmd_go_down(void)
 {
        /* Player grid */
-       cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
+       grid_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        bool fall_trap = FALSE;
@@ -477,7 +477,7 @@ void do_cmd_search(void)
  */
 static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        /* Scan all objects in the grid */
@@ -592,7 +592,7 @@ static int count_dt(POSITION *y, POSITION *x, bool (*test)(IDX feat), bool under
        /* Check around (and under) the character */
        for (d = 0; d < 9; d++)
        {
-               cave_type *c_ptr;
+               grid_type *c_ptr;
                FEAT_IDX feat;
 
                /* if not searching under player continue */
@@ -717,7 +717,7 @@ static bool do_cmd_open_aux(POSITION y, POSITION x)
        int i, j;
 
        /* Get requested grid */
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
        bool more = FALSE;
 
@@ -846,7 +846,7 @@ void do_cmd_open(void)
        if (get_rep_dir(&dir, TRUE))
        {
                FEAT_IDX feat;
-               cave_type *c_ptr;
+               grid_type *c_ptr;
 
                /* Get requested location */
                y = p_ptr->y + ddy[dir];
@@ -909,7 +909,7 @@ void do_cmd_open(void)
  */
 static bool do_cmd_close_aux(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        FEAT_IDX old_feat = c_ptr->feat;
        bool more = FALSE;
 
@@ -993,7 +993,7 @@ void do_cmd_close(void)
        /* Get a "repeated" direction */
        if (get_rep_dir(&dir, FALSE))
        {
-               cave_type *c_ptr;
+               grid_type *c_ptr;
                FEAT_IDX feat;
 
                y = p_ptr->y + ddy[dir];
@@ -1042,7 +1042,7 @@ void do_cmd_close(void)
  */
 static bool do_cmd_tunnel_test(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Must have knowledge */
        if (!(c_ptr->info & CAVE_MARK))
@@ -1077,7 +1077,7 @@ static bool do_cmd_tunnel_test(POSITION y, POSITION x)
  */
 static bool do_cmd_tunnel_aux(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr, *mimic_f_ptr;
        int power;
        concptr name;
@@ -1207,7 +1207,7 @@ void do_cmd_tunnel(void)
 {
        int                     y, x, dir;
 
-       cave_type       *c_ptr;
+       grid_type       *c_ptr;
        FEAT_IDX feat;
 
        bool            more = FALSE;
@@ -1295,7 +1295,7 @@ bool easy_open_door(POSITION y, POSITION x)
 {
        int i, j;
 
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        /* Must be a closed door */
@@ -1466,7 +1466,7 @@ static bool do_cmd_disarm_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
 
 bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Get feature */
        feature_type *f_ptr = &f_info[c_ptr->feat];
@@ -1586,7 +1586,7 @@ void do_cmd_disarm(void)
        /* Get a direction (or abort) */
        if (get_rep_dir(&dir,TRUE))
        {
-               cave_type *c_ptr;
+               grid_type *c_ptr;
                FEAT_IDX feat;
 
                y = p_ptr->y + ddy[dir];
@@ -1649,7 +1649,7 @@ void do_cmd_disarm(void)
 static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
 {
        /* Get grid */
-       cave_type       *c_ptr = &cave[y][x];
+       grid_type       *c_ptr = &cave[y][x];
 
        /* Get feature */
        feature_type *f_ptr = &f_info[c_ptr->feat];
@@ -1743,7 +1743,7 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
 void do_cmd_bash(void)
 {
        int     y, x, dir;
-       cave_type       *c_ptr;
+       grid_type       *c_ptr;
        bool            more = FALSE;
 
        if (p_ptr->wild_mode) return;
@@ -1828,7 +1828,7 @@ void do_cmd_alter(void)
 {
        POSITION y, x;
        DIRECTION dir;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool more = FALSE;
 
        if (p_ptr->special_defense & KATA_MUSOU)
@@ -1974,7 +1974,7 @@ void do_cmd_spike(void)
        {
                POSITION y, x;
                INVENTORY_IDX item;
-               cave_type *c_ptr;
+               grid_type *c_ptr;
                FEAT_IDX feat;
 
                y = p_ptr->y + ddy[dir];
@@ -2600,7 +2600,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
                /* Monster here, Try to hit it */
                if (cave[y][x].m_idx)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
                        monster_type *m_ptr = &m_list[c_ptr->m_idx];
 
                        /* Check the visibility */
@@ -2942,7 +2942,7 @@ static int travel_flow_cost(POSITION y, POSITION x)
  */
 static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
        int old_head = flow_head;
        int add_cost = 1;
index dd8d92b..93f1288 100644 (file)
@@ -5273,7 +5273,7 @@ static void do_cmd_knowledge_artifacts(void)
        {
                for (x = 0; x < cur_wid; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
index 7d16c61..08fcb6b 100644 (file)
@@ -3405,7 +3405,7 @@ static void process_world(void)
                for (i2 = 0; i2 < cur_wid; ++i2)
                        for (j2 = 0; j2 < cur_hgt; j2++)
                        {
-                               cave_type *c_ptr = &cave[j2][i2];
+                               grid_type *c_ptr = &cave[j2][i2];
 
                                if ((c_ptr->m_idx > 0) && (c_ptr->m_idx != p_ptr->riding))
                                {
index 5d49fb7..211d71c 100644 (file)
@@ -264,7 +264,7 @@ extern const char angband_term_name[8][16];
 extern byte angband_color_table[256][4];
 extern const concptr angband_sound_name[SOUND_MAX];
 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
-extern cave_type *cave[MAX_HGT];
+extern grid_type *cave[MAX_HGT];
 extern saved_floor_type saved_floors[MAX_SAVED_FLOORS];
 extern FLOOR_IDX max_floor_id;
 extern u32b saved_floor_file_sign;
@@ -454,7 +454,7 @@ extern concptr autopick_line_from_entry(autopick_type *entry);
 extern int is_autopick(object_type *o_ptr);
 extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
 extern void autopick_delayed_alter(void);
-extern void autopick_pickup_items(cave_type *c_ptr);
+extern void autopick_pickup_items(grid_type *c_ptr);
 extern bool autopick_autoregister(object_type *o_ptr);
 extern void do_cmd_edit_autopick(void);
 
@@ -469,9 +469,9 @@ extern void dump_yourself(FILE *fff);
 /* cave.c */
 extern POSITION distance(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern bool is_trap(IDX feat);
-extern bool is_known_trap(cave_type *c_ptr);
+extern bool is_known_trap(grid_type *c_ptr);
 extern bool is_closed_door(IDX feat);
-extern bool is_hidden_door(cave_type *c_ptr);
+extern bool is_hidden_door(grid_type *c_ptr);
 extern bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void update_local_illumination(POSITION y, POSITION x);
 extern bool player_can_see_bold(POSITION y, POSITION x);
@@ -506,9 +506,9 @@ extern FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat);
 extern FEAT_IDX feat_state(IDX feat, int action);
 extern void cave_alter_feat(POSITION y, POSITION x, int action);
 extern void remove_mirror(POSITION y, POSITION x);
-extern bool is_mirror_grid(cave_type *c_ptr);
-extern bool is_glyph_grid(cave_type *c_ptr);
-extern bool is_explosive_rune_grid(cave_type *c_ptr);
+extern bool is_mirror_grid(grid_type *c_ptr);
+extern bool is_glyph_grid(grid_type *c_ptr);
+extern bool is_explosive_rune_grid(grid_type *c_ptr);
 extern void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
index 02f4db4..0fd1a13 100644 (file)
@@ -13,7 +13,7 @@ void day_break()
                        for (x = 0; x < cur_wid; x++)
                        {
                                /* Get the cave grid */
-                               cave_type *c_ptr = &cave[y][x];
+                               grid_type *c_ptr = &cave[y][x];
 
                                /* Assume lit */
                                c_ptr->info |= (CAVE_GLOW);
@@ -51,7 +51,7 @@ void night_falls(void)
                        for (x = 0; x < cur_wid; x++)
                        {
                                /* Get the cave grid */
-                               cave_type *c_ptr = &cave[y][x];
+                               grid_type *c_ptr = &cave[y][x];
 
                                /* Feature code (applying "mimic" field) */
                                feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
index 1f01b90..9197c21 100644 (file)
@@ -147,7 +147,7 @@ static int next_to_walls(POSITION y, POSITION x)
  */
 static bool alloc_stairs_aux(POSITION y, POSITION x, int walls)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Require "naked" floor grid */
        if (!is_floor_grid(c_ptr)) return FALSE;
@@ -214,7 +214,7 @@ static bool alloc_stairs(IDX feat, int num, int walls)
                while (TRUE)
                {
                        POSITION y, x = 0;
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        int candidates = 0;
                        int pick;
@@ -290,7 +290,7 @@ static void alloc_object(int set, EFFECT_ID typ, int num)
        POSITION y = 0, x = 0;
        int k;
        int dummy = 0;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* A small level has few objects. */
        num = num * cur_hgt * cur_wid / (MAX_HGT*MAX_WID) +1;
@@ -420,7 +420,7 @@ bool place_quest_monsters(void)
                                /* Find an empty grid */
                                for (l = SAFE_MAX_ATTEMPTS; l > 0; l--)
                                {
-                                       cave_type    *c_ptr;
+                                       grid_type    *c_ptr;
                                        feature_type *f_ptr;
 
                                        y = randint0(cur_hgt);
@@ -466,7 +466,7 @@ bool place_quest_monsters(void)
  * @param c_ptr 永久壁を廃止したいマス構造体の参照ポインタ
  * @return なし
  */
-static void set_bound_perm_wall(cave_type *c_ptr)
+static void set_bound_perm_wall(grid_type *c_ptr)
 {
        if (bound_walls_perm)
        {
@@ -810,7 +810,7 @@ static bool cave_gen(void)
                        /* Turn the tunnel into corridor */
                        for (j = 0; j < dun->tunn_n; j++)
                        {
-                               cave_type *c_ptr;
+                               grid_type *c_ptr;
                                feature_type *f_ptr;
                                y = dun->tunn[j].y;
                                x = dun->tunn[j].x;
@@ -830,7 +830,7 @@ static bool cave_gen(void)
                        /* Apply the piercings that we found */
                        for (j = 0; j < dun->wall_n; j++)
                        {
-                               cave_type *c_ptr;
+                               grid_type *c_ptr;
                                y = dun->wall[j].y;
                                x = dun->wall[j].x;
                                c_ptr = &cave[y][x];
@@ -1364,7 +1364,7 @@ void clear_cave(void)
        {
                for (x = 0; x < MAX_WID; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
                        c_ptr->info = 0;
                        c_ptr->feat = 0;
                        c_ptr->o_idx = 0;
@@ -1523,7 +1523,7 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
 
        bool door_flag = FALSE;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Save the starting location */
        start_row = row1;
@@ -1713,7 +1713,7 @@ static bool set_tunnel(POSITION *x, POSITION *y, bool affectwall)
 {
        int i, j, dx, dy;
 
-       cave_type *c_ptr = &cave[*y][*x];
+       grid_type *c_ptr = &cave[*y][*x];
 
        if (!in_bounds(*y, *x)) return TRUE;
 
@@ -2007,7 +2007,7 @@ bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type,
        int length;
        int i;
        bool retval, firstsuccede;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        length = distance(x1, y1, x2, y2);
 
index e010275..15f4aa2 100644 (file)
@@ -758,7 +758,7 @@ static void locate_connected_stairs(saved_floor_type *sf_ptr)
        {
                for (x = 0; x < cur_wid; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
                        feature_type *f_ptr = &f_info[c_ptr->feat];
                        bool ok = FALSE;
 
@@ -845,7 +845,7 @@ static void locate_connected_stairs(saved_floor_type *sf_ptr)
  */
 void leave_floor(void)
 {
-       cave_type *c_ptr = NULL;
+       grid_type *c_ptr = NULL;
        feature_type *f_ptr;
        saved_floor_type *sf_ptr;
        MONRACE_IDX quest_r_idx = 0;
@@ -1133,7 +1133,7 @@ void change_floor(void)
                                /* Forbid return stairs */
                                if (change_floor_mode & CFM_NO_RETURN)
                                {
-                                       cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
+                                       grid_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
 
                                        if (!feat_uses_special(c_ptr->feat))
                                        {
@@ -1310,7 +1310,7 @@ void change_floor(void)
                        if (!(change_floor_mode & CFM_NO_RETURN))
                        {
                                /* Extract stair position */
-                               cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
+                               grid_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
 
                                /*** Create connected stairs ***/
 
@@ -1475,7 +1475,7 @@ void stair_creation(void)
                {
                        for (x = 0; x < cur_wid; x++)
                        {
-                               cave_type *c_ptr = &cave[y][x];
+                               grid_type *c_ptr = &cave[y][x];
 
                                if (!c_ptr->special) continue;
                                if (feat_uses_special(c_ptr->feat)) continue;
index 3a419d5..d8bd9e6 100644 (file)
@@ -39,7 +39,7 @@ static void recursive_river(POSITION x1, POSITION y1, POSITION x2, POSITION y2,
        POSITION changex, changey;
        POSITION ty, tx;
        bool done;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        length = distance(x1, y1, x2, y2);
 
@@ -232,7 +232,7 @@ void build_streamer(IDX feat, int chance)
        int             y, x, dir;
        int dummy = 0;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr;
 
        feature_type *streamer_ptr = &f_info[feat];
@@ -382,7 +382,7 @@ void build_streamer(IDX feat, int chance)
 void place_trees(POSITION x, POSITION y)
 {
        int i, j;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* place trees/ rubble in ovalish distribution */
        for (i = x - 3; i < x + 4; i++)
index bc64cef..f3a1b06 100644 (file)
@@ -30,7 +30,7 @@ bool new_player_spot(void)
        POSITION y = 0, x = 0;
        int max_attempts = 10000;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr;
 
        /* Place the player */
@@ -92,7 +92,7 @@ void place_random_stairs(POSITION y, POSITION x)
 {
        bool up_stairs = TRUE;
        bool down_stairs = TRUE;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Paranoia */
        c_ptr = &cave[y][x];
@@ -134,7 +134,7 @@ void place_random_door(POSITION y, POSITION x, bool room)
 {
        int tmp, type;
        FEAT_IDX feat = feat_none;
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Initialize mimic info */
        c_ptr->mimic = 0;
@@ -298,7 +298,7 @@ void place_secret_door(POSITION y, POSITION x, int type)
        }
        else
        {
-               cave_type *c_ptr = &cave[y][x];
+               grid_type *c_ptr = &cave[y][x];
 
                if (type == DOOR_DEFAULT)
                {
@@ -399,7 +399,7 @@ static int next_to_corr(POSITION y1, POSITION x1)
        int i, k = 0;
        POSITION y, x;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Scan adjacent grids */
        for (i = 0; i < 4; i++)
@@ -556,7 +556,7 @@ void vault_objects(POSITION y, POSITION x, int num)
        int dummy = 0;
        int i = 0, j = y, k = x;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
 
        /* Attempt to place 'num' objects */
@@ -614,7 +614,7 @@ void vault_trap_aux(POSITION y, POSITION x, POSITION yd, POSITION xd)
        int count = 0, y1 = y, x1 = x;
        int dummy = 0;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Place traps */
        for (count = 0; count <= 5; count++)
@@ -679,7 +679,7 @@ void vault_monsters(POSITION y1, POSITION x1, int num)
 {
        int k, i;
        POSITION y, x;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Try to summon "num" monsters "near" the given location */
        for (k = 0; k < num; k++)
index 005e205..f370b7d 100644 (file)
@@ -3900,7 +3900,7 @@ static errr parse_line_building(char *buf)
  */
 static void drop_here(object_type *j_ptr, POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        object_type *o_ptr;
 
        OBJECT_IDX o_idx = o_pop();
@@ -3984,7 +3984,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
 
                for (*x = xmin, i = 0; ((*x < xmax) && (i < len)); (*x)++, s++, i++)
                {
-                       cave_type *c_ptr = &cave[*y][*x];
+                       grid_type *c_ptr = &cave[*y][*x];
 
                        int idx = s[0];
 
index 4350e13..4427839 100644 (file)
@@ -1238,7 +1238,7 @@ static errr init_other(void)
        for (i = 0; i < MAX_HGT; i++)
        {
                /* Allocate one row of the cave */
-               C_MAKE(cave[i], MAX_WID, cave_type);
+               C_MAKE(cave[i], MAX_WID, grid_type);
        }
 
 
index f97a04a..44770ae 100644 (file)
@@ -2549,7 +2549,7 @@ static errr rd_dungeon_old(void)
        byte tmp8u;
        s16b tmp16s;
        u16b limit;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
 
        /*** Basic info ***/
@@ -2962,7 +2962,7 @@ static errr rd_dungeon_old(void)
  * この関数は、セーブデータの互換性を保つために多くのデータ改変処理を備えている。
  * 現在確認している処理は以下の通り、
  * <ul>
- * <li>1.7.0.2で8bitだったcave_typeのfeat,mimicのID値を16bitに拡張する処理。</li>
+ * <li>1.7.0.2で8bitだったgrid_typeのfeat,mimicのID値を16bitに拡張する処理。</li>
  * <li>1.7.0.8までに廃止、IDなどを差し替えたクエスト番号を置換する処理。</li>
  * </ul>
  * The monsters/objects must be loaded in the same order
@@ -3047,7 +3047,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
 
 
 
-       /*** Read template for cave_type ***/
+       /*** Read template for grid_type ***/
 
        /* Read the template count */
        rd_u16b(&limit);
@@ -3104,7 +3104,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
                for (i = count; i > 0; i--)
                {
                        /* Access the cave */
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        /* Extract cave data */
                        c_ptr->info = templates[id].info;
@@ -3130,7 +3130,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
                for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
                {
                        /* Access the cave */
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        if ((c_ptr->special == OLD_QUEST_WATER_CAVE) && !dun_level)
                        {
@@ -3204,7 +3204,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
                else
                {
                        /* Access the item location */
-                       cave_type *c_ptr = &cave[o_ptr->iy][o_ptr->ix];
+                       grid_type *c_ptr = &cave[o_ptr->iy][o_ptr->ix];
 
                        /* Build a stack */
                        o_ptr->next_o_idx = c_ptr->o_idx;
@@ -3226,7 +3226,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
        /* Read the monsters */
        for (i = 1; i < limit; i++)
        {
-               cave_type *c_ptr;
+               grid_type *c_ptr;
                MONSTER_IDX m_idx;
                monster_type *m_ptr;
 
index fc40a89..5f65914 100644 (file)
@@ -434,7 +434,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
        int num = 0, bonus, chance, vir;
        HIT_POINT k;
 
-       cave_type       *c_ptr = &cave[y][x];
+       grid_type       *c_ptr = &cave[y][x];
 
        monster_type    *m_ptr = &m_list[c_ptr->m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
@@ -1324,7 +1324,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
        bool            mdeath = FALSE;
        bool            stormbringer = FALSE;
 
-       cave_type       *c_ptr = &cave[y][x];
+       grid_type       *c_ptr = &cave[y][x];
        monster_type    *m_ptr = &m_list[c_ptr->m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
        GAME_TEXT m_name[MAX_NLEN];
index 3b3a389..2b9c874 100644 (file)
@@ -1644,7 +1644,7 @@ static bool cast_ninja_spell(int spell)
                {
                        POSITION ny = GRID_Y(path_g[i]);
                        POSITION nx = GRID_X(path_g[i]);
-                       cave_type *c_ptr = &cave[ny][nx];
+                       grid_type *c_ptr = &cave[ny][nx];
 
                        if (in_bounds(ny, nx) && cave_empty_bold(ny, nx) &&
                            !(c_ptr->info & CAVE_OBJECT) &&
index 6c21cdd..fdc473b 100644 (file)
@@ -472,7 +472,7 @@ static bool get_moves_aux2(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
        int i, best = 999;
        POSITION y, x, y1, x1;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool can_open_door = FALSE;
        int now_cost;
 
@@ -577,7 +577,7 @@ static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no
        int i, best;
        POSITION y, x, y1, x1;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool use_scent = FALSE;
 
        monster_type *m_ptr = &m_list[m_idx];
@@ -895,7 +895,7 @@ static bool find_safety(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
        POSITION *y_offsets;
        POSITION *x_offsets;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Start with adjacent locations, spread further */
        for (d = 1; d < 10; d++)
@@ -1060,7 +1060,7 @@ static bool get_moves(MONSTER_IDX m_idx, DIRECTION *mm)
        POSITION     x2 = p_ptr->x;
        bool         done = FALSE;
        bool         will_run = mon_will_run(m_idx);
-       cave_type    *c_ptr;
+       grid_type    *c_ptr;
        bool         no_flow = ((m_ptr->mflag2 & MFLAG2_NOFLOW) && (cave[m_ptr->fy][m_ptr->fx].cost > 2));
        bool         can_pass_wall = ((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall));
 
@@ -2084,7 +2084,7 @@ void process_monster(MONSTER_IDX m_idx)
 
        DIRECTION mm[8];
 
-       cave_type       *c_ptr;
+       grid_type       *c_ptr;
        feature_type    *f_ptr;
 
        monster_type    *y_ptr;
index 7bf7c44..ff6acf2 100644 (file)
@@ -2370,7 +2370,7 @@ bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 m
  */
 bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Player or other monster */
        if (player_bold(y, x)) return FALSE;
index 6f4e2dd..5c7f806 100644 (file)
@@ -311,7 +311,7 @@ void delete_monster_idx(MONSTER_IDX i)
  */
 void delete_monster(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Paranoia */
        if (!in_bounds(y, x)) return;
@@ -334,7 +334,7 @@ static void compact_monsters_aux(IDX i1, IDX i2)
 {
        POSITION y, x;
        int i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        monster_type *m_ptr;
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
@@ -2940,7 +2940,7 @@ byte get_mspeed(monster_race *r_ptr)
 static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
 {
        /* Access the location */
-       cave_type               *c_ptr = &cave[y][x];
+       grid_type               *c_ptr = &cave[y][x];
        monster_type    *m_ptr;
        monster_race    *r_ptr = &r_info[r_idx];
        concptr         name = (r_name + r_ptr->name);
index 9c9f565..bc5a6f7 100644 (file)
@@ -404,7 +404,7 @@ bool raise_possible(monster_type *m_ptr)
        POSITION y = m_ptr->fy;
        POSITION x = m_ptr->fx;
        OBJECT_IDX this_o_idx, next_o_idx = 0;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        for (xx = x - 5; xx <= x + 5; xx++)
        {
@@ -1257,7 +1257,7 @@ static bool adjacent_grid_check(monster_type *m_ptr, POSITION *yp, POSITION *xp,
        {
                int next_x = *xp + tonari_x[tonari][i];
                int next_y = *yp + tonari_y[tonari][i];
-               cave_type *c_ptr;
+               grid_type *c_ptr;
 
                /* Access the next grid */
                c_ptr = &cave[next_y][next_x];
index ffdf682..17b8545 100644 (file)
@@ -2281,7 +2281,7 @@ bool mutation_power_aux(int power)
                case MUT1_BANISH:
                        {
                                POSITION x, y;
-                               cave_type *c_ptr;
+                               grid_type *c_ptr;
                                monster_type *m_ptr;
                                monster_race *r_ptr;
                                if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
@@ -2328,7 +2328,7 @@ bool mutation_power_aux(int power)
                case MUT1_COLD_TOUCH:
                        {
                                POSITION x, y;
-                               cave_type *c_ptr;
+                               grid_type *c_ptr;
                                if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
                                y = p_ptr->y + ddy[dir];
                                x = p_ptr->x + ddx[dir];
index c4163a4..fd194d1 100644 (file)
@@ -4368,7 +4368,7 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode)
                        {
                                int i;
                                OBJECT_IDX o_idx;
-                               cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
+                               grid_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
 
                                if (command_wrk != (USE_FLOOR)) break;
 
index 3ff211f..4da5d60 100644 (file)
@@ -123,7 +123,7 @@ void excise_object_idx(OBJECT_IDX o_idx)
        /* Dungeon */
        else
        {
-               cave_type *c_ptr;
+               grid_type *c_ptr;
 
                POSITION y = j_ptr->iy;
                POSITION x = j_ptr->ix;
@@ -217,7 +217,7 @@ void delete_object_idx(OBJECT_IDX o_idx)
  */
 void delete_object(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        /* Refuse "illegal" locations */
@@ -257,7 +257,7 @@ void delete_object(POSITION y, POSITION x)
 static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
 {
        OBJECT_IDX i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        object_type *o_ptr;
 
        /* Do nothing */
@@ -487,7 +487,7 @@ void wipe_o_list(void)
                /* Dungeon */
                else
                {
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        /* Access location */
                        POSITION y = o_ptr->iy;
@@ -4868,7 +4868,7 @@ void place_object(POSITION y, POSITION x, BIT_FLAGS mode)
        OBJECT_IDX o_idx;
 
        /* Acquire grid */
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        object_type forge;
        object_type *q_ptr;
@@ -4982,7 +4982,7 @@ void place_gold(POSITION y, POSITION x)
        OBJECT_IDX o_idx;
 
        /* Acquire grid */
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        object_type forge;
        object_type *q_ptr;
@@ -5066,7 +5066,7 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
        OBJECT_IDX o_idx = 0;
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        GAME_TEXT o_name[MAX_NLEN];
 
@@ -6699,7 +6699,7 @@ static int blow_damcalc(monster_type *m_ptr, monster_blow *blow_ptr)
 bool process_warning(POSITION xx, POSITION yy)
 {
        POSITION mx, my;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        GAME_TEXT o_name[MAX_NLEN];
 
 #define WARNING_AWARE_RANGE 12
index 2fcaa1a..4ff3ba0 100644 (file)
@@ -360,7 +360,7 @@ HIT_POINT tot_dam_aux(object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, B
 static void discover_hidden_things(POSITION y, POSITION x)
 {
        OBJECT_IDX this_o_idx, next_o_idx = 0;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        c_ptr = &cave[y][x];
 
        /* Invisible trap */
@@ -545,7 +545,7 @@ void py_pickup_aux(OBJECT_IDX o_idx)
  */
 void carry(bool pickup)
 {
-       cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
+       grid_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
 
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
@@ -825,8 +825,8 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
 {
        POSITION oy = p_ptr->y;
        POSITION ox = p_ptr->x;
-       cave_type *c_ptr = &cave[ny][nx];
-       cave_type *oc_ptr = &cave[oy][ox];
+       grid_type *c_ptr = &cave[ny][nx];
+       grid_type *oc_ptr = &cave[oy][ox];
        feature_type *f_ptr = &f_info[c_ptr->feat];
        feature_type *of_ptr = &f_info[oc_ptr->feat];
 
@@ -1104,7 +1104,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
        POSITION x = p_ptr->x + ddx[dir];
 
        /* Examine the destination */
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
@@ -1518,7 +1518,7 @@ static bool ignore_avoid_run;
  */
 static bool see_wall(DIRECTION dir, POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Get the new location */
        y += ddy[dir];
@@ -1733,7 +1733,7 @@ static bool run_test(void)
        int row, col;
        int i, max, inv;
        int option = 0, option2 = 0;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        FEAT_IDX feat;
        feature_type *f_ptr;
 
@@ -2127,7 +2127,7 @@ static DIRECTION travel_test(DIRECTION prev_dir)
 {
        DIRECTION new_dir = 0;
        int i, max;
-       const cave_type *c_ptr;
+       const grid_type *c_ptr;
        int cost;
 
        /* Cannot travel when blind */
index 3111b76..4b3f843 100644 (file)
@@ -512,7 +512,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        POSITION y = 0, x = 0;
 
-                       cave_type       *c_ptr;
+                       grid_type       *c_ptr;
                        monster_type    *m_ptr;
 
                        if (p_ptr->cut < 300)
@@ -634,7 +634,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                POSITION y, x;
                                POSITION ny, nx;
                                MONSTER_IDX m_idx;
-                               cave_type *c_ptr;
+                               grid_type *c_ptr;
                                monster_type *m_ptr;
 
                                y = p_ptr->y + ddy[dir];
index 28e9a9b..5c7ad41 100644 (file)
@@ -16,7 +16,7 @@ bool build_type1(void)
 
        bool light;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        bool curtain = (d_info[p_ptr->dungeon_idx].flags1 & DF1_CURTAIN) &&
                one_in_((d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_CAVE) ? 48 : 512);
@@ -210,7 +210,7 @@ bool build_type2(void)
        POSITION        y1a, x1a, y2a, x2a;
        POSITION        y1b, x1b, y2b, x2b;
        bool            light;
-       cave_type   *c_ptr;
+       grid_type   *c_ptr;
 
        /* Find and reserve some space in the dungeon.  Get center of room. */
        if (!find_space(&yval, &xval, 11, 25)) return FALSE;
@@ -333,7 +333,7 @@ bool build_type3(void)
        POSITION y1b, x1b, y2b, x2b;
        POSITION yval, xval;
        bool light;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
 
        /* Find and reserve some space in the dungeon.  Get center of room. */
@@ -588,7 +588,7 @@ bool build_type4(void)
        POSITION y, x, y1, x1;
        POSITION y2, x2, tmp, yval, xval;
        bool light;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
 
        /* Find and reserve some space in the dungeon.  Get center of room. */
index cd3dfa7..94502a7 100644 (file)
@@ -284,7 +284,7 @@ bool build_type5(void)
 
        monster_type align;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        int cur_nest_type = pick_vault_type(nest_types, d_info[p_ptr->dungeon_idx].nest);
        vault_aux_type *n_ptr;
@@ -495,7 +495,7 @@ bool build_type6(void)
 
        monster_type align;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        int cur_pit_type = pick_vault_type(pit_types, d_info[p_ptr->dungeon_idx].pit);
        vault_aux_type *n_ptr;
@@ -800,7 +800,7 @@ bool build_type13(void)
 
        monster_type align;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        int cur_pit_type = pick_vault_type(pit_types, d_info[p_ptr->dungeon_idx].pit);
        vault_aux_type *n_ptr;
index e2a239a..a7e4784 100644 (file)
@@ -17,7 +17,7 @@ bool build_type15(void)
        POSITION y1, x1, xsize, ysize;
        bool light;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Pick a room size */
        xsize = rand_range(9, 13);
index c3a9597..5243011 100644 (file)
@@ -17,7 +17,7 @@ bool build_type14(void)
 
        bool light;
 
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        s16b trap;
 
        /* Pick a room size */
index 8c2f988..4d3180b 100644 (file)
@@ -309,7 +309,7 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
 {
        POSITION dx, dy, x, y, i, j;
        concptr t;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Place dungeon features and objects */
        for (t = data, dy = 0; dy < ymax; dy++)
@@ -1066,7 +1066,7 @@ static void build_mini_c_vault(POSITION x0, POSITION y0, POSITION xsize, POSITIO
        {
                for (x = x1 - 1; x <= x2 + 1; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        c_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
 
index a3c6fb1..1c5e534 100644 (file)
@@ -1692,7 +1692,7 @@ void build_maze_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize,
        POSITION y1, x1, y2, x2;
        int m, n, num_vertices, *visited;
        bool light;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        msg_print_wizard(CHEAT_DUNGEON, _("迷路ランダムVaultを生成しました。", "Maze Vault."));
 
@@ -1963,7 +1963,7 @@ void build_recursive_room(POSITION x1, POSITION y1, POSITION x2, POSITION y2, in
  */
 void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr;
        int i, j;
 
@@ -2042,7 +2042,7 @@ void generate_room_floor(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int
 {
        POSITION y, x;
        
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        for (y = y1; y <= y2; y++)
        {
index 62a9059..5a14299 100644 (file)
@@ -949,7 +949,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
 
 
-       /*********** Make template for cave_type **********/
+       /*********** Make template for grid_type **********/
 
        /*
         * Usually number of templates are fewer than 255.  Even if
@@ -973,7 +973,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        {
                for (x = 0; x < cur_wid; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        for (i = 0; i < num_temp; i++)
                        {
@@ -1053,7 +1053,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        {
                for (x = 0; x < cur_wid; x++)
                {
-                       cave_type *c_ptr = &cave[y][x];
+                       grid_type *c_ptr = &cave[y][x];
 
                        for (i = 0; i < num_temp; i++)
                        {
index 0b99807..4dceee9 100644 (file)
@@ -506,7 +506,7 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
                /* Travel until stopped */
                for (cur_dis = 0; cur_dis <= tdis; )
                {
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        /* Hack -- Stop at the target */
                        if ((y == ty) && (x == tx)) break;
@@ -597,7 +597,7 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
                        /* Monster here, Try to hit it */
                        if (cave[y][x].m_idx)
                        {
-                               cave_type *c_mon_ptr = &cave[y][x];
+                               grid_type *c_mon_ptr = &cave[y][x];
 
                                monster_type *m_ptr = &m_list[c_mon_ptr->m_idx];
                                monster_race *r_ptr = &r_info[m_ptr->r_idx];
index cf5b1e7..ba9065b 100644 (file)
@@ -107,7 +107,7 @@ bool create_ammo(void)
        {
                POSITION x, y;
                DIRECTION dir;
-               cave_type *c_ptr;
+               grid_type *c_ptr;
 
                if (!get_rep_dir(&dir, FALSE)) return FALSE;
                y = p_ptr->y + ddy[dir];
index 07ad8ba..401f331 100644 (file)
@@ -304,7 +304,7 @@ static POSITION monster_target_y; /*!< モンスターの攻撃目標Y座標 */
  */
 static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        bool obvious = FALSE;
@@ -648,7 +648,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                                if (in_bounds2(by, bx))
                                                {
-                                                       cave_type *cc_ptr = &cave[by][bx];
+                                                       grid_type *cc_ptr = &cave[by][bx];
 
                                                        if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
                                                        {
@@ -797,7 +797,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
  */
 static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
@@ -1177,7 +1177,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 {
        int tmp;
 
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        monster_type *m_ptr = &m_list[c_ptr->m_idx];
        monster_type *caster_ptr = (who > 0) ? &m_list[who] : NULL;
index 2b3ef60..bf77bcb 100644 (file)
@@ -38,7 +38,7 @@ static bool detect_feat_flag(POSITION range, int flag, bool known)
 {
        POSITION x, y;
        bool detect = FALSE;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
 
@@ -1394,7 +1394,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
 {
        POSITION y, x;
        int k, t;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool flag = FALSE;
 
        /* Prevent destruction of quest levels and town */
@@ -1597,7 +1597,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
                                {
                                        DIRECTION i;
                                        POSITION yy, xx;
-                                       cave_type *cc_ptr;
+                                       grid_type *cc_ptr;
 
                                        for (i = 0; i < 9; i++)
                                        {
@@ -1682,7 +1682,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
        int sn = 0;
        POSITION sy = 0, sx = 0;
        bool hurt = FALSE;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool map[32][32];
 
        /* Prevent destruction of quest levels and town */
@@ -2067,7 +2067,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
                        {
                                DIRECTION ii;
                                POSITION yyy, xxx;
-                               cave_type *cc_ptr;
+                               grid_type *cc_ptr;
 
                                for (ii = 0; ii < 9; ii++)
                                {
@@ -2196,7 +2196,7 @@ static void cave_temp_room_lite(void)
                POSITION y = temp_y[i];
                POSITION x = temp_x[i];
 
-               cave_type *c_ptr = &cave[y][x];
+               grid_type *c_ptr = &cave[y][x];
 
                /* No longer in the array */
                c_ptr->info &= ~(CAVE_TEMP);
@@ -2271,7 +2271,7 @@ static void cave_temp_room_unlite(void)
                POSITION x = temp_x[i];
                int j;
 
-               cave_type *c_ptr = &cave[y][x];
+               grid_type *c_ptr = &cave[y][x];
                bool do_dark = !is_mirror_grid(c_ptr);
 
                /* No longer in the array */
@@ -2289,7 +2289,7 @@ static void cave_temp_room_unlite(void)
 
                                        if (in_bounds2(by, bx))
                                        {
-                                               cave_type *cc_ptr = &cave[by][bx];
+                                               grid_type *cc_ptr = &cave[by][bx];
 
                                                if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
                                                {
@@ -2402,7 +2402,7 @@ static int next_to_walls_adj(POSITION cy, POSITION cx, bool (*pass_bold)(POSITIO
  */
 static void cave_temp_room_aux(POSITION y, POSITION x, bool only_room, bool (*pass_bold)(POSITION, POSITION))
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Get the grid */
        c_ptr = &cave[y][x];
@@ -2891,7 +2891,7 @@ bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int n
 bool teleport_swap(DIRECTION dir)
 {
        POSITION tx, ty;
-       cave_type* c_ptr;
+       grid_type* c_ptr;
        monster_type* m_ptr;
        monster_race* r_ptr;
 
@@ -4607,7 +4607,7 @@ bool_hack vampirism(void)
        DIRECTION dir;
        POSITION x, y;
        int dummy;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
        {
@@ -4969,7 +4969,7 @@ void hayagake(player_type *creature_ptr)
        }
        else
        {
-               cave_type *c_ptr = &cave[creature_ptr->y][creature_ptr->x];
+               grid_type *c_ptr = &cave[creature_ptr->y][creature_ptr->x];
                feature_type *f_ptr = &f_info[c_ptr->feat];
 
                if (!have_flag(f_ptr->flags, FF_PROJECT) ||
@@ -5098,7 +5098,7 @@ bool sword_dancing(player_type *creature_ptr)
        DIRECTION dir;
        POSITION y = 0, x = 0;
        int i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        for (i = 0; i < 6; i++)
        {
index 6f86499..436951f 100644 (file)
@@ -1377,7 +1377,7 @@ void brand_weapon(int brand_type)
 static bool vanish_dungeon(void)
 {
        POSITION y, x;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr;
        monster_type *m_ptr;
        GAME_TEXT m_name[MAX_NLEN];
@@ -1505,7 +1505,7 @@ static bool vanish_dungeon(void)
 void call_the_(void)
 {
        int i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool do_call = TRUE;
 
        for (i = 0; i < 9; i++)
@@ -1588,7 +1588,7 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
 {
        POSITION ty, tx;
        OBJECT_IDX i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        object_type *o_ptr;
        GAME_TEXT o_name[MAX_NLEN];
 
@@ -4141,7 +4141,7 @@ static MONRACE_IDX poly_r_idx(MONRACE_IDX r_idx)
  */
 bool polymorph_monster(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        monster_type *m_ptr = &m_list[c_ptr->m_idx];
        bool polymorphed = FALSE;
        MONRACE_IDX new_r_idx;
@@ -4579,7 +4579,7 @@ bool eat_magic(int power)
 void massacre(void)
 {
        POSITION x, y;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        monster_type *m_ptr;
        DIRECTION dir;
 
@@ -4599,7 +4599,7 @@ void massacre(void)
 bool eat_lock(void)
 {
        POSITION x, y;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr, *mimic_f_ptr;
        DIRECTION dir;
 
index 7223197..147adc8 100644 (file)
@@ -5749,7 +5749,7 @@ void do_cmd_store(void)
        int which;
        int maintain_num;
        int i;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
        TERM_LEN w, h;
 
index 44d26e3..39c488c 100644 (file)
@@ -82,7 +82,7 @@ FEAT_IDX choose_random_trap(void)
 */
 void disclose_grid(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        if (cave_have_flag_grid(c_ptr, FF_SECRET))
        {
@@ -111,7 +111,7 @@ void disclose_grid(POSITION y, POSITION x)
 */
 void place_trap(POSITION y, POSITION x)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
 
        /* Paranoia -- verify location */
        if (!in_bounds(y, x)) return;
@@ -303,7 +303,7 @@ void hit_trap(bool break_trap)
        POSITION x = p_ptr->x, y = p_ptr->y;
 
        /* Get the cave grid */
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
        int trap_feat_type = have_flag(f_ptr->flags, FF_TRAP) ? f_ptr->subtype : NOT_TRAP;
        concptr name = _("トラップ", "a trap");
index dadda03..d1285a3 100644 (file)
@@ -37,7 +37,7 @@
  *
  * Certain data is saved in multiple places for efficient access, currently,
  * this includes the tval/sval/weight fields in "object_type", various fields
- * in "header_type", and the "m_idx" and "o_idx" fields in "cave_type".  All
+ * in "header_type", and the "m_idx" and "o_idx" fields in "grid_type".  All
  * of these could be removed, but this would, in general, slow down the game
  * and increase the complexity of the code.
  * </pre>
@@ -450,9 +450,9 @@ struct skill_table
  * Note the special fields for the "MONSTER_FLOW" code.
  */
 
-typedef struct cave_type cave_type;
+typedef struct grid_type grid_type;
 
-struct cave_type
+struct grid_type
 {
        BIT_FLAGS info;         /* Hack -- cave flags */
 
index 269d86c..a9a7a64 100644 (file)
@@ -465,7 +465,7 @@ const concptr angband_music_basic_name[MUSIC_BASIC_MAX] =
  * Not completely allocated, that would be inefficient
  * Not completely hardcoded, that would overflow memory
  */
-cave_type *cave[MAX_HGT];
+grid_type *cave[MAX_HGT];
 
 
 /*
index 6dc026f..87ee7ff 100644 (file)
@@ -1695,7 +1695,7 @@ void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
        int i;
 
        for(i=0;i<temp_n;i++){
-               cave_type* c_ptr = &cave[temp_y[i]][temp_x[i]];
+               grid_type* c_ptr = &cave[temp_y[i]][temp_x[i]];
                if(!c_ptr->m_idx || !m_list[c_ptr->m_idx].ml)continue;//no mons or cannot look
                m_ptr = &m_list[c_ptr->m_idx];
                if(is_pet(m_ptr))continue;//pet
index 26aa5a9..b55ac64 100644 (file)
@@ -449,7 +449,7 @@ static border_type border;
 void wilderness_gen(void)
 {
        int i, y, x, lim;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        feature_type *f_ptr;
 
        /* Big town */
index c0ec8b2..03dda76 100644 (file)
@@ -1573,7 +1573,7 @@ static void do_cmd_wiz_create_feature(void)
 {
        static int   prev_feat = 0;
        static int   prev_mimic = 0;
-       cave_type    *c_ptr;
+       grid_type    *c_ptr;
        feature_type *f_ptr;
        char         tmp_val[160];
        IDX          tmp_feat, tmp_mimic;
index ab5e716..beb8c9a 100644 (file)
@@ -590,8 +590,8 @@ static bool ang_sort_comp_importance(vptr u, vptr v, int a, int b)
 {
        POSITION *x = (POSITION*)(u);
        POSITION *y = (POSITION*)(v);
-       cave_type *ca_ptr = &cave[y[a]][x[a]];
-       cave_type *cb_ptr = &cave[y[b]][x[b]];
+       grid_type *ca_ptr = &cave[y[a]][x[a]];
+       grid_type *cb_ptr = &cave[y[b]][x[b]];
        monster_type *ma_ptr = &m_list[ca_ptr->m_idx];
        monster_type *mb_ptr = &m_list[cb_ptr->m_idx];
        monster_race *ap_ra_ptr, *ap_rb_ptr;
@@ -728,7 +728,7 @@ static POSITION_IDX target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION
  */
 static bool target_set_accept(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        /* Bounds */
@@ -814,7 +814,7 @@ static void target_set_prepare(BIT_FLAGS mode)
        {
                for (x = min_wid; x <= max_wid; x++)
                {
-                       cave_type *c_ptr;
+                       grid_type *c_ptr;
 
                        /* Require "interesting" contents */
                        if (!target_set_accept(y, x)) continue;
@@ -948,7 +948,7 @@ bool show_gold_on_floor = FALSE;
  */
 static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, concptr info)
 {
-       cave_type *c_ptr = &cave[y][x];
+       grid_type *c_ptr = &cave[y][x];
        OBJECT_IDX this_o_idx, next_o_idx = 0;
        concptr s1 = "", s2 = "", s3 = "", x_info = "";
        bool boring = TRUE;
@@ -1493,7 +1493,7 @@ bool target_set(BIT_FLAGS mode)
        char query;
        char info[80];
        char same_key;
-       cave_type *c_ptr;
+       grid_type *c_ptr;
        TERM_LEN wid, hgt;
        
        get_screen_size(&wid, &hgt);
@@ -2366,7 +2366,7 @@ bool get_rep_dir(DIRECTION *dp, bool under)
  */
 static bool tgt_pt_accept(POSITION y, POSITION x)
 {
-       cave_type *c_ptr;
+       grid_type *c_ptr;
 
        /* Bounds */
        if (!(in_bounds(y, x))) return (FALSE);
@@ -2494,7 +2494,7 @@ bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
                                /* Skip stairs which have defferent distance */
                                for (; n < temp_n; ++ n)
                                {
-                                       cave_type *c_ptr = &cave[temp_y[n]][temp_x[n]];
+                                       grid_type *c_ptr = &cave[temp_y[n]][temp_x[n]];
 
                                        if (cave_have_flag_grid(c_ptr, FF_STAIRS) &&
                                            cave_have_flag_grid(c_ptr, ch == '>' ? FF_MORE : FF_LESS))