From cc671828e26c0cb2d16d1b3526b3b77b6e8b3081 Mon Sep 17 00:00:00 2001 From: Deskull Date: Mon, 11 Feb 2019 23:37:34 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20cave=5Ftype=20=E6=A7=8B?= =?utf8?q?=E9=80=A0=E4=BD=93=E3=82=92=20grid=5Ftype=20=E3=81=AB=E6=94=B9?= =?utf8?q?=E5=90=8D=E3=80=82=20/=20Rename=20cave=5Ftype=20structure=20to?= =?utf8?q?=20grid=5Ftype.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 2 +- src/cave.c | 64 +++++++++++++++++++++++++-------------------------- src/cmd-pet.c | 8 +++---- src/cmd-pet.h | 2 +- src/cmd2.c | 40 ++++++++++++++++---------------- src/cmd4.c | 2 +- src/dungeon.c | 2 +- src/externs.h | 14 +++++------ src/floor-events.c | 4 ++-- src/floor-generate.c | 22 +++++++++--------- src/floor-save.c | 10 ++++---- src/floor-streams.c | 6 ++--- src/grid.c | 16 ++++++------- src/init1.c | 4 ++-- src/init2.c | 2 +- src/load.c | 14 +++++------ src/melee1.c | 4 ++-- src/mind.c | 2 +- src/monster-process.c | 10 ++++---- src/monster1.c | 2 +- src/monster2.c | 6 ++--- src/mspells1.c | 4 ++-- src/mutation.c | 4 ++-- src/object1.c | 2 +- src/object2.c | 16 ++++++------- src/player-move.c | 16 ++++++------- src/realm-hissatsu.c | 4 ++-- src/rooms-normal.c | 8 +++---- src/rooms-pitnest.c | 6 ++--- src/rooms-special.c | 2 +- src/rooms-trap.c | 2 +- src/rooms-vault.c | 4 ++-- src/rooms.c | 6 ++--- src/save.c | 6 ++--- src/shoot.c | 4 ++-- src/spells-object.c | 2 +- src/spells1.c | 8 +++---- src/spells2.c | 26 ++++++++++----------- src/spells3.c | 12 +++++----- src/store.c | 2 +- src/trap.c | 6 ++--- src/types.h | 6 ++--- src/variable.c | 2 +- src/view-mainwindow.c | 2 +- src/wild.c | 2 +- src/wizard2.c | 2 +- src/xtra2.c | 16 ++++++------- 47 files changed, 203 insertions(+), 203 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index b1aaffc0c..6a9e87700 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -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; diff --git a/src/cave.c b/src/cave.c index 5a8a76ad5..ad015e5b8 100644 --- a/src/cave.c +++ b/src/cave.c @@ -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 */ diff --git a/src/cmd-pet.c b/src/cmd-pet.c index 222fe6dcf..a313c3e1e 100644 --- a/src/cmd-pet.c +++ b/src/cmd-pet.c @@ -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]; diff --git a/src/cmd-pet.h b/src/cmd-pet.h index de0c16423..112c36e3d 100644 --- a/src/cmd-pet.h +++ b/src/cmd-pet.h @@ -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); diff --git a/src/cmd2.c b/src/cmd2.c index eab25ab5d..7077047d2 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -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; diff --git a/src/cmd4.c b/src/cmd4.c index dd8d92bf1..93f1288c9 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -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; diff --git a/src/dungeon.c b/src/dungeon.c index 7d16c6156..08fcb6b78 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -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)) { diff --git a/src/externs.h b/src/externs.h index 5d49fb713..211d71c36 100644 --- a/src/externs.h +++ b/src/externs.h @@ -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); diff --git a/src/floor-events.c b/src/floor-events.c index 02f4db490..0fd1a133f 100644 --- a/src/floor-events.c +++ b/src/floor-events.c @@ -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)]; diff --git a/src/floor-generate.c b/src/floor-generate.c index 1f01b906d..9197c21d2 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -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); diff --git a/src/floor-save.c b/src/floor-save.c index e0102754a..15f4aa221 100644 --- a/src/floor-save.c +++ b/src/floor-save.c @@ -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; diff --git a/src/floor-streams.c b/src/floor-streams.c index 3a419d567..d8bd9e637 100644 --- a/src/floor-streams.c +++ b/src/floor-streams.c @@ -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++) diff --git a/src/grid.c b/src/grid.c index bc64cef23..f3a1b069d 100644 --- a/src/grid.c +++ b/src/grid.c @@ -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++) diff --git a/src/init1.c b/src/init1.c index 005e20512..f370b7dbb 100644 --- a/src/init1.c +++ b/src/init1.c @@ -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]; diff --git a/src/init2.c b/src/init2.c index 4350e13fa..442783916 100644 --- a/src/init2.c +++ b/src/init2.c @@ -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); } diff --git a/src/load.c b/src/load.c index f97a04ab5..44770ae24 100644 --- a/src/load.c +++ b/src/load.c @@ -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) * この関数は、セーブデータの互換性を保つために多くのデータ改変処理を備えている。 * 現在確認している処理は以下の通り、 * * 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; diff --git a/src/melee1.c b/src/melee1.c index fc40a89ed..5f6591476 100644 --- a/src/melee1.c +++ b/src/melee1.c @@ -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]; diff --git a/src/mind.c b/src/mind.c index 3b3a389ee..2b9c874b4 100644 --- a/src/mind.c +++ b/src/mind.c @@ -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) && diff --git a/src/monster-process.c b/src/monster-process.c index 6c21cdd17..fdc473b09 100644 --- a/src/monster-process.c +++ b/src/monster-process.c @@ -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; diff --git a/src/monster1.c b/src/monster1.c index 7bf7c4485..ff6acf2c4 100644 --- a/src/monster1.c +++ b/src/monster1.c @@ -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; diff --git a/src/monster2.c b/src/monster2.c index 6f4e2dd6d..5c7f8060a 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -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); diff --git a/src/mspells1.c b/src/mspells1.c index 9c9f5659d..bc5a6f75c 100644 --- a/src/mspells1.c +++ b/src/mspells1.c @@ -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]; diff --git a/src/mutation.c b/src/mutation.c index ffdf6826b..17b854540 100644 --- a/src/mutation.c +++ b/src/mutation.c @@ -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]; diff --git a/src/object1.c b/src/object1.c index c4163a4c4..fd194d11a 100644 --- a/src/object1.c +++ b/src/object1.c @@ -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; diff --git a/src/object2.c b/src/object2.c index 3ff211f9c..4da5d60be 100644 --- a/src/object2.c +++ b/src/object2.c @@ -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 diff --git a/src/player-move.c b/src/player-move.c index 2fcaa1a8b..4ff3ba073 100644 --- a/src/player-move.c +++ b/src/player-move.c @@ -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 */ diff --git a/src/realm-hissatsu.c b/src/realm-hissatsu.c index 3111b7639..4b3f843ba 100644 --- a/src/realm-hissatsu.c +++ b/src/realm-hissatsu.c @@ -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]; diff --git a/src/rooms-normal.c b/src/rooms-normal.c index 28e9a9b66..5c7ad414e 100644 --- a/src/rooms-normal.c +++ b/src/rooms-normal.c @@ -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. */ diff --git a/src/rooms-pitnest.c b/src/rooms-pitnest.c index cd3dfa749..94502a7e0 100644 --- a/src/rooms-pitnest.c +++ b/src/rooms-pitnest.c @@ -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; diff --git a/src/rooms-special.c b/src/rooms-special.c index e2a239a04..a7e4784b6 100644 --- a/src/rooms-special.c +++ b/src/rooms-special.c @@ -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); diff --git a/src/rooms-trap.c b/src/rooms-trap.c index c3a9597b6..524301127 100644 --- a/src/rooms-trap.c +++ b/src/rooms-trap.c @@ -17,7 +17,7 @@ bool build_type14(void) bool light; - cave_type *c_ptr; + grid_type *c_ptr; s16b trap; /* Pick a room size */ diff --git a/src/rooms-vault.c b/src/rooms-vault.c index 8c2f98895..4d3180b17 100644 --- a/src/rooms-vault.c +++ b/src/rooms-vault.c @@ -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); diff --git a/src/rooms.c b/src/rooms.c index a3c6fb18e..1c5e5343a 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -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++) { diff --git a/src/save.c b/src/save.c index 62a905916..5a14299d4 100644 --- a/src/save.c +++ b/src/save.c @@ -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++) { diff --git a/src/shoot.c b/src/shoot.c index 0b998075d..4dceee9a9 100644 --- a/src/shoot.c +++ b/src/shoot.c @@ -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]; diff --git a/src/spells-object.c b/src/spells-object.c index cf5b1e7f7..ba9065beb 100644 --- a/src/spells-object.c +++ b/src/spells-object.c @@ -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]; diff --git a/src/spells1.c b/src/spells1.c index 07ad8bace..401f331d7 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -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; diff --git a/src/spells2.c b/src/spells2.c index 2b3ef60e1..bf77bcbde 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -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++) { diff --git a/src/spells3.c b/src/spells3.c index 6f86499b1..436951fd9 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -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; diff --git a/src/store.c b/src/store.c index 72231976d..147adc8e4 100644 --- a/src/store.c +++ b/src/store.c @@ -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; diff --git a/src/trap.c b/src/trap.c index 44d26e306..39c488c79 100644 --- a/src/trap.c +++ b/src/trap.c @@ -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"); diff --git a/src/types.h b/src/types.h index dadda033d..d1285a382 100644 --- a/src/types.h +++ b/src/types.h @@ -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. * @@ -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 */ diff --git a/src/variable.c b/src/variable.c index 269d86c8b..a9a7a6428 100644 --- a/src/variable.c +++ b/src/variable.c @@ -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]; /* diff --git a/src/view-mainwindow.c b/src/view-mainwindow.c index 6dc026fe6..87ee7ff0c 100644 --- a/src/view-mainwindow.c +++ b/src/view-mainwindow.c @@ -1695,7 +1695,7 @@ void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){ int i; for(i=0;im_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 diff --git a/src/wild.c b/src/wild.c index 26aa5a914..b55ac6495 100644 --- a/src/wild.c +++ b/src/wild.c @@ -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 */ diff --git a/src/wizard2.c b/src/wizard2.c index c0ec8b2c5..03dda76a8 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -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; diff --git a/src/xtra2.c b/src/xtra2.c index ab5e71681..beb8c9ac2 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -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)) -- 2.11.0