• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision00f341adda94315aae0c3543ec4f713473d02186 (tree)
Time2019-02-12 00:19:27
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 汎用的なポインタ命名 c_ptr を g_ptr に改名。 / Rename c_ptr, common pointer naming to g_ptr.

Change Summary

Incremental Difference

--- a/src/autopick.c
+++ b/src/autopick.c
@@ -1699,12 +1699,12 @@ void autopick_alter_item(INVENTORY_IDX item, bool destroy)
16991699 /*
17001700 * Automatically pickup/destroy items in this grid.
17011701 */
1702-void autopick_pickup_items(grid_type *c_ptr)
1702+void autopick_pickup_items(grid_type *g_ptr)
17031703 {
17041704 OBJECT_IDX this_o_idx, next_o_idx = 0;
17051705
17061706 /* Scan the pile of objects */
1707- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
1707+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
17081708 {
17091709 int idx;
17101710 object_type *o_ptr = &o_list[this_o_idx];
--- a/src/cave.c
+++ b/src/cave.c
@@ -76,13 +76,13 @@ bool is_trap(FEAT_IDX feat)
7676
7777 /*!
7878 * @brief マスに看破済みの罠があるかの判定を行う。 / Return TRUE if the given grid is a known trap
79- * @param c_ptr マス構造体の参照ポインタ
79+ * @param g_ptr マス構造体の参照ポインタ
8080 * @return 看破済みの罠があるならTRUEを返す。
8181 */
82-bool is_known_trap(grid_type *c_ptr)
82+bool is_known_trap(grid_type *g_ptr)
8383 {
84- if (!c_ptr->mimic && !cave_have_flag_grid(c_ptr, FF_SECRET) &&
85- is_trap(c_ptr->feat)) return TRUE;
84+ if (!g_ptr->mimic && !cave_have_flag_grid(g_ptr, FF_SECRET) &&
85+ is_trap(g_ptr->feat)) return TRUE;
8686 else
8787 return FALSE;
8888 }
@@ -102,13 +102,13 @@ bool is_closed_door(FEAT_IDX feat)
102102
103103 /*!
104104 * @brief マスに隠されたドアがあるかの判定を行う。 / Return TRUE if the given grid is a hidden closed door
105- * @param c_ptr マス構造体の参照ポインタ
105+ * @param g_ptr マス構造体の参照ポインタ
106106 * @return 隠されたドアがあるならTRUEを返す。
107107 */
108-bool is_hidden_door(grid_type *c_ptr)
108+bool is_hidden_door(grid_type *g_ptr)
109109 {
110- if ((c_ptr->mimic || cave_have_flag_grid(c_ptr, FF_SECRET)) &&
111- is_closed_door(c_ptr->feat))
110+ if ((g_ptr->mimic || cave_have_flag_grid(g_ptr, FF_SECRET)) &&
111+ is_closed_door(g_ptr->feat))
112112 return TRUE;
113113 else
114114 return FALSE;
@@ -569,15 +569,15 @@ void update_local_illumination(POSITION y, POSITION x)
569569 */
570570 bool player_can_see_bold(POSITION y, POSITION x)
571571 {
572- grid_type *c_ptr;
572+ grid_type *g_ptr;
573573
574574 /* Blind players see nothing */
575575 if (p_ptr->blind) return FALSE;
576576
577- c_ptr = &grid_array[y][x];
577+ g_ptr = &grid_array[y][x];
578578
579579 /* Note that "torch-lite" yields "illumination" */
580- if (c_ptr->info & (CAVE_LITE | CAVE_MNLT)) return TRUE;
580+ if (g_ptr->info & (CAVE_LITE | CAVE_MNLT)) return TRUE;
581581
582582 /* Require line of sight to the grid */
583583 if (!player_has_los_bold(y, x)) return FALSE;
@@ -586,11 +586,11 @@ bool player_can_see_bold(POSITION y, POSITION x)
586586 if (p_ptr->see_nocto) return TRUE;
587587
588588 /* Require "perma-lite" of the grid */
589- if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW) return FALSE;
589+ if ((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW) return FALSE;
590590
591591 /* Feature code (applying "mimic" field) */
592592 /* Floors are simple */
593- if (feat_supports_los(get_feat_mimic(c_ptr))) return TRUE;
593+ if (feat_supports_los(get_feat_mimic(g_ptr))) return TRUE;
594594
595595 /* Check for "local" illumination */
596596 return check_local_illumination(y, x);
@@ -617,14 +617,14 @@ bool no_lite(void)
617617 */
618618 bool cave_valid_bold(POSITION y, POSITION x)
619619 {
620- grid_type *c_ptr = &grid_array[y][x];
620+ grid_type *g_ptr = &grid_array[y][x];
621621 OBJECT_IDX this_o_idx, next_o_idx = 0;
622622
623623 /* Forbid perma-grids */
624- if (cave_perma_grid(c_ptr)) return (FALSE);
624+ if (cave_perma_grid(g_ptr)) return (FALSE);
625625
626626 /* Check objects */
627- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
627+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
628628 {
629629 object_type *o_ptr;
630630 o_ptr = &o_list[this_o_idx];
@@ -944,12 +944,12 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
944944 void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
945945 {
946946 /* Get the grid_array */
947- grid_type *c_ptr = &grid_array[y][x];
947+ grid_type *g_ptr = &grid_array[y][x];
948948
949949 OBJECT_IDX this_o_idx, next_o_idx = 0;
950950
951951 /* Feature code (applying "mimic" field) */
952- FEAT_IDX feat = get_feat_mimic(c_ptr);
952+ FEAT_IDX feat = get_feat_mimic(g_ptr);
953953
954954 /* Access floor */
955955 feature_type *f_ptr = &f_info[feat];
@@ -972,8 +972,8 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
972972 * - Can see grids with CAVE_VIEW unless darkened by monsters.
973973 */
974974 if (!p_ptr->blind &&
975- ((c_ptr->info & (CAVE_MARK | CAVE_LITE | CAVE_MNLT)) ||
976- ((c_ptr->info & CAVE_VIEW) && (((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW) || p_ptr->see_nocto))))
975+ ((g_ptr->info & (CAVE_MARK | CAVE_LITE | CAVE_MNLT)) ||
976+ ((g_ptr->info & CAVE_VIEW) && (((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW) || p_ptr->see_nocto))))
977977 {
978978 /* Normal attr/char */
979979 a = f_ptr->x_attr[F_LIT_STANDARD];
@@ -992,10 +992,10 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
992992 }
993993
994994 /* Mega-Hack -- Handle "in-sight" and "darkened" grids */
995- else if (darkened_grid(c_ptr))
995+ else if (darkened_grid(g_ptr))
996996 {
997997 /* Unsafe grid -- idea borrowed from Unangband */
998- feat = (view_unsafe_grids && (c_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
998+ feat = (view_unsafe_grids && (g_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
999999
10001000 /* Access darkness */
10011001 f_ptr = &f_info[feat];
@@ -1009,7 +1009,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
10091009 else if (view_special_lite)
10101010 {
10111011 /* Handle "torch-lit" grids */
1012- if (c_ptr->info & (CAVE_LITE | CAVE_MNLT))
1012+ if (g_ptr->info & (CAVE_LITE | CAVE_MNLT))
10131013 {
10141014 /* Torch lite */
10151015 if (view_yellow_lite)
@@ -1021,7 +1021,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
10211021 }
10221022
10231023 /* Handle "dark" grids */
1024- else if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
1024+ else if ((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
10251025 {
10261026 /* Use a darkened colour/tile */
10271027 a = f_ptr->x_attr[F_LIT_DARK];
@@ -1029,7 +1029,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
10291029 }
10301030
10311031 /* Handle "out-of-sight" grids */
1032- else if (!(c_ptr->info & CAVE_VIEW))
1032+ else if (!(g_ptr->info & CAVE_VIEW))
10331033 {
10341034 /* Special flag */
10351035 if (view_bright_lite)
@@ -1046,7 +1046,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
10461046 else
10471047 {
10481048 /* Unsafe grid -- idea borrowed from Unangband */
1049- feat = (view_unsafe_grids && (c_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
1049+ feat = (view_unsafe_grids && (g_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
10501050
10511051 /* Access darkness */
10521052 f_ptr = &f_info[feat];
@@ -1061,7 +1061,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
10611061 else
10621062 {
10631063 /* Memorized grids */
1064- if (c_ptr->info & CAVE_MARK)
1064+ if (g_ptr->info & CAVE_MARK)
10651065 {
10661066 /* Normal attr/char */
10671067 a = f_ptr->x_attr[F_LIT_STANDARD];
@@ -1080,12 +1080,12 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
10801080 }
10811081
10821082 /* Mega-Hack -- Handle "in-sight" and "darkened" grids */
1083- else if (darkened_grid(c_ptr) && !p_ptr->blind)
1083+ else if (darkened_grid(g_ptr) && !p_ptr->blind)
10841084 {
10851085 if (have_flag(f_ptr->flags, FF_LOS) && have_flag(f_ptr->flags, FF_PROJECT))
10861086 {
10871087 /* Unsafe grid -- idea borrowed from Unangband */
1088- feat = (view_unsafe_grids && (c_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
1088+ feat = (view_unsafe_grids && (g_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
10891089
10901090 /* Access darkness */
10911091 f_ptr = &f_info[feat];
@@ -1114,7 +1114,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
11141114 }
11151115
11161116 /* Handle "torch-lit" grids */
1117- else if (c_ptr->info & (CAVE_LITE | CAVE_MNLT))
1117+ else if (g_ptr->info & (CAVE_LITE | CAVE_MNLT))
11181118 {
11191119 /* Torch lite */
11201120 if (view_yellow_lite)
@@ -1129,7 +1129,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
11291129 else if (view_bright_lite)
11301130 {
11311131 /* Not viewable */
1132- if (!(c_ptr->info & CAVE_VIEW))
1132+ if (!(g_ptr->info & CAVE_VIEW))
11331133 {
11341134 /* Use a darkened colour/tile */
11351135 a = f_ptr->x_attr[F_LIT_DARK];
@@ -1137,7 +1137,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
11371137 }
11381138
11391139 /* Not glowing */
1140- else if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
1140+ else if ((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
11411141 {
11421142 /* Use a darkened colour/tile */
11431143 a = f_ptr->x_attr[F_LIT_DARK];
@@ -1159,7 +1159,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
11591159 else
11601160 {
11611161 /* Unsafe grid -- idea borrowed from Unangband */
1162- feat = (view_unsafe_grids && (c_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
1162+ feat = (view_unsafe_grids && (g_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
11631163
11641164 /* Access feature */
11651165 f_ptr = &f_info[feat];
@@ -1191,7 +1191,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
11911191 }
11921192
11931193 /* Objects */
1194- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
1194+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
11951195 {
11961196 object_type *o_ptr;
11971197 o_ptr = &o_list[this_o_idx];
@@ -1239,9 +1239,9 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
12391239
12401240
12411241 /* Handle monsters */
1242- if (c_ptr->m_idx && display_autopick == 0 )
1242+ if (g_ptr->m_idx && display_autopick == 0 )
12431243 {
1244- monster_type *m_ptr = &m_list[c_ptr->m_idx];
1244+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
12451245
12461246 /* Visible monster */
12471247 if (m_ptr->ml)
@@ -1317,7 +1317,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap,
13171317 else if ((r_ptr->flags1 & RF1_ATTR_SEMIRAND) && !use_graphics)
13181318 {
13191319 /* Use semi-random attr (usually mimics' colors vary) */
1320- *ap = c_ptr->m_idx % 15 + 1;
1320+ *ap = g_ptr->m_idx % 15 + 1;
13211321 }
13221322 else
13231323 {
@@ -1458,20 +1458,20 @@ void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x)
14581458 */
14591459 void note_spot(POSITION y, POSITION x)
14601460 {
1461- grid_type *c_ptr = &grid_array[y][x];
1461+ grid_type *g_ptr = &grid_array[y][x];
14621462 OBJECT_IDX this_o_idx, next_o_idx = 0;
14631463
14641464 /* Blind players see nothing */
14651465 if (p_ptr->blind) return;
14661466
14671467 /* Analyze non-torch-lit grids */
1468- if (!(c_ptr->info & (CAVE_LITE | CAVE_MNLT)))
1468+ if (!(g_ptr->info & (CAVE_LITE | CAVE_MNLT)))
14691469 {
14701470 /* Require line of sight to the grid */
1471- if (!(c_ptr->info & (CAVE_VIEW))) return;
1471+ if (!(g_ptr->info & (CAVE_VIEW))) return;
14721472
14731473 /* Require "perma-lite" of the grid */
1474- if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
1474+ if ((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
14751475 {
14761476 /* Not Ninja */
14771477 if (!p_ptr->see_nocto) return;
@@ -1480,7 +1480,7 @@ void note_spot(POSITION y, POSITION x)
14801480
14811481
14821482 /* Hack -- memorize objects */
1483- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
1483+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
14841484 {
14851485 object_type *o_ptr = &o_list[this_o_idx];
14861486
@@ -1493,55 +1493,55 @@ void note_spot(POSITION y, POSITION x)
14931493
14941494
14951495 /* Hack -- memorize grids */
1496- if (!(c_ptr->info & (CAVE_MARK)))
1496+ if (!(g_ptr->info & (CAVE_MARK)))
14971497 {
14981498 /* Feature code (applying "mimic" field) */
1499- feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
1499+ feature_type *f_ptr = &f_info[get_feat_mimic(g_ptr)];
15001500
15011501 /* Memorize some "boring" grids */
15021502 if (!have_flag(f_ptr->flags, FF_REMEMBER))
15031503 {
15041504 /* Option -- memorize all torch-lit floors */
15051505 if (view_torch_grids &&
1506- ((c_ptr->info & (CAVE_LITE | CAVE_MNLT)) || p_ptr->see_nocto))
1506+ ((g_ptr->info & (CAVE_LITE | CAVE_MNLT)) || p_ptr->see_nocto))
15071507 {
1508- c_ptr->info |= (CAVE_MARK);
1508+ g_ptr->info |= (CAVE_MARK);
15091509 }
15101510
15111511 /* Option -- memorize all perma-lit floors */
1512- else if (view_perma_grids && ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW))
1512+ else if (view_perma_grids && ((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW))
15131513 {
1514- c_ptr->info |= (CAVE_MARK);
1514+ g_ptr->info |= (CAVE_MARK);
15151515 }
15161516 }
15171517
15181518 /* Memorize normal grids */
15191519 else if (have_flag(f_ptr->flags, FF_LOS))
15201520 {
1521- c_ptr->info |= (CAVE_MARK);
1521+ g_ptr->info |= (CAVE_MARK);
15221522 }
15231523
15241524 /* Memorize torch-lit walls */
1525- else if (c_ptr->info & (CAVE_LITE | CAVE_MNLT))
1525+ else if (g_ptr->info & (CAVE_LITE | CAVE_MNLT))
15261526 {
1527- c_ptr->info |= (CAVE_MARK);
1527+ g_ptr->info |= (CAVE_MARK);
15281528 }
15291529
15301530 /* Memorize walls seen by noctovision of Ninja */
15311531 else if (p_ptr->see_nocto)
15321532 {
1533- c_ptr->info |= (CAVE_MARK);
1533+ g_ptr->info |= (CAVE_MARK);
15341534 }
15351535
15361536 /* Memorize certain non-torch-lit wall grids */
15371537 else if (check_local_illumination(y, x))
15381538 {
1539- c_ptr->info |= (CAVE_MARK);
1539+ g_ptr->info |= (CAVE_MARK);
15401540 }
15411541 }
15421542
15431543 /* Memorize terrain of the grid */
1544- c_ptr->info |= (CAVE_KNOWN);
1544+ g_ptr->info |= (CAVE_KNOWN);
15451545 }
15461546
15471547
@@ -1743,7 +1743,7 @@ void prt_path(POSITION y, POSITION x)
17431743 {
17441744 POSITION ny = GRID_Y(path_g[i]);
17451745 POSITION nx = GRID_X(path_g[i]);
1746- grid_type *c_ptr = &grid_array[ny][nx];
1746+ grid_type *g_ptr = &grid_array[ny][nx];
17471747
17481748 if (panel_contains(ny, nx))
17491749 {
@@ -1753,7 +1753,7 @@ void prt_path(POSITION y, POSITION x)
17531753 TERM_COLOR ta = default_color;
17541754 char tc = '*';
17551755
1756- if (c_ptr->m_idx && m_list[c_ptr->m_idx].ml)
1756+ if (g_ptr->m_idx && m_list[g_ptr->m_idx].ml)
17571757 {
17581758 /* Determine what is there */
17591759 map_info(ny, nx, &a, &c, &ta, &tc);
@@ -1780,7 +1780,7 @@ void prt_path(POSITION y, POSITION x)
17801780 }
17811781
17821782 /* Known Wall */
1783- if ((c_ptr->info & CAVE_MARK) && !cave_have_flag_grid(c_ptr, FF_PROJECT)) break;
1783+ if ((g_ptr->info & CAVE_MARK) && !cave_have_flag_grid(g_ptr, FF_PROJECT)) break;
17841784
17851785 /* Change color */
17861786 if (nx == x && ny == y) default_color = TERM_L_DARK;
@@ -2557,7 +2557,7 @@ void update_lite(void)
25572557 {
25582558 int i, x, y, min_x, max_x, min_y, max_y;
25592559 int p = p_ptr->cur_lite;
2560- grid_type *c_ptr;
2560+ grid_type *g_ptr;
25612561
25622562 /*** Special case ***/
25632563
@@ -2738,13 +2738,13 @@ void update_lite(void)
27382738 y = lite_y[i];
27392739 x = lite_x[i];
27402740
2741- c_ptr = &grid_array[y][x];
2741+ g_ptr = &grid_array[y][x];
27422742
27432743 /* Update fresh grids */
2744- if (c_ptr->info & (CAVE_TEMP)) continue;
2744+ if (g_ptr->info & (CAVE_TEMP)) continue;
27452745
27462746 /* Add it to later visual update */
2747- cave_note_and_redraw_later(c_ptr, y, x);
2747+ cave_note_and_redraw_later(g_ptr, y, x);
27482748 }
27492749
27502750 /* Clear them all */
@@ -2753,16 +2753,16 @@ void update_lite(void)
27532753 y = temp_y[i];
27542754 x = temp_x[i];
27552755
2756- c_ptr = &grid_array[y][x];
2756+ g_ptr = &grid_array[y][x];
27572757
27582758 /* No longer in the array */
2759- c_ptr->info &= ~(CAVE_TEMP);
2759+ g_ptr->info &= ~(CAVE_TEMP);
27602760
27612761 /* Update stale grids */
2762- if (c_ptr->info & (CAVE_LITE)) continue;
2762+ if (g_ptr->info & (CAVE_LITE)) continue;
27632763
27642764 /* Add it to later visual update */
2765- cave_redraw_later(c_ptr, y, x);
2765+ cave_redraw_later(g_ptr, y, x);
27662766 }
27672767
27682768 /* None left */
@@ -2781,19 +2781,19 @@ static POSITION mon_fy, mon_fx;
27812781 */
27822782 static void mon_lite_hack(POSITION y, POSITION x)
27832783 {
2784- grid_type *c_ptr;
2784+ grid_type *g_ptr;
27852785 int dpf, d;
27862786 POSITION midpoint;
27872787
27882788 /* We trust this grid is in bounds */
27892789 /* if (!in_bounds2(y, x)) return; */
27902790
2791- c_ptr = &grid_array[y][x];
2791+ g_ptr = &grid_array[y][x];
27922792
27932793 /* Want a unlit square in view of the player */
2794- if ((c_ptr->info & (CAVE_MNLT | CAVE_VIEW)) != CAVE_VIEW) return;
2794+ if ((g_ptr->info & (CAVE_MNLT | CAVE_VIEW)) != CAVE_VIEW) return;
27952795
2796- if (!cave_los_grid(c_ptr))
2796+ if (!cave_los_grid(g_ptr))
27972797 {
27982798 /* Hack -- Prevent monster lite leakage in walls */
27992799
@@ -2843,7 +2843,7 @@ static void mon_lite_hack(POSITION y, POSITION x)
28432843 /* We trust temp_n does not exceed TEMP_MAX */
28442844
28452845 /* New grid */
2846- if (!(c_ptr->info & CAVE_MNDK))
2846+ if (!(g_ptr->info & CAVE_MNDK))
28472847 {
28482848 /* Save this square */
28492849 temp_x[temp_n] = x;
@@ -2855,11 +2855,11 @@ static void mon_lite_hack(POSITION y, POSITION x)
28552855 else
28562856 {
28572857 /* No longer dark */
2858- c_ptr->info &= ~(CAVE_MNDK);
2858+ g_ptr->info &= ~(CAVE_MNDK);
28592859 }
28602860
28612861 /* Light it */
2862- c_ptr->info |= CAVE_MNLT;
2862+ g_ptr->info |= CAVE_MNLT;
28632863 }
28642864
28652865
@@ -2868,18 +2868,18 @@ static void mon_lite_hack(POSITION y, POSITION x)
28682868 */
28692869 static void mon_dark_hack(POSITION y, POSITION x)
28702870 {
2871- grid_type *c_ptr;
2871+ grid_type *g_ptr;
28722872 int midpoint, dpf, d;
28732873
28742874 /* We trust this grid is in bounds */
28752875 /* if (!in_bounds2(y, x)) return; */
28762876
2877- c_ptr = &grid_array[y][x];
2877+ g_ptr = &grid_array[y][x];
28782878
28792879 /* Want a unlit and undarkened square in view of the player */
2880- if ((c_ptr->info & (CAVE_LITE | CAVE_MNLT | CAVE_MNDK | CAVE_VIEW)) != CAVE_VIEW) return;
2880+ if ((g_ptr->info & (CAVE_LITE | CAVE_MNLT | CAVE_MNDK | CAVE_VIEW)) != CAVE_VIEW) return;
28812881
2882- if (!cave_los_grid(c_ptr) && !cave_have_flag_grid(c_ptr, FF_PROJECT))
2882+ if (!cave_los_grid(g_ptr) && !cave_have_flag_grid(g_ptr, FF_PROJECT))
28832883 {
28842884 /* Hack -- Prevent monster dark lite leakage in walls */
28852885
@@ -2934,7 +2934,7 @@ static void mon_dark_hack(POSITION y, POSITION x)
29342934 temp_n++;
29352935
29362936 /* Darken it */
2937- c_ptr->info |= CAVE_MNDK;
2937+ g_ptr->info |= CAVE_MNDK;
29382938 }
29392939
29402940
@@ -2951,7 +2951,7 @@ static void mon_dark_hack(POSITION y, POSITION x)
29512951 void update_mon_lite(void)
29522952 {
29532953 int i, rad;
2954- grid_type *c_ptr;
2954+ grid_type *g_ptr;
29552955
29562956 POSITION fx, fy;
29572957 void (*add_mon_lite)(POSITION, POSITION);
@@ -2967,13 +2967,13 @@ void update_mon_lite(void)
29672967 for (i = 0; i < mon_lite_n; i++)
29682968 {
29692969 /* Point to grid */
2970- c_ptr = &grid_array[mon_lite_y[i]][mon_lite_x[i]];
2970+ g_ptr = &grid_array[mon_lite_y[i]][mon_lite_x[i]];
29712971
29722972 /* Set temp or xtra flag */
2973- c_ptr->info |= (c_ptr->info & CAVE_MNLT) ? CAVE_TEMP : CAVE_XTRA;
2973+ g_ptr->info |= (g_ptr->info & CAVE_MNLT) ? CAVE_TEMP : CAVE_XTRA;
29742974
29752975 /* Clear monster illumination flag */
2976- c_ptr->info &= ~(CAVE_MNLT | CAVE_MNDK);
2976+ g_ptr->info &= ~(CAVE_MNLT | CAVE_MNDK);
29772977 }
29782978
29792979 /* Empty temp list of new squares to lite up */
@@ -3053,10 +3053,10 @@ void update_mon_lite(void)
30533053 add_mon_lite(mon_fy + 2, mon_fx);
30543054 add_mon_lite(mon_fy + 2, mon_fx - 1);
30553055
3056- c_ptr = &grid_array[mon_fy + 2][mon_fx];
3056+ g_ptr = &grid_array[mon_fy + 2][mon_fx];
30573057
30583058 /* Radius 3 */
3059- if ((rad == 3) && cave_have_flag_grid(c_ptr, f_flag))
3059+ if ((rad == 3) && cave_have_flag_grid(g_ptr, f_flag))
30603060 {
30613061 add_mon_lite(mon_fy + 3, mon_fx + 1);
30623062 add_mon_lite(mon_fy + 3, mon_fx);
@@ -3071,10 +3071,10 @@ void update_mon_lite(void)
30713071 add_mon_lite(mon_fy - 2, mon_fx);
30723072 add_mon_lite(mon_fy - 2, mon_fx - 1);
30733073
3074- c_ptr = &grid_array[mon_fy - 2][mon_fx];
3074+ g_ptr = &grid_array[mon_fy - 2][mon_fx];
30753075
30763076 /* Radius 3 */
3077- if ((rad == 3) && cave_have_flag_grid(c_ptr, f_flag))
3077+ if ((rad == 3) && cave_have_flag_grid(g_ptr, f_flag))
30783078 {
30793079 add_mon_lite(mon_fy - 3, mon_fx + 1);
30803080 add_mon_lite(mon_fy - 3, mon_fx);
@@ -3089,10 +3089,10 @@ void update_mon_lite(void)
30893089 add_mon_lite(mon_fy, mon_fx + 2);
30903090 add_mon_lite(mon_fy - 1, mon_fx + 2);
30913091
3092- c_ptr = &grid_array[mon_fy][mon_fx + 2];
3092+ g_ptr = &grid_array[mon_fy][mon_fx + 2];
30933093
30943094 /* Radius 3 */
3095- if ((rad == 3) && cave_have_flag_grid(c_ptr, f_flag))
3095+ if ((rad == 3) && cave_have_flag_grid(g_ptr, f_flag))
30963096 {
30973097 add_mon_lite(mon_fy + 1, mon_fx + 3);
30983098 add_mon_lite(mon_fy, mon_fx + 3);
@@ -3107,10 +3107,10 @@ void update_mon_lite(void)
31073107 add_mon_lite(mon_fy, mon_fx - 2);
31083108 add_mon_lite(mon_fy - 1, mon_fx - 2);
31093109
3110- c_ptr = &grid_array[mon_fy][mon_fx - 2];
3110+ g_ptr = &grid_array[mon_fy][mon_fx - 2];
31113111
31123112 /* Radius 3 */
3113- if ((rad == 3) && cave_have_flag_grid(c_ptr, f_flag))
3113+ if ((rad == 3) && cave_have_flag_grid(g_ptr, f_flag))
31143114 {
31153115 add_mon_lite(mon_fy + 1, mon_fx - 3);
31163116 add_mon_lite(mon_fy, mon_fx - 3);
@@ -3163,26 +3163,26 @@ void update_mon_lite(void)
31633163 /* We trust this grid is in bounds */
31643164
31653165 /* Point to grid */
3166- c_ptr = &grid_array[fy][fx];
3166+ g_ptr = &grid_array[fy][fx];
31673167
3168- if (c_ptr->info & CAVE_TEMP) /* Pervious lit */
3168+ if (g_ptr->info & CAVE_TEMP) /* Pervious lit */
31693169 {
31703170 /* It it no longer lit? */
3171- if ((c_ptr->info & (CAVE_VIEW | CAVE_MNLT)) == CAVE_VIEW)
3171+ if ((g_ptr->info & (CAVE_VIEW | CAVE_MNLT)) == CAVE_VIEW)
31723172 {
31733173 /* It is now unlit */
31743174 /* Add it to later visual update */
3175- cave_note_and_redraw_later(c_ptr, fy, fx);
3175+ cave_note_and_redraw_later(g_ptr, fy, fx);
31763176 }
31773177 }
31783178 else /* Pervious darkened */
31793179 {
31803180 /* It it no longer darken? */
3181- if ((c_ptr->info & (CAVE_VIEW | CAVE_MNDK)) == CAVE_VIEW)
3181+ if ((g_ptr->info & (CAVE_VIEW | CAVE_MNDK)) == CAVE_VIEW)
31823182 {
31833183 /* It is now undarken */
31843184 /* Add it to later visual update */
3185- cave_note_and_redraw_later(c_ptr, fy, fx);
3185+ cave_note_and_redraw_later(g_ptr, fy, fx);
31863186 }
31873187 }
31883188
@@ -3204,26 +3204,26 @@ void update_mon_lite(void)
32043204 /* We trust this grid is in bounds */
32053205
32063206 /* Point to grid */
3207- c_ptr = &grid_array[fy][fx];
3207+ g_ptr = &grid_array[fy][fx];
32083208
3209- if (c_ptr->info & CAVE_MNLT) /* Lit */
3209+ if (g_ptr->info & CAVE_MNLT) /* Lit */
32103210 {
32113211 /* The is the square newly lit and visible? */
3212- if ((c_ptr->info & (CAVE_VIEW | CAVE_TEMP)) == CAVE_VIEW)
3212+ if ((g_ptr->info & (CAVE_VIEW | CAVE_TEMP)) == CAVE_VIEW)
32133213 {
32143214 /* It is now lit */
32153215 /* Add it to later visual update */
3216- cave_note_and_redraw_later(c_ptr, fy, fx);
3216+ cave_note_and_redraw_later(g_ptr, fy, fx);
32173217 }
32183218 }
32193219 else /* Darkened */
32203220 {
32213221 /* The is the square newly darkened and visible? */
3222- if ((c_ptr->info & (CAVE_VIEW | CAVE_XTRA)) == CAVE_VIEW)
3222+ if ((g_ptr->info & (CAVE_VIEW | CAVE_XTRA)) == CAVE_VIEW)
32233223 {
32243224 /* It is now darkened */
32253225 /* Add it to later visual update */
3226- cave_note_and_redraw_later(c_ptr, fy, fx);
3226+ cave_note_and_redraw_later(g_ptr, fy, fx);
32273227 }
32283228 }
32293229
@@ -3269,16 +3269,16 @@ void update_mon_lite(void)
32693269 void clear_mon_lite(void)
32703270 {
32713271 int i;
3272- grid_type *c_ptr;
3272+ grid_type *g_ptr;
32733273
32743274 /* Clear all monster lit squares */
32753275 for (i = 0; i < mon_lite_n; i++)
32763276 {
32773277 /* Point to grid */
3278- c_ptr = &grid_array[mon_lite_y[i]][mon_lite_x[i]];
3278+ g_ptr = &grid_array[mon_lite_y[i]][mon_lite_x[i]];
32793279
32803280 /* Clear monster illumination flag */
3281- c_ptr->info &= ~(CAVE_MNLT | CAVE_MNDK);
3281+ g_ptr->info &= ~(CAVE_MNLT | CAVE_MNDK);
32823282 }
32833283
32843284 /* Empty the array */
@@ -3294,7 +3294,7 @@ void forget_view(void)
32943294 {
32953295 int i;
32963296
3297- grid_type *c_ptr;
3297+ grid_type *g_ptr;
32983298
32993299 /* None to forget */
33003300 if (!view_n) return;
@@ -3304,10 +3304,10 @@ void forget_view(void)
33043304 {
33053305 POSITION y = view_y[i];
33063306 POSITION x = view_x[i];
3307- c_ptr = &grid_array[y][x];
3307+ g_ptr = &grid_array[y][x];
33083308
33093309 /* Forget that the grid is viewable */
3310- c_ptr->info &= ~(CAVE_VIEW);
3310+ g_ptr->info &= ~(CAVE_VIEW);
33113311
33123312 /* if (!panel_contains(y, x)) continue; */
33133313
@@ -3359,7 +3359,7 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
33593359 {
33603360 bool f1, f2, v1, v2, z1, z2, wall;
33613361
3362- grid_type *c_ptr;
3362+ grid_type *g_ptr;
33633363
33643364 grid_type *g1_c_ptr;
33653365 grid_type *g2_c_ptr;
@@ -3384,11 +3384,11 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
33843384 /* Totally blocked by "unviewable neighbors" */
33853385 if (!v1 && !v2) return (TRUE);
33863386
3387- c_ptr = &grid_array[y][x];
3387+ g_ptr = &grid_array[y][x];
33883388
33893389
33903390 /* Check for walls */
3391- wall = (!cave_los_grid(c_ptr));
3391+ wall = (!cave_los_grid(g_ptr));
33923392
33933393
33943394 /* Check the "ease" of visibility */
@@ -3398,9 +3398,9 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
33983398 /* Hack -- "easy" plus "easy" yields "easy" */
33993399 if (z1 && z2)
34003400 {
3401- c_ptr->info |= (CAVE_XTRA);
3401+ g_ptr->info |= (CAVE_XTRA);
34023402
3403- cave_view_hack(c_ptr, y, x);
3403+ cave_view_hack(g_ptr, y, x);
34043404
34053405 return (wall);
34063406 }
@@ -3408,7 +3408,7 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
34083408 /* Hack -- primary "easy" yields "viewed" */
34093409 if (z1)
34103410 {
3411- cave_view_hack(c_ptr, y, x);
3411+ cave_view_hack(g_ptr, y, x);
34123412
34133413 return (wall);
34143414 }
@@ -3416,9 +3416,9 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
34163416 /* Hack -- "view" plus "view" yields "view" */
34173417 if (v1 && v2)
34183418 {
3419- /* c_ptr->info |= (CAVE_XTRA); */
3419+ /* g_ptr->info |= (CAVE_XTRA); */
34203420
3421- cave_view_hack(c_ptr, y, x);
3421+ cave_view_hack(g_ptr, y, x);
34223422
34233423 return (wall);
34243424 }
@@ -3427,7 +3427,7 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
34273427 /* Mega-Hack -- the "los()" function works poorly on walls */
34283428 if (wall)
34293429 {
3430- cave_view_hack(c_ptr, y, x);
3430+ cave_view_hack(g_ptr, y, x);
34313431
34323432 return (wall);
34333433 }
@@ -3436,7 +3436,7 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO
34363436 /* Hack -- check line of sight */
34373437 if (los(p_ptr->y, p_ptr->x, y, x))
34383438 {
3439- cave_view_hack(c_ptr, y, x);
3439+ cave_view_hack(g_ptr, y, x);
34403440
34413441 return (wall);
34423442 }
@@ -3551,7 +3551,7 @@ void update_view(void)
35513551 POSITION y_max = cur_hgt - 1;
35523552 POSITION x_max = cur_wid - 1;
35533553
3554- grid_type *c_ptr;
3554+ grid_type *g_ptr;
35553555
35563556 /*** Initialize ***/
35573557
@@ -3583,13 +3583,13 @@ void update_view(void)
35833583 {
35843584 y = view_y[n];
35853585 x = view_x[n];
3586- c_ptr = &grid_array[y][x];
3586+ g_ptr = &grid_array[y][x];
35873587
35883588 /* Mark the grid as not in "view" */
3589- c_ptr->info &= ~(CAVE_VIEW);
3589+ g_ptr->info &= ~(CAVE_VIEW);
35903590
35913591 /* Mark the grid as "seen" */
3592- c_ptr->info |= (CAVE_TEMP);
3592+ g_ptr->info |= (CAVE_TEMP);
35933593
35943594 /* Add it to the "seen" set */
35953595 temp_y[temp_n] = y;
@@ -3605,13 +3605,13 @@ void update_view(void)
36053605 /* Now start on the player */
36063606 y = p_ptr->y;
36073607 x = p_ptr->x;
3608- c_ptr = &grid_array[y][x];
3608+ g_ptr = &grid_array[y][x];
36093609
36103610 /* Assume the player grid is easily viewable */
3611- c_ptr->info |= (CAVE_XTRA);
3611+ g_ptr->info |= (CAVE_XTRA);
36123612
36133613 /* Assume the player grid is viewable */
3614- cave_view_hack(c_ptr, y, x);
3614+ cave_view_hack(g_ptr, y, x);
36153615
36163616
36173617 /*** Step 2 -- Major Diagonals ***/
@@ -3622,37 +3622,37 @@ void update_view(void)
36223622 /* Scan south-east */
36233623 for (d = 1; d <= z; d++)
36243624 {
3625- c_ptr = &grid_array[y+d][x+d];
3626- c_ptr->info |= (CAVE_XTRA);
3627- cave_view_hack(c_ptr, y+d, x+d);
3628- if (!cave_los_grid(c_ptr)) break;
3625+ g_ptr = &grid_array[y+d][x+d];
3626+ g_ptr->info |= (CAVE_XTRA);
3627+ cave_view_hack(g_ptr, y+d, x+d);
3628+ if (!cave_los_grid(g_ptr)) break;
36293629 }
36303630
36313631 /* Scan south-west */
36323632 for (d = 1; d <= z; d++)
36333633 {
3634- c_ptr = &grid_array[y+d][x-d];
3635- c_ptr->info |= (CAVE_XTRA);
3636- cave_view_hack(c_ptr, y+d, x-d);
3637- if (!cave_los_grid(c_ptr)) break;
3634+ g_ptr = &grid_array[y+d][x-d];
3635+ g_ptr->info |= (CAVE_XTRA);
3636+ cave_view_hack(g_ptr, y+d, x-d);
3637+ if (!cave_los_grid(g_ptr)) break;
36383638 }
36393639
36403640 /* Scan north-east */
36413641 for (d = 1; d <= z; d++)
36423642 {
3643- c_ptr = &grid_array[y-d][x+d];
3644- c_ptr->info |= (CAVE_XTRA);
3645- cave_view_hack(c_ptr, y-d, x+d);
3646- if (!cave_los_grid(c_ptr)) break;
3643+ g_ptr = &grid_array[y-d][x+d];
3644+ g_ptr->info |= (CAVE_XTRA);
3645+ cave_view_hack(g_ptr, y-d, x+d);
3646+ if (!cave_los_grid(g_ptr)) break;
36473647 }
36483648
36493649 /* Scan north-west */
36503650 for (d = 1; d <= z; d++)
36513651 {
3652- c_ptr = &grid_array[y-d][x-d];
3653- c_ptr->info |= (CAVE_XTRA);
3654- cave_view_hack(c_ptr, y-d, x-d);
3655- if (!cave_los_grid(c_ptr)) break;
3652+ g_ptr = &grid_array[y-d][x-d];
3653+ g_ptr->info |= (CAVE_XTRA);
3654+ cave_view_hack(g_ptr, y-d, x-d);
3655+ if (!cave_los_grid(g_ptr)) break;
36563656 }
36573657
36583658
@@ -3661,10 +3661,10 @@ void update_view(void)
36613661 /* Scan south */
36623662 for (d = 1; d <= full; d++)
36633663 {
3664- c_ptr = &grid_array[y+d][x];
3665- c_ptr->info |= (CAVE_XTRA);
3666- cave_view_hack(c_ptr, y+d, x);
3667- if (!cave_los_grid(c_ptr)) break;
3664+ g_ptr = &grid_array[y+d][x];
3665+ g_ptr->info |= (CAVE_XTRA);
3666+ cave_view_hack(g_ptr, y+d, x);
3667+ if (!cave_los_grid(g_ptr)) break;
36683668 }
36693669
36703670 /* Initialize the "south strips" */
@@ -3673,10 +3673,10 @@ void update_view(void)
36733673 /* Scan north */
36743674 for (d = 1; d <= full; d++)
36753675 {
3676- c_ptr = &grid_array[y-d][x];
3677- c_ptr->info |= (CAVE_XTRA);
3678- cave_view_hack(c_ptr, y-d, x);
3679- if (!cave_los_grid(c_ptr)) break;
3676+ g_ptr = &grid_array[y-d][x];
3677+ g_ptr->info |= (CAVE_XTRA);
3678+ cave_view_hack(g_ptr, y-d, x);
3679+ if (!cave_los_grid(g_ptr)) break;
36803680 }
36813681
36823682 /* Initialize the "north strips" */
@@ -3685,10 +3685,10 @@ void update_view(void)
36853685 /* Scan east */
36863686 for (d = 1; d <= full; d++)
36873687 {
3688- c_ptr = &grid_array[y][x+d];
3689- c_ptr->info |= (CAVE_XTRA);
3690- cave_view_hack(c_ptr, y, x+d);
3691- if (!cave_los_grid(c_ptr)) break;
3688+ g_ptr = &grid_array[y][x+d];
3689+ g_ptr->info |= (CAVE_XTRA);
3690+ cave_view_hack(g_ptr, y, x+d);
3691+ if (!cave_los_grid(g_ptr)) break;
36923692 }
36933693
36943694 /* Initialize the "east strips" */
@@ -3697,10 +3697,10 @@ void update_view(void)
36973697 /* Scan west */
36983698 for (d = 1; d <= full; d++)
36993699 {
3700- c_ptr = &grid_array[y][x-d];
3701- c_ptr->info |= (CAVE_XTRA);
3702- cave_view_hack(c_ptr, y, x-d);
3703- if (!cave_los_grid(c_ptr)) break;
3700+ g_ptr = &grid_array[y][x-d];
3701+ g_ptr->info |= (CAVE_XTRA);
3702+ cave_view_hack(g_ptr, y, x-d);
3703+ if (!cave_los_grid(g_ptr)) break;
37043704 }
37053705
37063706 /* Initialize the "west strips" */
@@ -3952,16 +3952,16 @@ void update_view(void)
39523952 {
39533953 y = view_y[n];
39543954 x = view_x[n];
3955- c_ptr = &grid_array[y][x];
3955+ g_ptr = &grid_array[y][x];
39563956
39573957 /* Clear the "CAVE_XTRA" flag */
3958- c_ptr->info &= ~(CAVE_XTRA);
3958+ g_ptr->info &= ~(CAVE_XTRA);
39593959
39603960 /* Update only newly viewed grids */
3961- if (c_ptr->info & (CAVE_TEMP)) continue;
3961+ if (g_ptr->info & (CAVE_TEMP)) continue;
39623962
39633963 /* Add it to later visual update */
3964- cave_note_and_redraw_later(c_ptr, y, x);
3964+ cave_note_and_redraw_later(g_ptr, y, x);
39653965 }
39663966
39673967 /* Wipe the old grids, update as needed */
@@ -3969,16 +3969,16 @@ void update_view(void)
39693969 {
39703970 y = temp_y[n];
39713971 x = temp_x[n];
3972- c_ptr = &grid_array[y][x];
3972+ g_ptr = &grid_array[y][x];
39733973
39743974 /* No longer in the array */
3975- c_ptr->info &= ~(CAVE_TEMP);
3975+ g_ptr->info &= ~(CAVE_TEMP);
39763976
39773977 /* Update only non-viewable grids */
3978- if (c_ptr->info & (CAVE_VIEW)) continue;
3978+ if (g_ptr->info & (CAVE_VIEW)) continue;
39793979
39803980 /* Add it to later visual update */
3981- cave_redraw_later(c_ptr, y, x);
3981+ cave_redraw_later(g_ptr, y, x);
39823982 }
39833983
39843984 /* None left */
@@ -3996,28 +3996,28 @@ void update_view(void)
39963996 void delayed_visual_update(void)
39973997 {
39983998 int i, y, x;
3999- grid_type *c_ptr;
3999+ grid_type *g_ptr;
40004000
40014001 /* Update needed grids */
40024002 for (i = 0; i < redraw_n; i++)
40034003 {
40044004 y = redraw_y[i];
40054005 x = redraw_x[i];
4006- c_ptr = &grid_array[y][x];
4006+ g_ptr = &grid_array[y][x];
40074007
40084008 /* Update only needed grids (prevent multiple updating) */
4009- if (!(c_ptr->info & CAVE_REDRAW)) continue;
4009+ if (!(g_ptr->info & CAVE_REDRAW)) continue;
40104010
40114011 /* If required, note */
4012- if (c_ptr->info & CAVE_NOTE) note_spot(y, x);
4012+ if (g_ptr->info & CAVE_NOTE) note_spot(y, x);
40134013
40144014 lite_spot(y, x);
40154015
40164016 /* Hack -- Visual update of monster on this grid */
4017- if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
4017+ if (g_ptr->m_idx) update_monster(g_ptr->m_idx, FALSE);
40184018
40194019 /* No longer in the array */
4020- c_ptr->info &= ~(CAVE_NOTE | CAVE_REDRAW);
4020+ g_ptr->info &= ~(CAVE_NOTE | CAVE_REDRAW);
40214021 }
40224022
40234023 /* None left */
@@ -4121,7 +4121,7 @@ void update_flow(void)
41214121 int old_head = flow_head;
41224122 byte_hack m = grid_array[ty][tx].cost + 1;
41234123 byte_hack n = grid_array[ty][tx].dist + 1;
4124- grid_type *c_ptr;
4124+ grid_type *g_ptr;
41254125
41264126 /* Child location */
41274127 y = ty + ddy_ddd[d];
@@ -4130,19 +4130,19 @@ void update_flow(void)
41304130 /* Ignore player's grid */
41314131 if (player_bold(y, x)) continue;
41324132
4133- c_ptr = &grid_array[y][x];
4133+ g_ptr = &grid_array[y][x];
41344134
4135- if (is_closed_door(c_ptr->feat)) m += 3;
4135+ if (is_closed_door(g_ptr->feat)) m += 3;
41364136
41374137 /* Ignore "pre-stamped" entries */
4138- if (c_ptr->dist != 0 && c_ptr->dist <= n && c_ptr->cost <= m) continue;
4138+ if (g_ptr->dist != 0 && g_ptr->dist <= n && g_ptr->cost <= m) continue;
41394139
41404140 /* Ignore "walls" and "rubble" */
4141- if (!cave_have_flag_grid(c_ptr, FF_MOVE) && !is_closed_door(c_ptr->feat)) continue;
4141+ if (!cave_have_flag_grid(g_ptr, FF_MOVE) && !is_closed_door(g_ptr->feat)) continue;
41424142
41434143 /* Save the flow cost */
4144- if (c_ptr->cost == 0 || c_ptr->cost > m) c_ptr->cost = m;
4145- if (c_ptr->dist == 0 || c_ptr->dist > n) c_ptr->dist = n;
4144+ if (g_ptr->cost == 0 || g_ptr->cost > m) g_ptr->cost = m;
4145+ if (g_ptr->dist == 0 || g_ptr->dist > n) g_ptr->dist = n;
41464146
41474147 /* Hack -- limit flow depth */
41484148 if (n == MONSTER_FLOW_DEPTH) continue;
@@ -4217,7 +4217,7 @@ void update_smell(void)
42174217 {
42184218 for (j = 0; j < 5; j++)
42194219 {
4220- grid_type *c_ptr;
4220+ grid_type *g_ptr;
42214221
42224222 /* Translate table to map grids */
42234223 y = i + p_ptr->y - 2;
@@ -4226,10 +4226,10 @@ void update_smell(void)
42264226 /* Check Bounds */
42274227 if (!in_bounds(y, x)) continue;
42284228
4229- c_ptr = &grid_array[y][x];
4229+ g_ptr = &grid_array[y][x];
42304230
42314231 /* Walls, water, and lava cannot hold scent. */
4232- if (!cave_have_flag_grid(c_ptr, FF_MOVE) && !is_closed_door(c_ptr->feat)) continue;
4232+ if (!cave_have_flag_grid(g_ptr, FF_MOVE) && !is_closed_door(g_ptr->feat)) continue;
42334233
42344234 /* Grid must not be blocked by walls from the character */
42354235 if (!player_has_los_bold(y, x)) continue;
@@ -4238,7 +4238,7 @@ void update_smell(void)
42384238 if (scent_adjust[i][j] == -1) continue;
42394239
42404240 /* Mark the grid with new scent */
4241- c_ptr->when = scent_when + scent_adjust[i][j];
4241+ g_ptr->when = scent_when + scent_adjust[i][j];
42424242 }
42434243 }
42444244 }
@@ -4251,7 +4251,7 @@ void map_area(POSITION range)
42514251 {
42524252 int i;
42534253 POSITION x, y;
4254- grid_type *c_ptr;
4254+ grid_type *g_ptr;
42554255 FEAT_IDX feat;
42564256 feature_type *f_ptr;
42574257
@@ -4264,13 +4264,13 @@ void map_area(POSITION range)
42644264 {
42654265 if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
42664266
4267- c_ptr = &grid_array[y][x];
4267+ g_ptr = &grid_array[y][x];
42684268
42694269 /* Memorize terrain of the grid */
4270- c_ptr->info |= (CAVE_KNOWN);
4270+ g_ptr->info |= (CAVE_KNOWN);
42714271
42724272 /* Feature code (applying "mimic" field) */
4273- feat = get_feat_mimic(c_ptr);
4273+ feat = get_feat_mimic(g_ptr);
42744274 f_ptr = &f_info[feat];
42754275
42764276 /* All non-walls are "checked" */
@@ -4280,23 +4280,23 @@ void map_area(POSITION range)
42804280 if (have_flag(f_ptr->flags, FF_REMEMBER))
42814281 {
42824282 /* Memorize the object */
4283- c_ptr->info |= (CAVE_MARK);
4283+ g_ptr->info |= (CAVE_MARK);
42844284 }
42854285
42864286 /* Memorize known walls */
42874287 for (i = 0; i < 8; i++)
42884288 {
4289- c_ptr = &grid_array[y + ddy_ddd[i]][x + ddx_ddd[i]];
4289+ g_ptr = &grid_array[y + ddy_ddd[i]][x + ddx_ddd[i]];
42904290
42914291 /* Feature code (applying "mimic" field) */
4292- feat = get_feat_mimic(c_ptr);
4292+ feat = get_feat_mimic(g_ptr);
42934293 f_ptr = &f_info[feat];
42944294
42954295 /* Memorize walls (etc) */
42964296 if (have_flag(f_ptr->flags, FF_REMEMBER))
42974297 {
42984298 /* Memorize the walls */
4299- c_ptr->info |= (CAVE_MARK);
4299+ g_ptr->info |= (CAVE_MARK);
43004300 }
43014301 }
43024302 }
@@ -4354,13 +4354,13 @@ void wiz_lite(bool ninja)
43544354 /* Scan all normal grids */
43554355 for (x = 1; x < cur_wid - 1; x++)
43564356 {
4357- grid_type *c_ptr = &grid_array[y][x];
4357+ grid_type *g_ptr = &grid_array[y][x];
43584358
43594359 /* Memorize terrain of the grid */
4360- c_ptr->info |= (CAVE_KNOWN);
4360+ g_ptr->info |= (CAVE_KNOWN);
43614361
43624362 /* Feature code (applying "mimic" field) */
4363- feat = get_feat_mimic(c_ptr);
4363+ feat = get_feat_mimic(g_ptr);
43644364 f_ptr = &f_info[feat];
43654365
43664366 /* Process all non-walls */
@@ -4373,32 +4373,32 @@ void wiz_lite(bool ninja)
43734373 POSITION xx = x + ddx_ddd[i];
43744374
43754375 /* Get the grid */
4376- c_ptr = &grid_array[yy][xx];
4376+ g_ptr = &grid_array[yy][xx];
43774377
43784378 /* Feature code (applying "mimic" field) */
4379- f_ptr = &f_info[get_feat_mimic(c_ptr)];
4379+ f_ptr = &f_info[get_feat_mimic(g_ptr)];
43804380
43814381 /* Perma-lite the grid */
43824382 if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) && !ninja)
43834383 {
4384- c_ptr->info |= (CAVE_GLOW);
4384+ g_ptr->info |= (CAVE_GLOW);
43854385 }
43864386
43874387 /* Memorize normal features */
43884388 if (have_flag(f_ptr->flags, FF_REMEMBER))
43894389 {
43904390 /* Memorize the grid */
4391- c_ptr->info |= (CAVE_MARK);
4391+ g_ptr->info |= (CAVE_MARK);
43924392 }
43934393
43944394 /* Perma-lit grids (newly and previously) */
4395- else if (c_ptr->info & CAVE_GLOW)
4395+ else if (g_ptr->info & CAVE_GLOW)
43964396 {
43974397 /* Normally, memorize floors (see above) */
43984398 if (view_perma_grids && !view_torch_grids)
43994399 {
44004400 /* Memorize the grid */
4401- c_ptr->info |= (CAVE_MARK);
4401+ g_ptr->info |= (CAVE_MARK);
44024402 }
44034403 }
44044404 }
@@ -4430,11 +4430,11 @@ void wiz_dark(void)
44304430 {
44314431 for (x = 1; x < cur_wid - 1; x++)
44324432 {
4433- grid_type *c_ptr = &grid_array[y][x];
4433+ grid_type *g_ptr = &grid_array[y][x];
44344434
44354435 /* Process the grid */
4436- c_ptr->info &= ~(CAVE_MARK | CAVE_IN_DETECT | CAVE_KNOWN);
4437- c_ptr->info |= (CAVE_UNSAFE);
4436+ g_ptr->info &= ~(CAVE_MARK | CAVE_IN_DETECT | CAVE_KNOWN);
4437+ g_ptr->info |= (CAVE_UNSAFE);
44384438 }
44394439 }
44404440
@@ -4482,17 +4482,17 @@ void wiz_dark(void)
44824482 */
44834483 void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
44844484 {
4485- grid_type *c_ptr = &grid_array[y][x];
4485+ grid_type *g_ptr = &grid_array[y][x];
44864486 feature_type *f_ptr = &f_info[feat];
44874487 bool old_los, old_mirror;
44884488
44894489 if (!character_dungeon)
44904490 {
44914491 /* Clear mimic type */
4492- c_ptr->mimic = 0;
4492+ g_ptr->mimic = 0;
44934493
44944494 /* Change the feature */
4495- c_ptr->feat = feat;
4495+ g_ptr->feat = feat;
44964496
44974497 /* Hack -- glow the GLOW terrain */
44984498 if (have_flag(f_ptr->flags, FF_GLOW) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
@@ -4513,28 +4513,28 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
45134513 }
45144514
45154515 old_los = cave_have_flag_bold(y, x, FF_LOS);
4516- old_mirror = is_mirror_grid(c_ptr);
4516+ old_mirror = is_mirror_grid(g_ptr);
45174517
45184518 /* Clear mimic type */
4519- c_ptr->mimic = 0;
4519+ g_ptr->mimic = 0;
45204520
45214521 /* Change the feature */
4522- c_ptr->feat = feat;
4522+ g_ptr->feat = feat;
45234523
45244524 /* Remove flag for mirror/glyph */
4525- c_ptr->info &= ~(CAVE_OBJECT);
4525+ g_ptr->info &= ~(CAVE_OBJECT);
45264526
45274527 if (old_mirror && (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
45284528 {
4529- c_ptr->info &= ~(CAVE_GLOW);
4530- if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
4529+ g_ptr->info &= ~(CAVE_GLOW);
4530+ if (!view_torch_grids) g_ptr->info &= ~(CAVE_MARK);
45314531
45324532 update_local_illumination(y, x);
45334533 }
45344534
45354535 /* Check for change to boring grid */
4536- if (!have_flag(f_ptr->flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
4537- if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
4536+ if (!have_flag(f_ptr->flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
4537+ if (g_ptr->m_idx) update_monster(g_ptr->m_idx, FALSE);
45384538
45394539 note_spot(y, x);
45404540
@@ -4701,17 +4701,17 @@ void cave_alter_feat(POSITION y, POSITION x, int action)
47014701 /* Remove a mirror */
47024702 void remove_mirror(POSITION y, POSITION x)
47034703 {
4704- grid_type *c_ptr = &grid_array[y][x];
4704+ grid_type *g_ptr = &grid_array[y][x];
47054705
47064706 /* Remove the mirror */
4707- c_ptr->info &= ~(CAVE_OBJECT);
4708- c_ptr->mimic = 0;
4707+ g_ptr->info &= ~(CAVE_OBJECT);
4708+ g_ptr->mimic = 0;
47094709
47104710 if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)
47114711 {
4712- c_ptr->info &= ~(CAVE_GLOW);
4713- if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
4714- if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
4712+ g_ptr->info &= ~(CAVE_GLOW);
4713+ if (!view_torch_grids) g_ptr->info &= ~(CAVE_MARK);
4714+ if (g_ptr->m_idx) update_monster(g_ptr->m_idx, FALSE);
47154715
47164716 update_local_illumination(y, x);
47174717 }
@@ -4725,9 +4725,9 @@ void remove_mirror(POSITION y, POSITION x)
47254725 /*
47264726 * Return TRUE if there is a mirror on the grid.
47274727 */
4728-bool is_mirror_grid(grid_type *c_ptr)
4728+bool is_mirror_grid(grid_type *g_ptr)
47294729 {
4730- if ((c_ptr->info & CAVE_OBJECT) && have_flag(f_info[c_ptr->mimic].flags, FF_MIRROR))
4730+ if ((g_ptr->info & CAVE_OBJECT) && have_flag(f_info[g_ptr->mimic].flags, FF_MIRROR))
47314731 return TRUE;
47324732 else
47334733 return FALSE;
@@ -4737,9 +4737,9 @@ bool is_mirror_grid(grid_type *c_ptr)
47374737 /*
47384738 * Return TRUE if there is a mirror on the grid.
47394739 */
4740-bool is_glyph_grid(grid_type *c_ptr)
4740+bool is_glyph_grid(grid_type *g_ptr)
47414741 {
4742- if ((c_ptr->info & CAVE_OBJECT) && have_flag(f_info[c_ptr->mimic].flags, FF_GLYPH))
4742+ if ((g_ptr->info & CAVE_OBJECT) && have_flag(f_info[g_ptr->mimic].flags, FF_GLYPH))
47434743 return TRUE;
47444744 else
47454745 return FALSE;
@@ -4749,9 +4749,9 @@ bool is_glyph_grid(grid_type *c_ptr)
47494749 /*
47504750 * Return TRUE if there is a mirror on the grid.
47514751 */
4752-bool is_explosive_rune_grid(grid_type *c_ptr)
4752+bool is_explosive_rune_grid(grid_type *g_ptr)
47534753 {
4754- if ((c_ptr->info & CAVE_OBJECT) && have_flag(f_info[c_ptr->mimic].flags, FF_MINOR_GLYPH))
4754+ if ((g_ptr->info & CAVE_OBJECT) && have_flag(f_info[g_ptr->mimic].flags, FF_MINOR_GLYPH))
47554755 return TRUE;
47564756 else
47574757 return FALSE;
@@ -5013,7 +5013,7 @@ void glow_deep_lava_and_bldg(void)
50135013 {
50145014 POSITION y, x, yy, xx;
50155015 DIRECTION i;
5016- grid_type *c_ptr;
5016+ grid_type *g_ptr;
50175017
50185018 /* Not in the darkness dungeon */
50195019 if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) return;
@@ -5022,11 +5022,11 @@ void glow_deep_lava_and_bldg(void)
50225022 {
50235023 for (x = 0; x < cur_wid; x++)
50245024 {
5025- c_ptr = &grid_array[y][x];
5025+ g_ptr = &grid_array[y][x];
50265026
50275027 /* Feature code (applying "mimic" field) */
50285028
5029- if (have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_GLOW))
5029+ if (have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_GLOW))
50305030 {
50315031 for (i = 0; i < 9; i++)
50325032 {
@@ -5056,22 +5056,22 @@ void glow_deep_lava_and_bldg(void)
50565056 bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode)
50575057 {
50585058 monster_type *m_ptr = &m_list[m_idx];
5059- grid_type *c_ptr = &grid_array[y][x];
5060- feature_type *f_ptr = &f_info[c_ptr->feat];
5059+ grid_type *g_ptr = &grid_array[y][x];
5060+ feature_type *f_ptr = &f_info[g_ptr->feat];
50615061
50625062 /* Require "teleportable" space */
50635063 if (!have_flag(f_ptr->flags, FF_TELEPORTABLE)) return FALSE;
50645064
5065- if (c_ptr->m_idx && (c_ptr->m_idx != m_idx)) return FALSE;
5065+ if (g_ptr->m_idx && (g_ptr->m_idx != m_idx)) return FALSE;
50665066 if (player_bold(y, x)) return FALSE;
50675067
50685068 /* Hack -- no teleport onto glyph of warding */
5069- if (is_glyph_grid(c_ptr)) return FALSE;
5070- if (is_explosive_rune_grid(c_ptr)) return FALSE;
5069+ if (is_glyph_grid(g_ptr)) return FALSE;
5070+ if (is_explosive_rune_grid(g_ptr)) return FALSE;
50715071
50725072 if (!(mode & TELEPORT_PASSIVE))
50735073 {
5074- if (!monster_can_cross_terrain(c_ptr->feat, &r_info[m_ptr->r_idx], 0)) return FALSE;
5074+ if (!monster_can_cross_terrain(g_ptr->feat, &r_info[m_ptr->r_idx], 0)) return FALSE;
50755075 }
50765076
50775077 return TRUE;
@@ -5086,23 +5086,23 @@ bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, B
50865086 */
50875087 bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode)
50885088 {
5089- grid_type *c_ptr = &grid_array[y][x];
5090- feature_type *f_ptr = &f_info[c_ptr->feat];
5089+ grid_type *g_ptr = &grid_array[y][x];
5090+ feature_type *f_ptr = &f_info[g_ptr->feat];
50915091
50925092 /* Require "teleportable" space */
50935093 if (!have_flag(f_ptr->flags, FF_TELEPORTABLE)) return FALSE;
50945094
50955095 /* No magical teleporting into vaults and such */
5096- if (!(mode & TELEPORT_NONMAGICAL) && (c_ptr->info & CAVE_ICKY)) return FALSE;
5096+ if (!(mode & TELEPORT_NONMAGICAL) && (g_ptr->info & CAVE_ICKY)) return FALSE;
50975097
5098- if (c_ptr->m_idx && (c_ptr->m_idx != p_ptr->riding)) return FALSE;
5098+ if (g_ptr->m_idx && (g_ptr->m_idx != p_ptr->riding)) return FALSE;
50995099
51005100 /* don't teleport on a trap. */
51015101 if (have_flag(f_ptr->flags, FF_HIT_TRAP)) return FALSE;
51025102
51035103 if (!(mode & TELEPORT_PASSIVE))
51045104 {
5105- if (!player_can_enter(c_ptr->feat, 0)) return FALSE;
5105+ if (!player_can_enter(g_ptr->feat, 0)) return FALSE;
51065106
51075107 if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP))
51085108 {
--- a/src/cmd-pet.c
+++ b/src/cmd-pet.c
@@ -5,11 +5,11 @@
55
66 /*!
77 * @brief プレイヤーの騎乗/下馬処理判定
8-* @param c_ptr プレイヤーの移動先マスの構造体参照ポインタ
8+* @param g_ptr プレイヤーの移動先マスの構造体参照ポインタ
99 * @param now_riding TRUEなら下馬処理、FALSEならば騎乗処理
1010 * @return 可能ならばTRUEを返す
1111 */
12-bool player_can_ride_aux(grid_type *c_ptr, bool now_riding)
12+bool player_can_ride_aux(grid_type *g_ptr, bool now_riding)
1313 {
1414 bool p_can_enter;
1515 bool old_character_xtra = character_xtra;
@@ -21,7 +21,7 @@ bool player_can_ride_aux(grid_type *c_ptr, bool now_riding)
2121 /* Hack -- prevent "icky" message */
2222 character_xtra = TRUE;
2323
24- if (now_riding) p_ptr->riding = c_ptr->m_idx;
24+ if (now_riding) p_ptr->riding = g_ptr->m_idx;
2525 else
2626 {
2727 p_ptr->riding = 0;
@@ -32,7 +32,7 @@ bool player_can_ride_aux(grid_type *c_ptr, bool now_riding)
3232 p_ptr->update |= PU_BONUS;
3333 handle_stuff();
3434
35- p_can_enter = player_can_enter(c_ptr->feat, CEM_P_CAN_ENTER_PATTERN);
35+ p_can_enter = player_can_enter(g_ptr->feat, CEM_P_CAN_ENTER_PATTERN);
3636
3737 p_ptr->riding = old_riding;
3838 if (old_pf_ryoute) p_ptr->pet_extra_flags |= (PF_RYOUTE);
@@ -308,20 +308,20 @@ bool do_riding(bool force)
308308 {
309309 POSITION x, y;
310310 DIRECTION dir = 0;
311- grid_type *c_ptr;
311+ grid_type *g_ptr;
312312 monster_type *m_ptr;
313313
314314 if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
315315 y = p_ptr->y + ddy[dir];
316316 x = p_ptr->x + ddx[dir];
317- c_ptr = &grid_array[y][x];
317+ g_ptr = &grid_array[y][x];
318318
319319 if (p_ptr->special_defense & KATA_MUSOU) set_action(ACTION_NONE);
320320
321321 if (p_ptr->riding)
322322 {
323323 /* Skip non-empty grids */
324- if (!player_can_ride_aux(c_ptr, FALSE))
324+ if (!player_can_ride_aux(g_ptr, FALSE))
325325 {
326326 msg_print(_("そちらには降りられません。", "You cannot go to that direction."));
327327 return FALSE;
@@ -329,7 +329,7 @@ bool do_riding(bool force)
329329
330330 if (!pattern_seq(p_ptr->y, p_ptr->x, y, x)) return FALSE;
331331
332- if (c_ptr->m_idx)
332+ if (g_ptr->m_idx)
333333 {
334334 take_turn(p_ptr, 100);;
335335
@@ -347,9 +347,9 @@ bool do_riding(bool force)
347347 {
348348 if (cmd_limit_confused(p_ptr)) return FALSE;
349349
350- m_ptr = &m_list[c_ptr->m_idx];
350+ m_ptr = &m_list[g_ptr->m_idx];
351351
352- if (!c_ptr->m_idx || !m_ptr->ml)
352+ if (!g_ptr->m_idx || !m_ptr->ml)
353353 {
354354 msg_print(_("その場所にはモンスターはいません。", "Here is no monster."));
355355 return FALSE;
@@ -367,10 +367,10 @@ bool do_riding(bool force)
367367
368368 if (!pattern_seq(p_ptr->y, p_ptr->x, y, x)) return FALSE;
369369
370- if (!player_can_ride_aux(c_ptr, TRUE))
370+ if (!player_can_ride_aux(g_ptr, TRUE))
371371 {
372372 /* Feature code (applying "mimic" field) */
373- feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
373+ feature_type *f_ptr = &f_info[get_feat_mimic(g_ptr)];
374374 #ifdef JP
375375 msg_format("そのモンスターは%sの%sにいる。", f_name + f_ptr->name,
376376 ((!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) ||
@@ -396,13 +396,13 @@ bool do_riding(bool force)
396396 {
397397 GAME_TEXT m_name[MAX_NLEN];
398398 monster_desc(m_name, m_ptr, 0);
399- (void)set_monster_csleep(c_ptr->m_idx, 0);
399+ (void)set_monster_csleep(g_ptr->m_idx, 0);
400400 msg_format(_("%sを起こした。", "You have waked %s up."), m_name);
401401 }
402402
403403 if (p_ptr->action == ACTION_KAMAE) set_action(ACTION_NONE);
404404
405- p_ptr->riding = c_ptr->m_idx;
405+ p_ptr->riding = g_ptr->m_idx;
406406
407407 /* Hack -- remove tracked monster */
408408 if (p_ptr->riding == p_ptr->health_who) health_track(0);
@@ -876,8 +876,8 @@ void do_cmd_pet(void)
876876 if (!target_set(TARGET_KILL)) pet_t_m_idx = 0;
877877 else
878878 {
879- grid_type *c_ptr = &grid_array[target_row][target_col];
880- if (c_ptr->m_idx && (m_list[c_ptr->m_idx].ml))
879+ grid_type *g_ptr = &grid_array[target_row][target_col];
880+ if (g_ptr->m_idx && (m_list[g_ptr->m_idx].ml))
881881 {
882882 pet_t_m_idx = grid_array[target_row][target_col].m_idx;
883883 p_ptr->pet_follow_distance = PET_DESTROY_DIST;
@@ -1086,23 +1086,23 @@ bool rakuba(HIT_POINT dam, bool force)
10861086 /* Check around the player */
10871087 for (i = 0; i < 8; i++)
10881088 {
1089- grid_type *c_ptr;
1089+ grid_type *g_ptr;
10901090
10911091 /* Access the location */
10921092 y = p_ptr->y + ddy_ddd[i];
10931093 x = p_ptr->x + ddx_ddd[i];
10941094
1095- c_ptr = &grid_array[y][x];
1095+ g_ptr = &grid_array[y][x];
10961096
1097- if (c_ptr->m_idx) continue;
1097+ if (g_ptr->m_idx) continue;
10981098
10991099 /* Skip non-empty grids */
1100- if (!cave_have_flag_grid(c_ptr, FF_MOVE) && !cave_have_flag_grid(c_ptr, FF_CAN_FLY))
1100+ if (!cave_have_flag_grid(g_ptr, FF_MOVE) && !cave_have_flag_grid(g_ptr, FF_CAN_FLY))
11011101 {
1102- if (!player_can_ride_aux(c_ptr, FALSE)) continue;
1102+ if (!player_can_ride_aux(g_ptr, FALSE)) continue;
11031103 }
11041104
1105- if (cave_have_flag_grid(c_ptr, FF_PATTERN)) continue;
1105+ if (cave_have_flag_grid(g_ptr, FF_PATTERN)) continue;
11061106
11071107 /* Count "safe" grids */
11081108 sn++;
--- 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);
33 extern int calculate_upkeep(void);
44 extern void do_cmd_pet_dismiss(void);
55 extern void do_cmd_pet(void);
6-extern bool player_can_ride_aux(grid_type *c_ptr, bool now_riding);
6+extern bool player_can_ride_aux(grid_type *g_ptr, bool now_riding);
77 extern bool rakuba(HIT_POINT dam, bool force);
88
99
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -136,8 +136,8 @@ void do_cmd_go_up(void)
136136 bool go_up = FALSE;
137137
138138 /* Player grid */
139- grid_type *c_ptr = &grid_array[p_ptr->y][p_ptr->x];
140- feature_type *f_ptr = &f_info[c_ptr->feat];
139+ grid_type *g_ptr = &grid_array[p_ptr->y][p_ptr->x];
140+ feature_type *f_ptr = &f_info[g_ptr->feat];
141141
142142 int up_num = 0;
143143
@@ -168,7 +168,7 @@ void do_cmd_go_up(void)
168168
169169 leave_quest_check();
170170
171- p_ptr->inside_quest = c_ptr->special;
171+ p_ptr->inside_quest = g_ptr->special;
172172
173173 /* Activate the quest */
174174 if (!quest[p_ptr->inside_quest].status)
@@ -230,7 +230,7 @@ void do_cmd_go_up(void)
230230 {
231231 leave_quest_check();
232232
233- p_ptr->inside_quest = c_ptr->special;
233+ p_ptr->inside_quest = g_ptr->special;
234234 dun_level = 0;
235235 up_num = 0;
236236 }
@@ -280,8 +280,8 @@ void do_cmd_go_up(void)
280280 void do_cmd_go_down(void)
281281 {
282282 /* Player grid */
283- grid_type *c_ptr = &grid_array[p_ptr->y][p_ptr->x];
284- feature_type *f_ptr = &f_info[c_ptr->feat];
283+ grid_type *g_ptr = &grid_array[p_ptr->y][p_ptr->x];
284+ feature_type *f_ptr = &f_info[g_ptr->feat];
285285
286286 bool fall_trap = FALSE;
287287 int down_num = 0;
@@ -320,7 +320,7 @@ void do_cmd_go_down(void)
320320 leave_quest_check();
321321 leave_tower_check();
322322
323- p_ptr->inside_quest = c_ptr->special;
323+ p_ptr->inside_quest = g_ptr->special;
324324
325325 /* Activate the quest */
326326 if (!quest[p_ptr->inside_quest].status)
@@ -353,7 +353,7 @@ void do_cmd_go_down(void)
353353
354354 if (!dun_level)
355355 {
356- target_dungeon = have_flag(f_ptr->flags, FF_ENTRANCE) ? c_ptr->special : DUNGEON_ANGBAND;
356+ target_dungeon = have_flag(f_ptr->flags, FF_ENTRANCE) ? g_ptr->special : DUNGEON_ANGBAND;
357357
358358 if (ironman_downward && (target_dungeon != DUNGEON_ANGBAND))
359359 {
@@ -477,11 +477,11 @@ void do_cmd_search(void)
477477 */
478478 static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
479479 {
480- grid_type *c_ptr = &grid_array[y][x];
480+ grid_type *g_ptr = &grid_array[y][x];
481481 OBJECT_IDX this_o_idx, next_o_idx = 0;
482482
483483 /* Scan all objects in the grid */
484- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
484+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
485485 {
486486 object_type *o_ptr;
487487
@@ -592,7 +592,7 @@ static int count_dt(POSITION *y, POSITION *x, bool (*test)(IDX feat), bool under
592592 /* Check around (and under) the character */
593593 for (d = 0; d < 9; d++)
594594 {
595- grid_type *c_ptr;
595+ grid_type *g_ptr;
596596 FEAT_IDX feat;
597597
598598 /* if not searching under player continue */
@@ -603,13 +603,13 @@ static int count_dt(POSITION *y, POSITION *x, bool (*test)(IDX feat), bool under
603603 xx = p_ptr->x + ddx_ddd[d];
604604
605605 /* Get the grid_array */
606- c_ptr = &grid_array[yy][xx];
606+ g_ptr = &grid_array[yy][xx];
607607
608608 /* Must have knowledge */
609- if (!(c_ptr->info & (CAVE_MARK))) continue;
609+ if (!(g_ptr->info & (CAVE_MARK))) continue;
610610
611611 /* Feature code (applying "mimic" field) */
612- feat = get_feat_mimic(c_ptr);
612+ feat = get_feat_mimic(g_ptr);
613613
614614 /* Not looking for this feature */
615615 if (!((*test)(feat))) continue;
@@ -717,8 +717,8 @@ static bool do_cmd_open_aux(POSITION y, POSITION x)
717717 int i, j;
718718
719719 /* Get requested grid */
720- grid_type *c_ptr = &grid_array[y][x];
721- feature_type *f_ptr = &f_info[c_ptr->feat];
720+ grid_type *g_ptr = &grid_array[y][x];
721+ feature_type *f_ptr = &f_info[g_ptr->feat];
722722 bool more = FALSE;
723723
724724 take_turn(p_ptr, 100);;
@@ -729,7 +729,7 @@ static bool do_cmd_open_aux(POSITION y, POSITION x)
729729 if (!have_flag(f_ptr->flags, FF_OPEN))
730730 {
731731 /* Stuck */
732- msg_format(_("%sはがっちりと閉じられているようだ。", "The %s appears to be stuck."), f_name + f_info[get_feat_mimic(c_ptr)].name);
732+ msg_format(_("%sはがっちりと閉じられているようだ。", "The %s appears to be stuck."), f_name + f_info[get_feat_mimic(g_ptr)].name);
733733 }
734734
735735 /* Locked door */
@@ -846,17 +846,17 @@ void do_cmd_open(void)
846846 if (get_rep_dir(&dir, TRUE))
847847 {
848848 FEAT_IDX feat;
849- grid_type *c_ptr;
849+ grid_type *g_ptr;
850850
851851 /* Get requested location */
852852 y = p_ptr->y + ddy[dir];
853853 x = p_ptr->x + ddx[dir];
854854
855855 /* Get requested grid */
856- c_ptr = &grid_array[y][x];
856+ g_ptr = &grid_array[y][x];
857857
858858 /* Feature code (applying "mimic" field) */
859- feat = get_feat_mimic(c_ptr);
859+ feat = get_feat_mimic(g_ptr);
860860
861861 /* Check for chest */
862862 o_idx = chest_check(y, x, FALSE);
@@ -868,7 +868,7 @@ void do_cmd_open(void)
868868 }
869869
870870 /* Monster in the way */
871- else if (c_ptr->m_idx && p_ptr->riding != c_ptr->m_idx)
871+ else if (g_ptr->m_idx && p_ptr->riding != g_ptr->m_idx)
872872 {
873873 take_turn(p_ptr, 100);;
874874 msg_print(_("モンスターが立ちふさがっている!", "There is a monster in the way!"));
@@ -909,8 +909,8 @@ void do_cmd_open(void)
909909 */
910910 static bool do_cmd_close_aux(POSITION y, POSITION x)
911911 {
912- grid_type *c_ptr = &grid_array[y][x];
913- FEAT_IDX old_feat = c_ptr->feat;
912+ grid_type *g_ptr = &grid_array[y][x];
913+ FEAT_IDX old_feat = g_ptr->feat;
914914 bool more = FALSE;
915915
916916 take_turn(p_ptr, 100);;
@@ -923,7 +923,7 @@ static bool do_cmd_close_aux(POSITION y, POSITION x)
923923 s16b closed_feat = feat_state(old_feat, FF_CLOSE);
924924
925925 /* Hack -- object in the way */
926- if ((c_ptr->o_idx || (c_ptr->info & CAVE_OBJECT)) &&
926+ if ((g_ptr->o_idx || (g_ptr->info & CAVE_OBJECT)) &&
927927 (closed_feat != old_feat) && !have_flag(f_info[closed_feat].flags, FF_DROP))
928928 {
929929 msg_print(_("何かがつっかえて閉まらない。", "There seems stuck."));
@@ -934,7 +934,7 @@ static bool do_cmd_close_aux(POSITION y, POSITION x)
934934 cave_alter_feat(y, x, FF_CLOSE);
935935
936936 /* Broken door */
937- if (old_feat == c_ptr->feat)
937+ if (old_feat == g_ptr->feat)
938938 {
939939 msg_print(_("ドアは壊れてしまっている。", "The door appears to be broken."));
940940 }
@@ -993,15 +993,15 @@ void do_cmd_close(void)
993993 /* Get a "repeated" direction */
994994 if (get_rep_dir(&dir, FALSE))
995995 {
996- grid_type *c_ptr;
996+ grid_type *g_ptr;
997997 FEAT_IDX feat;
998998
999999 y = p_ptr->y + ddy[dir];
10001000 x = p_ptr->x + ddx[dir];
1001- c_ptr = &grid_array[y][x];
1001+ g_ptr = &grid_array[y][x];
10021002
10031003 /* Feature code (applying "mimic" field) */
1004- feat = get_feat_mimic(c_ptr);
1004+ feat = get_feat_mimic(g_ptr);
10051005
10061006 /* Require open/broken door */
10071007 if (!have_flag(f_info[feat].flags, FF_CLOSE))
@@ -1010,7 +1010,7 @@ void do_cmd_close(void)
10101010 }
10111011
10121012 /* Monster in the way */
1013- else if (c_ptr->m_idx)
1013+ else if (g_ptr->m_idx)
10141014 {
10151015 take_turn(p_ptr, 100);;
10161016
@@ -1042,10 +1042,10 @@ void do_cmd_close(void)
10421042 */
10431043 static bool do_cmd_tunnel_test(POSITION y, POSITION x)
10441044 {
1045- grid_type *c_ptr = &grid_array[y][x];
1045+ grid_type *g_ptr = &grid_array[y][x];
10461046
10471047 /* Must have knowledge */
1048- if (!(c_ptr->info & CAVE_MARK))
1048+ if (!(g_ptr->info & CAVE_MARK))
10491049 {
10501050 msg_print(_("そこには何も見当たらない。", "You see nothing there."));
10511051
@@ -1053,7 +1053,7 @@ static bool do_cmd_tunnel_test(POSITION y, POSITION x)
10531053 }
10541054
10551055 /* Must be a wall/door/etc */
1056- if (!cave_have_flag_grid(c_ptr, FF_TUNNEL))
1056+ if (!cave_have_flag_grid(g_ptr, FF_TUNNEL))
10571057 {
10581058 msg_print(_("そこには掘るものが見当たらない。", "You see nothing there to tunnel."));
10591059
@@ -1077,7 +1077,7 @@ static bool do_cmd_tunnel_test(POSITION y, POSITION x)
10771077 */
10781078 static bool do_cmd_tunnel_aux(POSITION y, POSITION x)
10791079 {
1080- grid_type *c_ptr;
1080+ grid_type *g_ptr;
10811081 feature_type *f_ptr, *mimic_f_ptr;
10821082 int power;
10831083 concptr name;
@@ -1089,12 +1089,12 @@ static bool do_cmd_tunnel_aux(POSITION y, POSITION x)
10891089 take_turn(p_ptr, 100);;
10901090
10911091 /* Get grid */
1092- c_ptr = &grid_array[y][x];
1093- f_ptr = &f_info[c_ptr->feat];
1092+ g_ptr = &grid_array[y][x];
1093+ f_ptr = &f_info[g_ptr->feat];
10941094 power = f_ptr->power;
10951095
10961096 /* Feature code (applying "mimic" field) */
1097- mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
1097+ mimic_f_ptr = &f_info[get_feat_mimic(g_ptr)];
10981098
10991099 name = f_name + mimic_f_ptr->name;
11001100
@@ -1181,7 +1181,7 @@ static bool do_cmd_tunnel_aux(POSITION y, POSITION x)
11811181 }
11821182 }
11831183
1184- if (is_hidden_door(c_ptr))
1184+ if (is_hidden_door(g_ptr))
11851185 {
11861186 /* Occasional Search XXX XXX */
11871187 if (randint0(100) < 25) search();
@@ -1207,7 +1207,7 @@ void do_cmd_tunnel(void)
12071207 {
12081208 int y, x, dir;
12091209
1210- grid_type *c_ptr;
1210+ grid_type *g_ptr;
12111211 FEAT_IDX feat;
12121212
12131213 bool more = FALSE;
@@ -1237,10 +1237,10 @@ void do_cmd_tunnel(void)
12371237 x = p_ptr->x + ddx[dir];
12381238
12391239 /* Get grid */
1240- c_ptr = &grid_array[y][x];
1240+ g_ptr = &grid_array[y][x];
12411241
12421242 /* Feature code (applying "mimic" field) */
1243- feat = get_feat_mimic(c_ptr);
1243+ feat = get_feat_mimic(g_ptr);
12441244
12451245 /* No tunnelling through doors */
12461246 if (have_flag(f_info[feat].flags, FF_DOOR))
@@ -1255,7 +1255,7 @@ void do_cmd_tunnel(void)
12551255 }
12561256
12571257 /* A monster is in the way */
1258- else if (c_ptr->m_idx)
1258+ else if (g_ptr->m_idx)
12591259 {
12601260 take_turn(p_ptr, 100);;
12611261
@@ -1295,11 +1295,11 @@ bool easy_open_door(POSITION y, POSITION x)
12951295 {
12961296 int i, j;
12971297
1298- grid_type *c_ptr = &grid_array[y][x];
1299- feature_type *f_ptr = &f_info[c_ptr->feat];
1298+ grid_type *g_ptr = &grid_array[y][x];
1299+ feature_type *f_ptr = &f_info[g_ptr->feat];
13001300
13011301 /* Must be a closed door */
1302- if (!is_closed_door(c_ptr->feat))
1302+ if (!is_closed_door(g_ptr->feat))
13031303 {
13041304 return (FALSE);
13051305 }
@@ -1308,7 +1308,7 @@ bool easy_open_door(POSITION y, POSITION x)
13081308 if (!have_flag(f_ptr->flags, FF_OPEN))
13091309 {
13101310 /* Stuck */
1311- msg_format(_("%sはがっちりと閉じられているようだ。", "The %s appears to be stuck."), f_name + f_info[get_feat_mimic(c_ptr)].name);
1311+ msg_format(_("%sはがっちりと閉じられているようだ。", "The %s appears to be stuck."), f_name + f_info[get_feat_mimic(g_ptr)].name);
13121312
13131313 }
13141314
@@ -1466,10 +1466,10 @@ static bool do_cmd_disarm_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
14661466
14671467 bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
14681468 {
1469- grid_type *c_ptr = &grid_array[y][x];
1469+ grid_type *g_ptr = &grid_array[y][x];
14701470
14711471 /* Get feature */
1472- feature_type *f_ptr = &f_info[c_ptr->feat];
1472+ feature_type *f_ptr = &f_info[g_ptr->feat];
14731473
14741474 /* Access trap name */
14751475 concptr name = (f_name + f_ptr->name);
@@ -1586,15 +1586,15 @@ void do_cmd_disarm(void)
15861586 /* Get a direction (or abort) */
15871587 if (get_rep_dir(&dir,TRUE))
15881588 {
1589- grid_type *c_ptr;
1589+ grid_type *g_ptr;
15901590 FEAT_IDX feat;
15911591
15921592 y = p_ptr->y + ddy[dir];
15931593 x = p_ptr->x + ddx[dir];
1594- c_ptr = &grid_array[y][x];
1594+ g_ptr = &grid_array[y][x];
15951595
15961596 /* Feature code (applying "mimic" field) */
1597- feat = get_feat_mimic(c_ptr);
1597+ feat = get_feat_mimic(g_ptr);
15981598
15991599 /* Check for chests */
16001600 o_idx = chest_check(y, x, TRUE);
@@ -1606,7 +1606,7 @@ void do_cmd_disarm(void)
16061606 }
16071607
16081608 /* Monster in the way */
1609- else if (c_ptr->m_idx && p_ptr->riding != c_ptr->m_idx)
1609+ else if (g_ptr->m_idx && p_ptr->riding != g_ptr->m_idx)
16101610 {
16111611 msg_print(_("モンスターが立ちふさがっている!", "There is a monster in the way!"));
16121612
@@ -1649,10 +1649,10 @@ void do_cmd_disarm(void)
16491649 static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
16501650 {
16511651 /* Get grid */
1652- grid_type *c_ptr = &grid_array[y][x];
1652+ grid_type *g_ptr = &grid_array[y][x];
16531653
16541654 /* Get feature */
1655- feature_type *f_ptr = &f_info[c_ptr->feat];
1655+ feature_type *f_ptr = &f_info[g_ptr->feat];
16561656
16571657 /* Hack -- Bash power based on strength */
16581658 /* (Ranges from 3 to 20 to 100 to 200) */
@@ -1663,7 +1663,7 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
16631663
16641664 bool more = FALSE;
16651665
1666- concptr name = f_name + f_info[get_feat_mimic(c_ptr)].name;
1666+ concptr name = f_name + f_info[get_feat_mimic(g_ptr)].name;
16671667
16681668 take_turn(p_ptr, 100);;
16691669
@@ -1685,7 +1685,7 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
16851685 sound(have_flag(f_ptr->flags, FF_GLASS) ? SOUND_GLASS : SOUND_OPENDOOR);
16861686
16871687 /* Break down the door */
1688- if ((randint0(100) < 50) || (feat_state(c_ptr->feat, FF_OPEN) == c_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
1688+ if ((randint0(100) < 50) || (feat_state(g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
16891689 {
16901690 cave_alter_feat(y, x, FF_BASH);
16911691 }
@@ -1743,7 +1743,7 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
17431743 void do_cmd_bash(void)
17441744 {
17451745 int y, x, dir;
1746- grid_type *c_ptr;
1746+ grid_type *g_ptr;
17471747 bool more = FALSE;
17481748
17491749 if (p_ptr->wild_mode) return;
@@ -1774,10 +1774,10 @@ void do_cmd_bash(void)
17741774 x = p_ptr->x + ddx[dir];
17751775
17761776 /* Get grid */
1777- c_ptr = &grid_array[y][x];
1777+ g_ptr = &grid_array[y][x];
17781778
17791779 /* Feature code (applying "mimic" field) */
1780- feat = get_feat_mimic(c_ptr);
1780+ feat = get_feat_mimic(g_ptr);
17811781
17821782 /* Nothing useful */
17831783 if (!have_flag(f_info[feat].flags, FF_BASH))
@@ -1786,7 +1786,7 @@ void do_cmd_bash(void)
17861786 }
17871787
17881788 /* Monster in the way */
1789- else if (c_ptr->m_idx)
1789+ else if (g_ptr->m_idx)
17901790 {
17911791 take_turn(p_ptr, 100);;
17921792
@@ -1828,7 +1828,7 @@ void do_cmd_alter(void)
18281828 {
18291829 POSITION y, x;
18301830 DIRECTION dir;
1831- grid_type *c_ptr;
1831+ grid_type *g_ptr;
18321832 bool more = FALSE;
18331833
18341834 if (p_ptr->special_defense & KATA_MUSOU)
@@ -1857,15 +1857,15 @@ void do_cmd_alter(void)
18571857 x = p_ptr->x + ddx[dir];
18581858
18591859 /* Get grid */
1860- c_ptr = &grid_array[y][x];
1860+ g_ptr = &grid_array[y][x];
18611861
18621862 /* Feature code (applying "mimic" field) */
1863- feat = get_feat_mimic(c_ptr);
1863+ feat = get_feat_mimic(g_ptr);
18641864 f_ptr = &f_info[feat];
18651865
18661866 take_turn(p_ptr, 100);;
18671867
1868- if (c_ptr->m_idx)
1868+ if (g_ptr->m_idx)
18691869 {
18701870 py_attack(y, x, 0);
18711871 }
@@ -1974,15 +1974,15 @@ void do_cmd_spike(void)
19741974 {
19751975 POSITION y, x;
19761976 INVENTORY_IDX item;
1977- grid_type *c_ptr;
1977+ grid_type *g_ptr;
19781978 FEAT_IDX feat;
19791979
19801980 y = p_ptr->y + ddy[dir];
19811981 x = p_ptr->x + ddx[dir];
1982- c_ptr = &grid_array[y][x];
1982+ g_ptr = &grid_array[y][x];
19831983
19841984 /* Feature code (applying "mimic" field) */
1985- feat = get_feat_mimic(c_ptr);
1985+ feat = get_feat_mimic(g_ptr);
19861986
19871987 /* Require closed door */
19881988 if (!have_flag(f_info[feat].flags, FF_SPIKE))
@@ -1997,7 +1997,7 @@ void do_cmd_spike(void)
19971997 }
19981998
19991999 /* Is a monster in the way? */
2000- else if (c_ptr->m_idx)
2000+ else if (g_ptr->m_idx)
20012001 {
20022002 take_turn(p_ptr, 100);;
20032003
@@ -2600,8 +2600,8 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
26002600 /* Monster here, Try to hit it */
26012601 if (grid_array[y][x].m_idx)
26022602 {
2603- grid_type *c_ptr = &grid_array[y][x];
2604- monster_type *m_ptr = &m_list[c_ptr->m_idx];
2603+ grid_type *g_ptr = &grid_array[y][x];
2604+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
26052605
26062606 /* Check the visibility */
26072607 visible = m_ptr->ml;
@@ -2631,7 +2631,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
26312631 if (m_ptr->ml)
26322632 {
26332633 if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
2634- health_track(c_ptr->m_idx);
2634+ health_track(g_ptr->m_idx);
26352635 }
26362636 }
26372637
@@ -2677,7 +2677,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
26772677 tdam, m_ptr->hp - tdam, m_ptr->maxhp, m_ptr->max_maxhp);
26782678
26792679 /* Hit the monster, check for death */
2680- if (mon_take_hit(c_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_idx(m_ptr))))
2680+ if (mon_take_hit(g_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_idx(m_ptr))))
26812681 {
26822682 /* Dead monster */
26832683 }
@@ -2685,7 +2685,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
26852685 /* No death */
26862686 else
26872687 {
2688- message_pain(c_ptr->m_idx, tdam);
2688+ message_pain(g_ptr->m_idx, tdam);
26892689
26902690 /* Anger the monster */
26912691 if ((tdam > 0) && !object_is_potion(q_ptr))
@@ -2942,8 +2942,8 @@ static int travel_flow_cost(POSITION y, POSITION x)
29422942 */
29432943 static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall)
29442944 {
2945- grid_type *c_ptr = &grid_array[y][x];
2946- feature_type *f_ptr = &f_info[c_ptr->feat];
2945+ grid_type *g_ptr = &grid_array[y][x];
2946+ feature_type *f_ptr = &f_info[g_ptr->feat];
29472947 int old_head = flow_head;
29482948 int add_cost = 1;
29492949 int base_cost = (n % TRAVEL_UNABLE);
@@ -2954,7 +2954,7 @@ static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall)
29542954 if (!in_bounds(y, x)) return;
29552955
29562956 /* Ignore unknown grid except in wilderness */
2957- if (dun_level > 0 && !(c_ptr->info & CAVE_KNOWN)) return;
2957+ if (dun_level > 0 && !(g_ptr->info & CAVE_KNOWN)) return;
29582958
29592959 /* Ignore "walls" and "rubble" (include "secret doors") */
29602960 if (have_flag(f_ptr->flags, FF_WALL) ||
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -5273,12 +5273,12 @@ static void do_cmd_knowledge_artifacts(void)
52735273 {
52745274 for (x = 0; x < cur_wid; x++)
52755275 {
5276- grid_type *c_ptr = &grid_array[y][x];
5276+ grid_type *g_ptr = &grid_array[y][x];
52775277
52785278 OBJECT_IDX this_o_idx, next_o_idx = 0;
52795279
52805280 /* Scan all objects in the grid */
5281- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
5281+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
52825282 {
52835283 object_type *o_ptr;
52845284 o_ptr = &o_list[this_o_idx];
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -3405,12 +3405,12 @@ static void process_world(void)
34053405 for (i2 = 0; i2 < cur_wid; ++i2)
34063406 for (j2 = 0; j2 < cur_hgt; j2++)
34073407 {
3408- grid_type *c_ptr = &grid_array[j2][i2];
3408+ grid_type *g_ptr = &grid_array[j2][i2];
34093409
3410- if ((c_ptr->m_idx > 0) && (c_ptr->m_idx != p_ptr->riding))
3410+ if ((g_ptr->m_idx > 0) && (g_ptr->m_idx != p_ptr->riding))
34113411 {
34123412 number_mon++;
3413- win_m_idx = c_ptr->m_idx;
3413+ win_m_idx = g_ptr->m_idx;
34143414 }
34153415 }
34163416
--- a/src/externs.h
+++ b/src/externs.h
@@ -454,7 +454,7 @@ extern concptr autopick_line_from_entry(autopick_type *entry);
454454 extern int is_autopick(object_type *o_ptr);
455455 extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
456456 extern void autopick_delayed_alter(void);
457-extern void autopick_pickup_items(grid_type *c_ptr);
457+extern void autopick_pickup_items(grid_type *g_ptr);
458458 extern bool autopick_autoregister(object_type *o_ptr);
459459 extern void do_cmd_edit_autopick(void);
460460
@@ -469,9 +469,9 @@ extern void dump_yourself(FILE *fff);
469469 /* grid_array.c */
470470 extern POSITION distance(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
471471 extern bool is_trap(IDX feat);
472-extern bool is_known_trap(grid_type *c_ptr);
472+extern bool is_known_trap(grid_type *g_ptr);
473473 extern bool is_closed_door(IDX feat);
474-extern bool is_hidden_door(grid_type *c_ptr);
474+extern bool is_hidden_door(grid_type *g_ptr);
475475 extern bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
476476 extern void update_local_illumination(POSITION y, POSITION x);
477477 extern bool player_can_see_bold(POSITION y, POSITION x);
@@ -506,9 +506,9 @@ extern FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat);
506506 extern FEAT_IDX feat_state(IDX feat, int action);
507507 extern void cave_alter_feat(POSITION y, POSITION x, int action);
508508 extern void remove_mirror(POSITION y, POSITION x);
509-extern bool is_mirror_grid(grid_type *c_ptr);
510-extern bool is_glyph_grid(grid_type *c_ptr);
511-extern bool is_explosive_rune_grid(grid_type *c_ptr);
509+extern bool is_mirror_grid(grid_type *g_ptr);
510+extern bool is_glyph_grid(grid_type *g_ptr);
511+extern bool is_explosive_rune_grid(grid_type *g_ptr);
512512 extern void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
513513 extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
514514 extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
--- a/src/floor-events.c
+++ b/src/floor-events.c
@@ -13,13 +13,13 @@ void day_break()
1313 for (x = 0; x < cur_wid; x++)
1414 {
1515 /* Get the grid */
16- grid_type *c_ptr = &grid_array[y][x];
16+ grid_type *g_ptr = &grid_array[y][x];
1717
1818 /* Assume lit */
19- c_ptr->info |= (CAVE_GLOW);
19+ g_ptr->info |= (CAVE_GLOW);
2020
2121 /* Hack -- Memorize lit grids if allowed */
22- if (view_perma_grids) c_ptr->info |= (CAVE_MARK);
22+ if (view_perma_grids) g_ptr->info |= (CAVE_MARK);
2323
2424 /* Hack -- Notice spot */
2525 note_spot(y, x);
@@ -51,21 +51,21 @@ void night_falls(void)
5151 for (x = 0; x < cur_wid; x++)
5252 {
5353 /* Get the grid */
54- grid_type *c_ptr = &grid_array[y][x];
54+ grid_type *g_ptr = &grid_array[y][x];
5555
5656 /* Feature code (applying "mimic" field) */
57- feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
57+ feature_type *f_ptr = &f_info[get_feat_mimic(g_ptr)];
5858
59- if (!is_mirror_grid(c_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
59+ if (!is_mirror_grid(g_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
6060 !have_flag(f_ptr->flags, FF_ENTRANCE))
6161 {
6262 /* Assume dark */
63- c_ptr->info &= ~(CAVE_GLOW);
63+ g_ptr->info &= ~(CAVE_GLOW);
6464
6565 if (!have_flag(f_ptr->flags, FF_REMEMBER))
6666 {
6767 /* Forget the normal floor grid */
68- c_ptr->info &= ~(CAVE_MARK);
68+ g_ptr->info &= ~(CAVE_MARK);
6969
7070 /* Hack -- Notice spot */
7171 note_spot(y, x);
--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -147,12 +147,12 @@ static int next_to_walls(POSITION y, POSITION x)
147147 */
148148 static bool alloc_stairs_aux(POSITION y, POSITION x, int walls)
149149 {
150- grid_type *c_ptr = &grid_array[y][x];
150+ grid_type *g_ptr = &grid_array[y][x];
151151
152152 /* Require "naked" floor grid */
153- if (!is_floor_grid(c_ptr)) return FALSE;
153+ if (!is_floor_grid(g_ptr)) return FALSE;
154154 if (pattern_tile(y, x)) return FALSE;
155- if (c_ptr->o_idx || c_ptr->m_idx) return FALSE;
155+ if (g_ptr->o_idx || g_ptr->m_idx) return FALSE;
156156
157157 /* Require a certain number of adjacent walls */
158158 if (next_to_walls(y, x) < walls) return FALSE;
@@ -214,7 +214,7 @@ static bool alloc_stairs(IDX feat, int num, int walls)
214214 while (TRUE)
215215 {
216216 POSITION y, x = 0;
217- grid_type *c_ptr;
217+ grid_type *g_ptr;
218218
219219 int candidates = 0;
220220 int pick;
@@ -260,16 +260,16 @@ static bool alloc_stairs(IDX feat, int num, int walls)
260260
261261 if (!pick) break;
262262 }
263- c_ptr = &grid_array[y][x];
263+ g_ptr = &grid_array[y][x];
264264
265265 /* Clear possible garbage of hidden trap */
266- c_ptr->mimic = 0;
266+ g_ptr->mimic = 0;
267267
268268 /* Clear previous contents, add stairs */
269- c_ptr->feat = (i < shaft_num) ? feat_state(feat, FF_SHAFT) : feat;
269+ g_ptr->feat = (i < shaft_num) ? feat_state(feat, FF_SHAFT) : feat;
270270
271271 /* No longer "FLOOR" */
272- c_ptr->info &= ~(CAVE_FLOOR);
272+ g_ptr->info &= ~(CAVE_FLOOR);
273273
274274 /* Success */
275275 break;
@@ -290,7 +290,7 @@ static void alloc_object(int set, EFFECT_ID typ, int num)
290290 POSITION y = 0, x = 0;
291291 int k;
292292 int dummy = 0;
293- grid_type *c_ptr;
293+ grid_type *g_ptr;
294294
295295 /* A small level has few objects. */
296296 num = num * cur_hgt * cur_wid / (MAX_HGT*MAX_WID) +1;
@@ -308,10 +308,10 @@ static void alloc_object(int set, EFFECT_ID typ, int num)
308308 y = randint0(cur_hgt);
309309 x = randint0(cur_wid);
310310
311- c_ptr = &grid_array[y][x];
311+ g_ptr = &grid_array[y][x];
312312
313313 /* Require "naked" floor grid */
314- if (!is_floor_grid(c_ptr) || c_ptr->o_idx || c_ptr->m_idx) continue;
314+ if (!is_floor_grid(g_ptr) || g_ptr->o_idx || g_ptr->m_idx) continue;
315315
316316 /* Avoid player location */
317317 if (player_bold(y, x)) continue;
@@ -420,19 +420,19 @@ bool place_quest_monsters(void)
420420 /* Find an empty grid */
421421 for (l = SAFE_MAX_ATTEMPTS; l > 0; l--)
422422 {
423- grid_type *c_ptr;
423+ grid_type *g_ptr;
424424 feature_type *f_ptr;
425425
426426 y = randint0(cur_hgt);
427427 x = randint0(cur_wid);
428428
429- c_ptr = &grid_array[y][x];
430- f_ptr = &f_info[c_ptr->feat];
429+ g_ptr = &grid_array[y][x];
430+ f_ptr = &f_info[g_ptr->feat];
431431
432432 if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) continue;
433433 if (!monster_can_enter(y, x, r_ptr, 0)) continue;
434434 if (distance(y, x, p_ptr->y, p_ptr->x) < 10) continue;
435- if (c_ptr->info & CAVE_ICKY) continue;
435+ if (g_ptr->info & CAVE_ICKY) continue;
436436 else break;
437437 }
438438
@@ -463,31 +463,31 @@ bool place_quest_monsters(void)
463463
464464 /*!
465465 * @brief マスにフロア端用の永久壁を配置する / Set boundary mimic and add "solid" perma-wall
466- * @param c_ptr 永久壁を廃止したいマス構造体の参照ポインタ
466+ * @param g_ptr 永久壁を廃止したいマス構造体の参照ポインタ
467467 * @return なし
468468 */
469-static void set_bound_perm_wall(grid_type *c_ptr)
469+static void set_bound_perm_wall(grid_type *g_ptr)
470470 {
471471 if (bound_walls_perm)
472472 {
473473 /* Clear boundary mimic */
474- c_ptr->mimic = 0;
474+ g_ptr->mimic = 0;
475475 }
476476 else
477477 {
478- feature_type *f_ptr = &f_info[c_ptr->feat];
478+ feature_type *f_ptr = &f_info[g_ptr->feat];
479479
480480 /* Hack -- Decline boundary walls with known treasure */
481481 if ((have_flag(f_ptr->flags, FF_HAS_GOLD) || have_flag(f_ptr->flags, FF_HAS_ITEM)) &&
482482 !have_flag(f_ptr->flags, FF_SECRET))
483- c_ptr->feat = feat_state(c_ptr->feat, FF_ENSECRET);
483+ g_ptr->feat = feat_state(g_ptr->feat, FF_ENSECRET);
484484
485485 /* Set boundary mimic */
486- c_ptr->mimic = c_ptr->feat;
486+ g_ptr->mimic = g_ptr->feat;
487487 }
488488
489489 /* Add "solid" perma-wall */
490- place_solid_perm_grid(c_ptr);
490+ place_solid_perm_grid(g_ptr);
491491 }
492492
493493 /*!
@@ -810,36 +810,36 @@ static bool cave_gen(void)
810810 /* Turn the tunnel into corridor */
811811 for (j = 0; j < dun->tunn_n; j++)
812812 {
813- grid_type *c_ptr;
813+ grid_type *g_ptr;
814814 feature_type *f_ptr;
815815 y = dun->tunn[j].y;
816816 x = dun->tunn[j].x;
817- c_ptr = &grid_array[y][x];
818- f_ptr = &f_info[c_ptr->feat];
817+ g_ptr = &grid_array[y][x];
818+ f_ptr = &f_info[g_ptr->feat];
819819
820820 /* Clear previous contents (if not a lake), add a floor */
821821 if (!have_flag(f_ptr->flags, FF_MOVE) || (!have_flag(f_ptr->flags, FF_WATER) && !have_flag(f_ptr->flags, FF_LAVA)))
822822 {
823823 /* Clear mimic type */
824- c_ptr->mimic = 0;
824+ g_ptr->mimic = 0;
825825
826- place_floor_grid(c_ptr);
826+ place_floor_grid(g_ptr);
827827 }
828828 }
829829
830830 /* Apply the piercings that we found */
831831 for (j = 0; j < dun->wall_n; j++)
832832 {
833- grid_type *c_ptr;
833+ grid_type *g_ptr;
834834 y = dun->wall[j].y;
835835 x = dun->wall[j].x;
836- c_ptr = &grid_array[y][x];
836+ g_ptr = &grid_array[y][x];
837837
838838 /* Clear mimic type */
839- c_ptr->mimic = 0;
839+ g_ptr->mimic = 0;
840840
841841 /* Clear previous contents, add up floor */
842- place_floor_grid(c_ptr);
842+ place_floor_grid(g_ptr);
843843
844844 /* Occasional doorway */
845845 if ((randint0(100) < dun_tun_pen) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_DOORS))
@@ -1364,16 +1364,16 @@ void clear_cave(void)
13641364 {
13651365 for (x = 0; x < MAX_WID; x++)
13661366 {
1367- grid_type *c_ptr = &grid_array[y][x];
1368- c_ptr->info = 0;
1369- c_ptr->feat = 0;
1370- c_ptr->o_idx = 0;
1371- c_ptr->m_idx = 0;
1372- c_ptr->special = 0;
1373- c_ptr->mimic = 0;
1374- c_ptr->cost = 0;
1375- c_ptr->dist = 0;
1376- c_ptr->when = 0;
1367+ grid_type *g_ptr = &grid_array[y][x];
1368+ g_ptr->info = 0;
1369+ g_ptr->feat = 0;
1370+ g_ptr->o_idx = 0;
1371+ g_ptr->m_idx = 0;
1372+ g_ptr->special = 0;
1373+ g_ptr->mimic = 0;
1374+ g_ptr->cost = 0;
1375+ g_ptr->dist = 0;
1376+ g_ptr->when = 0;
13771377 }
13781378 }
13791379
@@ -1523,7 +1523,7 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
15231523
15241524 bool door_flag = FALSE;
15251525
1526- grid_type *c_ptr;
1526+ grid_type *g_ptr;
15271527
15281528 /* Save the starting location */
15291529 start_row = row1;
@@ -1575,13 +1575,13 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
15751575
15761576
15771577 /* Access the location */
1578- c_ptr = &grid_array[tmp_row][tmp_col];
1578+ g_ptr = &grid_array[tmp_row][tmp_col];
15791579
15801580 /* Avoid "solid" walls */
1581- if (is_solid_grid(c_ptr)) continue;
1581+ if (is_solid_grid(g_ptr)) continue;
15821582
15831583 /* Pierce "outer" walls of rooms */
1584- if (is_outer_grid(c_ptr))
1584+ if (is_outer_grid(g_ptr))
15851585 {
15861586 /* Acquire the "next" location */
15871587 y = tmp_row + row_dir;
@@ -1620,7 +1620,7 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
16201620 }
16211621
16221622 /* Travel quickly through rooms */
1623- else if (c_ptr->info & (CAVE_ROOM))
1623+ else if (g_ptr->info & (CAVE_ROOM))
16241624 {
16251625 /* Accept the location */
16261626 row1 = tmp_row;
@@ -1628,7 +1628,7 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
16281628 }
16291629
16301630 /* Tunnel through all other walls */
1631- else if (is_extra_grid(c_ptr) || is_inner_grid(c_ptr) || is_solid_grid(c_ptr))
1631+ else if (is_extra_grid(g_ptr) || is_inner_grid(g_ptr) || is_solid_grid(g_ptr))
16321632 {
16331633 /* Accept this location */
16341634 row1 = tmp_row;
@@ -1713,11 +1713,11 @@ static bool set_tunnel(POSITION *x, POSITION *y, bool affectwall)
17131713 {
17141714 int i, j, dx, dy;
17151715
1716- grid_type *c_ptr = &grid_array[*y][*x];
1716+ grid_type *g_ptr = &grid_array[*y][*x];
17171717
17181718 if (!in_bounds(*y, *x)) return TRUE;
17191719
1720- if (is_inner_grid(c_ptr))
1720+ if (is_inner_grid(g_ptr))
17211721 {
17221722 return TRUE;
17231723 }
@@ -1742,7 +1742,7 @@ static bool set_tunnel(POSITION *x, POSITION *y, bool affectwall)
17421742 return TRUE;
17431743 }
17441744
1745- if (is_outer_grid(c_ptr) && affectwall)
1745+ if (is_outer_grid(g_ptr) && affectwall)
17461746 {
17471747 /* Save the wall location */
17481748 if (dun->wall_n < WALL_MAX)
@@ -1775,7 +1775,7 @@ static bool set_tunnel(POSITION *x, POSITION *y, bool affectwall)
17751775 return TRUE;
17761776 }
17771777
1778- if (is_solid_grid(c_ptr) && affectwall)
1778+ if (is_solid_grid(g_ptr) && affectwall)
17791779 {
17801780 /* cannot place tunnel here - use a square to the side */
17811781
@@ -1802,7 +1802,7 @@ static bool set_tunnel(POSITION *x, POSITION *y, bool affectwall)
18021802 if (i == 0)
18031803 {
18041804 /* Failed for some reason: hack - ignore the solidness */
1805- place_outer_grid(c_ptr);
1805+ place_outer_grid(g_ptr);
18061806 dx = 0;
18071807 dy = 0;
18081808 }
@@ -2007,7 +2007,7 @@ bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type,
20072007 int length;
20082008 int i;
20092009 bool retval, firstsuccede;
2010- grid_type *c_ptr;
2010+ grid_type *g_ptr;
20112011
20122012 length = distance(x1, y1, x2, y2);
20132013
@@ -2033,9 +2033,9 @@ bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type,
20332033 x3 = (x1 + x2) / 2;
20342034 y3 = (y1 + y2) / 2;
20352035 }
2036- /* cache c_ptr */
2037- c_ptr = &grid_array[y3][x3];
2038- if (is_solid_grid(c_ptr))
2036+ /* cache g_ptr */
2037+ g_ptr = &grid_array[y3][x3];
2038+ if (is_solid_grid(g_ptr))
20392039 {
20402040 /* move midpoint a bit to avoid problem. */
20412041
@@ -2064,10 +2064,10 @@ bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type,
20642064 }
20652065 y3 += dy;
20662066 x3 += dx;
2067- c_ptr = &grid_array[y3][x3];
2067+ g_ptr = &grid_array[y3][x3];
20682068 }
20692069
2070- if (is_floor_grid(c_ptr))
2070+ if (is_floor_grid(g_ptr))
20712071 {
20722072 if (build_tunnel2(x1, y1, x3, y3, type, cutoff))
20732073 {
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -735,7 +735,7 @@ static void get_out_monster(void)
735735 }
736736
737737 /*!
738- * マス構造体のspecial要素を利用する地形かどうかを判定するマクロ / Is this feature has special meaning (except floor_id) with c_ptr->special?
738+ * マス構造体のspecial要素を利用する地形かどうかを判定するマクロ / Is this feature has special meaning (except floor_id) with g_ptr->special?
739739 */
740740 #define feat_uses_special(F) (have_flag(f_info[(F)].flags, FF_SPECIAL))
741741
@@ -758,8 +758,8 @@ static void locate_connected_stairs(saved_floor_type *sf_ptr)
758758 {
759759 for (x = 0; x < cur_wid; x++)
760760 {
761- grid_type *c_ptr = &grid_array[y][x];
762- feature_type *f_ptr = &f_info[c_ptr->feat];
761+ grid_type *g_ptr = &grid_array[y][x];
762+ feature_type *f_ptr = &f_info[g_ptr->feat];
763763 bool ok = FALSE;
764764
765765 if (change_floor_mode & CFM_UP)
@@ -770,8 +770,8 @@ static void locate_connected_stairs(saved_floor_type *sf_ptr)
770770 ok = TRUE;
771771
772772 /* Found fixed stairs? */
773- if (c_ptr->special &&
774- c_ptr->special == sf_ptr->upper_floor_id)
773+ if (g_ptr->special &&
774+ g_ptr->special == sf_ptr->upper_floor_id)
775775 {
776776 sx = x;
777777 sy = y;
@@ -787,8 +787,8 @@ static void locate_connected_stairs(saved_floor_type *sf_ptr)
787787 ok = TRUE;
788788
789789 /* Found fixed stairs */
790- if (c_ptr->special &&
791- c_ptr->special == sf_ptr->lower_floor_id)
790+ if (g_ptr->special &&
791+ g_ptr->special == sf_ptr->lower_floor_id)
792792 {
793793 sx = x;
794794 sy = y;
@@ -845,7 +845,7 @@ static void locate_connected_stairs(saved_floor_type *sf_ptr)
845845 */
846846 void leave_floor(void)
847847 {
848- grid_type *c_ptr = NULL;
848+ grid_type *g_ptr = NULL;
849849 feature_type *f_ptr;
850850 saved_floor_type *sf_ptr;
851851 MONRACE_IDX quest_r_idx = 0;
@@ -936,14 +936,14 @@ void leave_floor(void)
936936 if (change_floor_mode & CFM_SAVE_FLOORS)
937937 {
938938 /* Extract stair position */
939- c_ptr = &grid_array[p_ptr->y][p_ptr->x];
940- f_ptr = &f_info[c_ptr->feat];
939+ g_ptr = &grid_array[p_ptr->y][p_ptr->x];
940+ f_ptr = &f_info[g_ptr->feat];
941941
942942 /* Get back to old saved floor? */
943- if (c_ptr->special && !have_flag(f_ptr->flags, FF_SPECIAL) && get_sf_ptr(c_ptr->special))
943+ if (g_ptr->special && !have_flag(f_ptr->flags, FF_SPECIAL) && get_sf_ptr(g_ptr->special))
944944 {
945945 /* Saved floor is exist. Use it. */
946- new_floor_id = c_ptr->special;
946+ new_floor_id = g_ptr->special;
947947 }
948948
949949 /* Mark shaft up/down */
@@ -1028,9 +1028,9 @@ void leave_floor(void)
10281028 new_floor_id = get_new_floor_id();
10291029
10301030 /* Connect from here */
1031- if (c_ptr && !feat_uses_special(c_ptr->feat))
1031+ if (g_ptr && !feat_uses_special(g_ptr->feat))
10321032 {
1033- c_ptr->special = new_floor_id;
1033+ g_ptr->special = new_floor_id;
10341034 }
10351035 }
10361036
@@ -1133,17 +1133,17 @@ void change_floor(void)
11331133 /* Forbid return stairs */
11341134 if (change_floor_mode & CFM_NO_RETURN)
11351135 {
1136- grid_type *c_ptr = &grid_array[p_ptr->y][p_ptr->x];
1136+ grid_type *g_ptr = &grid_array[p_ptr->y][p_ptr->x];
11371137
1138- if (!feat_uses_special(c_ptr->feat))
1138+ if (!feat_uses_special(g_ptr->feat))
11391139 {
11401140 if (change_floor_mode & (CFM_DOWN | CFM_UP))
11411141 {
11421142 /* Reset to floor */
1143- c_ptr->feat = feat_ground_type[randint0(100)];
1143+ g_ptr->feat = feat_ground_type[randint0(100)];
11441144 }
11451145
1146- c_ptr->special = 0;
1146+ g_ptr->special = 0;
11471147 }
11481148 }
11491149 }
@@ -1310,27 +1310,27 @@ void change_floor(void)
13101310 if (!(change_floor_mode & CFM_NO_RETURN))
13111311 {
13121312 /* Extract stair position */
1313- grid_type *c_ptr = &grid_array[p_ptr->y][p_ptr->x];
1313+ grid_type *g_ptr = &grid_array[p_ptr->y][p_ptr->x];
13141314
13151315 /*** Create connected stairs ***/
13161316
13171317 /* No stairs down from Quest */
13181318 if ((change_floor_mode & CFM_UP) && !quest_number(dun_level))
13191319 {
1320- c_ptr->feat = (change_floor_mode & CFM_SHAFT) ? feat_state(feat_down_stair, FF_SHAFT) : feat_down_stair;
1320+ g_ptr->feat = (change_floor_mode & CFM_SHAFT) ? feat_state(feat_down_stair, FF_SHAFT) : feat_down_stair;
13211321 }
13221322
13231323 /* No stairs up when ironman_downward */
13241324 else if ((change_floor_mode & CFM_DOWN) && !ironman_downward)
13251325 {
1326- c_ptr->feat = (change_floor_mode & CFM_SHAFT) ? feat_state(feat_up_stair, FF_SHAFT) : feat_up_stair;
1326+ g_ptr->feat = (change_floor_mode & CFM_SHAFT) ? feat_state(feat_up_stair, FF_SHAFT) : feat_up_stair;
13271327 }
13281328
13291329 /* Paranoia -- Clear mimic */
1330- c_ptr->mimic = 0;
1330+ g_ptr->mimic = 0;
13311331
13321332 /* Connect to previous floor */
1333- c_ptr->special = p_ptr->floor_id;
1333+ g_ptr->special = p_ptr->floor_id;
13341334 }
13351335 }
13361336
@@ -1475,14 +1475,14 @@ void stair_creation(void)
14751475 {
14761476 for (x = 0; x < cur_wid; x++)
14771477 {
1478- grid_type *c_ptr = &grid_array[y][x];
1478+ grid_type *g_ptr = &grid_array[y][x];
14791479
1480- if (!c_ptr->special) continue;
1481- if (feat_uses_special(c_ptr->feat)) continue;
1482- if (c_ptr->special != dest_floor_id) continue;
1480+ if (!g_ptr->special) continue;
1481+ if (feat_uses_special(g_ptr->feat)) continue;
1482+ if (g_ptr->special != dest_floor_id) continue;
14831483
14841484 /* Remove old stairs */
1485- c_ptr->special = 0;
1485+ g_ptr->special = 0;
14861486 cave_set_feat(y, x, feat_ground_type[randint0(100)]);
14871487 }
14881488 }
--- 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,
3939 POSITION changex, changey;
4040 POSITION ty, tx;
4141 bool done;
42- grid_type *c_ptr;
42+ grid_type *g_ptr;
4343
4444 length = distance(x1, y1, x2, y2);
4545
@@ -108,36 +108,36 @@ static void recursive_river(POSITION x1, POSITION y1, POSITION x2, POSITION y2,
108108 {
109109 if (!in_bounds2(ty, tx)) continue;
110110
111- c_ptr = &grid_array[ty][tx];
111+ g_ptr = &grid_array[ty][tx];
112112
113- if (c_ptr->feat == feat1) continue;
114- if (c_ptr->feat == feat2) continue;
113+ if (g_ptr->feat == feat1) continue;
114+ if (g_ptr->feat == feat2) continue;
115115
116116 if (distance(ty, tx, y, x) > rand_spread(width, 1)) continue;
117117
118118 /* Do not convert permanent features */
119- if (cave_perma_grid(c_ptr)) continue;
119+ if (cave_perma_grid(g_ptr)) continue;
120120
121121 /*
122122 * Clear previous contents, add feature
123123 * The border mainly gets feat2, while the center gets feat1
124124 */
125125 if (distance(ty, tx, y, x) > width)
126- c_ptr->feat = feat2;
126+ g_ptr->feat = feat2;
127127 else
128- c_ptr->feat = feat1;
128+ g_ptr->feat = feat1;
129129
130130 /* Clear garbage of hidden trap or door */
131- c_ptr->mimic = 0;
131+ g_ptr->mimic = 0;
132132
133133 /* Lava terrain glows */
134134 if (have_flag(f_info[feat1].flags, FF_LAVA))
135135 {
136- if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) c_ptr->info |= CAVE_GLOW;
136+ if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) g_ptr->info |= CAVE_GLOW;
137137 }
138138
139139 /* Hack -- don't teleport here */
140- c_ptr->info |= CAVE_ICKY;
140+ g_ptr->info |= CAVE_ICKY;
141141 }
142142 }
143143
@@ -232,7 +232,7 @@ void build_streamer(IDX feat, int chance)
232232 int y, x, dir;
233233 int dummy = 0;
234234
235- grid_type *c_ptr;
235+ grid_type *g_ptr;
236236 feature_type *f_ptr;
237237
238238 feature_type *streamer_ptr = &f_info[feat];
@@ -264,8 +264,8 @@ void build_streamer(IDX feat, int chance)
264264 if (!in_bounds2(ty, tx)) continue;
265265 break;
266266 }
267- c_ptr = &grid_array[ty][tx];
268- f_ptr = &f_info[c_ptr->feat];
267+ g_ptr = &grid_array[ty][tx];
268+ f_ptr = &f_info[g_ptr->feat];
269269
270270 if (have_flag(f_ptr->flags, FF_MOVE) && (have_flag(f_ptr->flags, FF_WATER) || have_flag(f_ptr->flags, FF_LAVA)))
271271 continue;
@@ -276,22 +276,22 @@ void build_streamer(IDX feat, int chance)
276276 /* Only convert "granite" walls */
277277 if (streamer_is_wall)
278278 {
279- if (!is_extra_grid(c_ptr) && !is_inner_grid(c_ptr) && !is_outer_grid(c_ptr) && !is_solid_grid(c_ptr)) continue;
280- if (is_closed_door(c_ptr->feat)) continue;
279+ if (!is_extra_grid(g_ptr) && !is_inner_grid(g_ptr) && !is_outer_grid(g_ptr) && !is_solid_grid(g_ptr)) continue;
280+ if (is_closed_door(g_ptr->feat)) continue;
281281 }
282282
283- if (c_ptr->m_idx && !(have_flag(streamer_ptr->flags, FF_PLACE) && monster_can_cross_terrain(feat, &r_info[m_list[c_ptr->m_idx].r_idx], 0)))
283+ if (g_ptr->m_idx && !(have_flag(streamer_ptr->flags, FF_PLACE) && monster_can_cross_terrain(feat, &r_info[m_list[g_ptr->m_idx].r_idx], 0)))
284284 {
285285 /* Delete the monster (if any) */
286286 delete_monster(ty, tx);
287287 }
288288
289- if (c_ptr->o_idx && !have_flag(streamer_ptr->flags, FF_DROP))
289+ if (g_ptr->o_idx && !have_flag(streamer_ptr->flags, FF_DROP))
290290 {
291291 OBJECT_IDX this_o_idx, next_o_idx = 0;
292292
293293 /* Scan all objects in the grid */
294- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
294+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
295295 {
296296 object_type *o_ptr = &o_list[this_o_idx];
297297
@@ -323,10 +323,10 @@ void build_streamer(IDX feat, int chance)
323323 }
324324
325325 /* Clear previous contents, add proper vein type */
326- c_ptr->feat = feat;
326+ g_ptr->feat = feat;
327327
328328 /* Paranoia: Clear mimic field */
329- c_ptr->mimic = 0;
329+ g_ptr->mimic = 0;
330330
331331 if (streamer_may_have_gold)
332332 {
@@ -382,7 +382,7 @@ void build_streamer(IDX feat, int chance)
382382 void place_trees(POSITION x, POSITION y)
383383 {
384384 int i, j;
385- grid_type *c_ptr;
385+ grid_type *g_ptr;
386386
387387 /* place trees/ rubble in ovalish distribution */
388388 for (i = x - 3; i < x + 4; i++)
@@ -390,13 +390,13 @@ void place_trees(POSITION x, POSITION y)
390390 for (j = y - 3; j < y + 4; j++)
391391 {
392392 if (!in_bounds(j, i)) continue;
393- c_ptr = &grid_array[j][i];
393+ g_ptr = &grid_array[j][i];
394394
395- if (c_ptr->info & CAVE_ICKY) continue;
396- if (c_ptr->o_idx) continue;
395+ if (g_ptr->info & CAVE_ICKY) continue;
396+ if (g_ptr->o_idx) continue;
397397
398398 /* Want square to be in the circle and accessable. */
399- if ((distance(j, i, y, x) < 4) && !cave_perma_grid(c_ptr))
399+ if ((distance(j, i, y, x) < 4) && !cave_perma_grid(g_ptr))
400400 {
401401 /*
402402 * Clear previous contents, add feature
@@ -413,7 +413,7 @@ void place_trees(POSITION x, POSITION y)
413413 }
414414
415415 /* Clear garbage of hidden trap or door */
416- c_ptr->mimic = 0;
416+ g_ptr->mimic = 0;
417417
418418 /* Light area since is open above */
419419 if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) grid_array[j][i].info |= (CAVE_GLOW | CAVE_ROOM);
--- a/src/grid.c
+++ b/src/grid.c
@@ -30,7 +30,7 @@ bool new_player_spot(void)
3030 POSITION y = 0, x = 0;
3131 int max_attempts = 10000;
3232
33- grid_type *c_ptr;
33+ grid_type *g_ptr;
3434 feature_type *f_ptr;
3535
3636 /* Place the player */
@@ -40,13 +40,13 @@ bool new_player_spot(void)
4040 y = (POSITION)rand_range(1, cur_hgt - 2);
4141 x = (POSITION)rand_range(1, cur_wid - 2);
4242
43- c_ptr = &grid_array[y][x];
43+ g_ptr = &grid_array[y][x];
4444
4545 /* Must be a "naked" floor grid */
46- if (c_ptr->m_idx) continue;
46+ if (g_ptr->m_idx) continue;
4747 if (dun_level)
4848 {
49- f_ptr = &f_info[c_ptr->feat];
49+ f_ptr = &f_info[g_ptr->feat];
5050
5151 if (max_attempts > 5000) /* Rule 1 */
5252 {
@@ -61,11 +61,11 @@ bool new_player_spot(void)
6161 /* Refuse to start on anti-teleport grids in dungeon */
6262 if (!have_flag(f_ptr->flags, FF_TELEPORTABLE)) continue;
6363 }
64- if (!player_can_enter(c_ptr->feat, 0)) continue;
64+ if (!player_can_enter(g_ptr->feat, 0)) continue;
6565 if (!in_bounds(y, x)) continue;
6666
6767 /* Refuse to start on anti-teleport grids */
68- if (c_ptr->info & (CAVE_ICKY)) continue;
68+ if (g_ptr->info & (CAVE_ICKY)) continue;
6969
7070 break;
7171 }
@@ -92,11 +92,11 @@ void place_random_stairs(POSITION y, POSITION x)
9292 {
9393 bool up_stairs = TRUE;
9494 bool down_stairs = TRUE;
95- grid_type *c_ptr;
95+ grid_type *g_ptr;
9696
9797 /* Paranoia */
98- c_ptr = &grid_array[y][x];
99- if (!is_floor_grid(c_ptr) || c_ptr->o_idx) return;
98+ g_ptr = &grid_array[y][x];
99+ if (!is_floor_grid(g_ptr) || g_ptr->o_idx) return;
100100
101101 /* Town */
102102 if (!dun_level) up_stairs = FALSE;
@@ -134,10 +134,10 @@ void place_random_door(POSITION y, POSITION x, bool room)
134134 {
135135 int tmp, type;
136136 FEAT_IDX feat = feat_none;
137- grid_type *c_ptr = &grid_array[y][x];
137+ grid_type *g_ptr = &grid_array[y][x];
138138
139139 /* Initialize mimic info */
140- c_ptr->mimic = 0;
140+ g_ptr->mimic = 0;
141141
142142 if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_DOORS)
143143 {
@@ -175,16 +175,16 @@ void place_random_door(POSITION y, POSITION x, bool room)
175175 if (type != DOOR_CURTAIN)
176176 {
177177 /* Hide. If on the edge of room, use outer wall. */
178- c_ptr->mimic = room ? feat_wall_outer : feat_wall_type[randint0(100)];
178+ g_ptr->mimic = room ? feat_wall_outer : feat_wall_type[randint0(100)];
179179
180180 /* Floor type terrain cannot hide a door */
181- if (feat_supports_los(c_ptr->mimic) && !feat_supports_los(c_ptr->feat))
181+ if (feat_supports_los(g_ptr->mimic) && !feat_supports_los(g_ptr->feat))
182182 {
183- if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY))
183+ if (have_flag(f_info[g_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[g_ptr->mimic].flags, FF_CAN_FLY))
184184 {
185- c_ptr->feat = one_in_(2) ? c_ptr->mimic : feat_ground_type[randint0(100)];
185+ g_ptr->feat = one_in_(2) ? g_ptr->mimic : feat_ground_type[randint0(100)];
186186 }
187- c_ptr->mimic = 0;
187+ g_ptr->mimic = 0;
188188 }
189189 }
190190 }
@@ -298,7 +298,7 @@ void place_secret_door(POSITION y, POSITION x, int type)
298298 }
299299 else
300300 {
301- grid_type *c_ptr = &grid_array[y][x];
301+ grid_type *g_ptr = &grid_array[y][x];
302302
303303 if (type == DOOR_DEFAULT)
304304 {
@@ -313,20 +313,20 @@ void place_secret_door(POSITION y, POSITION x, int type)
313313 if (type != DOOR_CURTAIN)
314314 {
315315 /* Hide by inner wall because this is used in rooms only */
316- c_ptr->mimic = feat_wall_inner;
316+ g_ptr->mimic = feat_wall_inner;
317317
318318 /* Floor type terrain cannot hide a door */
319- if (feat_supports_los(c_ptr->mimic) && !feat_supports_los(c_ptr->feat))
319+ if (feat_supports_los(g_ptr->mimic) && !feat_supports_los(g_ptr->feat))
320320 {
321- if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY))
321+ if (have_flag(f_info[g_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[g_ptr->mimic].flags, FF_CAN_FLY))
322322 {
323- c_ptr->feat = one_in_(2) ? c_ptr->mimic : feat_ground_type[randint0(100)];
323+ g_ptr->feat = one_in_(2) ? g_ptr->mimic : feat_ground_type[randint0(100)];
324324 }
325- c_ptr->mimic = 0;
325+ g_ptr->mimic = 0;
326326 }
327327 }
328328
329- c_ptr->info &= ~(CAVE_FLOOR);
329+ g_ptr->info &= ~(CAVE_FLOOR);
330330 delete_monster(y, x);
331331 }
332332 }
@@ -399,7 +399,7 @@ static int next_to_corr(POSITION y1, POSITION x1)
399399 int i, k = 0;
400400 POSITION y, x;
401401
402- grid_type *c_ptr;
402+ grid_type *g_ptr;
403403
404404 /* Scan adjacent grids */
405405 for (i = 0; i < 4; i++)
@@ -407,17 +407,17 @@ static int next_to_corr(POSITION y1, POSITION x1)
407407 /* Extract the location */
408408 y = y1 + ddy_ddd[i];
409409 x = x1 + ddx_ddd[i];
410- c_ptr = &grid_array[y][x];
410+ g_ptr = &grid_array[y][x];
411411
412412 /* Skip non floors */
413- if (cave_have_flag_grid(c_ptr, FF_WALL)) continue;
413+ if (cave_have_flag_grid(g_ptr, FF_WALL)) continue;
414414
415415 /* Skip non "empty floor" grids */
416- if (!is_floor_grid(c_ptr))
416+ if (!is_floor_grid(g_ptr))
417417 continue;
418418
419419 /* Skip grids inside rooms */
420- if (c_ptr->info & (CAVE_ROOM)) continue;
420+ if (g_ptr->info & (CAVE_ROOM)) continue;
421421
422422 /* Count these grids */
423423 k++;
@@ -556,7 +556,7 @@ void vault_objects(POSITION y, POSITION x, int num)
556556 int dummy = 0;
557557 int i = 0, j = y, k = x;
558558
559- grid_type *c_ptr;
559+ grid_type *g_ptr;
560560
561561
562562 /* Attempt to place 'num' objects */
@@ -581,8 +581,8 @@ void vault_objects(POSITION y, POSITION x, int num)
581581 }
582582
583583 /* Require "clean" floor space */
584- c_ptr = &grid_array[j][k];
585- if (!is_floor_grid(c_ptr) || c_ptr->o_idx) continue;
584+ g_ptr = &grid_array[j][k];
585+ if (!is_floor_grid(g_ptr) || g_ptr->o_idx) continue;
586586
587587 if (randint0(100) < 75)
588588 {
@@ -614,7 +614,7 @@ void vault_trap_aux(POSITION y, POSITION x, POSITION yd, POSITION xd)
614614 int count = 0, y1 = y, x1 = x;
615615 int dummy = 0;
616616
617- grid_type *c_ptr;
617+ grid_type *g_ptr;
618618
619619 /* Place traps */
620620 for (count = 0; count <= 5; count++)
@@ -635,8 +635,8 @@ void vault_trap_aux(POSITION y, POSITION x, POSITION yd, POSITION xd)
635635 }
636636
637637 /* Require "naked" floor grids */
638- c_ptr = &grid_array[y1][x1];
639- if (!is_floor_grid(c_ptr) || c_ptr->o_idx || c_ptr->m_idx) continue;
638+ g_ptr = &grid_array[y1][x1];
639+ if (!is_floor_grid(g_ptr) || g_ptr->o_idx || g_ptr->m_idx) continue;
640640
641641 /* Place the trap */
642642 place_trap(y1, x1);
@@ -679,7 +679,7 @@ void vault_monsters(POSITION y1, POSITION x1, int num)
679679 {
680680 int k, i;
681681 POSITION y, x;
682- grid_type *c_ptr;
682+ grid_type *g_ptr;
683683
684684 /* Try to summon "num" monsters "near" the given location */
685685 for (k = 0; k < num; k++)
@@ -693,8 +693,8 @@ void vault_monsters(POSITION y1, POSITION x1, int num)
693693 scatter(&y, &x, y1, x1, d, 0);
694694
695695 /* Require "empty" floor grids */
696- c_ptr = &grid_array[y][x];
697- if (!cave_empty_grid(c_ptr)) continue;
696+ g_ptr = &grid_array[y][x];
697+ if (!cave_empty_grid(g_ptr)) continue;
698698
699699 /* Place the monster (allow groups) */
700700 monster_level = base_level + 2;
--- a/src/init1.c
+++ b/src/init1.c
@@ -3900,7 +3900,7 @@ static errr parse_line_building(char *buf)
39003900 */
39013901 static void drop_here(object_type *j_ptr, POSITION y, POSITION x)
39023902 {
3903- grid_type *c_ptr = &grid_array[y][x];
3903+ grid_type *g_ptr = &grid_array[y][x];
39043904 object_type *o_ptr;
39053905
39063906 OBJECT_IDX o_idx = o_pop();
@@ -3919,10 +3919,10 @@ static void drop_here(object_type *j_ptr, POSITION y, POSITION x)
39193919 o_ptr->held_m_idx = 0;
39203920
39213921 /* Build a stack */
3922- o_ptr->next_o_idx = c_ptr->o_idx;
3922+ o_ptr->next_o_idx = g_ptr->o_idx;
39233923
39243924 /* Place the object */
3925- c_ptr->o_idx = o_idx;
3925+ g_ptr->o_idx = o_idx;
39263926 }
39273927
39283928
@@ -3984,7 +3984,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
39843984
39853985 for (*x = xmin, i = 0; ((*x < xmax) && (i < len)); (*x)++, s++, i++)
39863986 {
3987- grid_type *c_ptr = &grid_array[*y][*x];
3987+ grid_type *g_ptr = &grid_array[*y][*x];
39883988
39893989 int idx = s[0];
39903990
@@ -3994,13 +3994,13 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
39943994 ARTIFACT_IDX artifact_index = letter[idx].artifact;
39953995
39963996 /* Lay down a floor */
3997- c_ptr->feat = conv_dungeon_feat(letter[idx].feature);
3997+ g_ptr->feat = conv_dungeon_feat(letter[idx].feature);
39983998
39993999 /* Only the features */
40004000 if (init_flags & INIT_ONLY_FEATURES) continue;
40014001
40024002 /* Cave info */
4003- c_ptr->info = letter[idx].cave_info;
4003+ g_ptr->info = letter[idx].cave_info;
40044004
40054005 /* Create a monster */
40064006 if (random & RANDOM_MONSTER)
@@ -4096,8 +4096,8 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
40964096 /* Hidden trap (or door) */
40974097 else if (letter[idx].trap)
40984098 {
4099- c_ptr->mimic = c_ptr->feat;
4100- c_ptr->feat = conv_dungeon_feat(letter[idx].trap);
4099+ g_ptr->mimic = g_ptr->feat;
4100+ g_ptr->feat = conv_dungeon_feat(letter[idx].trap);
41014101 }
41024102 else if (object_index)
41034103 {
@@ -4138,7 +4138,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
41384138 }
41394139
41404140 /* Terrain special */
4141- c_ptr->special = letter[idx].special;
4141+ g_ptr->special = letter[idx].special;
41424142 }
41434143
41444144 (*y)++;
--- a/src/load.c
+++ b/src/load.c
@@ -2549,7 +2549,7 @@ static errr rd_dungeon_old(void)
25492549 byte tmp8u;
25502550 s16b tmp16s;
25512551 u16b limit;
2552- grid_type *c_ptr;
2552+ grid_type *g_ptr;
25532553
25542554
25552555 /*** Basic info ***/
@@ -2619,10 +2619,10 @@ static errr rd_dungeon_old(void)
26192619 for (i = count; i > 0; i--)
26202620 {
26212621 /* Access the grid_array */
2622- c_ptr = &grid_array[y][x];
2622+ g_ptr = &grid_array[y][x];
26232623
26242624 /* Extract "info" */
2625- c_ptr->info = info;
2625+ g_ptr->info = info;
26262626
26272627 /* Advance/Wrap */
26282628 if (++x >= xmax)
@@ -2650,10 +2650,10 @@ static errr rd_dungeon_old(void)
26502650 for (i = count; i > 0; i--)
26512651 {
26522652 /* Access the grid_array */
2653- c_ptr = &grid_array[y][x];
2653+ g_ptr = &grid_array[y][x];
26542654
26552655 /* Extract "feat" */
2656- c_ptr->feat = (s16b)tmp8u;
2656+ g_ptr->feat = (s16b)tmp8u;
26572657
26582658 /* Advance/Wrap */
26592659 if (++x >= xmax)
@@ -2680,10 +2680,10 @@ static errr rd_dungeon_old(void)
26802680 for (i = count; i > 0; i--)
26812681 {
26822682 /* Access the grid_array */
2683- c_ptr = &grid_array[y][x];
2683+ g_ptr = &grid_array[y][x];
26842684
26852685 /* Extract "mimic" */
2686- c_ptr->mimic = (s16b)tmp8u;
2686+ g_ptr->mimic = (s16b)tmp8u;
26872687
26882688 /* Advance/Wrap */
26892689 if (++x >= xmax)
@@ -2710,10 +2710,10 @@ static errr rd_dungeon_old(void)
27102710 for (i = count; i > 0; i--)
27112711 {
27122712 /* Access the grid_array */
2713- c_ptr = &grid_array[y][x];
2713+ g_ptr = &grid_array[y][x];
27142714
27152715 /* Extract "feat" */
2716- c_ptr->special = tmp16s;
2716+ g_ptr->special = tmp16s;
27172717
27182718 /* Advance/Wrap */
27192719 if (++x >= xmax)
@@ -2742,20 +2742,20 @@ static errr rd_dungeon_old(void)
27422742 for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
27432743 {
27442744 /* Access the grid_array */
2745- c_ptr = &grid_array[y][x];
2745+ g_ptr = &grid_array[y][x];
27462746
27472747 /* Very old */
2748- if (c_ptr->feat == OLD_FEAT_INVIS)
2748+ if (g_ptr->feat == OLD_FEAT_INVIS)
27492749 {
2750- c_ptr->feat = feat_floor;
2751- c_ptr->info |= CAVE_TRAP;
2750+ g_ptr->feat = feat_floor;
2751+ g_ptr->info |= CAVE_TRAP;
27522752 }
27532753
27542754 /* Older than 1.1.1 */
2755- if (c_ptr->feat == OLD_FEAT_MIRROR)
2755+ if (g_ptr->feat == OLD_FEAT_MIRROR)
27562756 {
2757- c_ptr->feat = feat_floor;
2758- c_ptr->info |= CAVE_OBJECT;
2757+ g_ptr->feat = feat_floor;
2758+ g_ptr->info |= CAVE_OBJECT;
27592759 }
27602760 }
27612761 }
@@ -2765,36 +2765,36 @@ static errr rd_dungeon_old(void)
27652765 for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
27662766 {
27672767 /* Access the grid_array */
2768- c_ptr = &grid_array[y][x];
2768+ g_ptr = &grid_array[y][x];
27692769
27702770 /* Old CAVE_IN_MIRROR flag */
2771- if (c_ptr->info & CAVE_OBJECT)
2771+ if (g_ptr->info & CAVE_OBJECT)
27722772 {
2773- c_ptr->mimic = feat_mirror;
2773+ g_ptr->mimic = feat_mirror;
27742774 }
27752775
27762776 /* Runes will be mimics and flags */
2777- else if ((c_ptr->feat == OLD_FEAT_MINOR_GLYPH) ||
2778- (c_ptr->feat == OLD_FEAT_GLYPH))
2777+ else if ((g_ptr->feat == OLD_FEAT_MINOR_GLYPH) ||
2778+ (g_ptr->feat == OLD_FEAT_GLYPH))
27792779 {
2780- c_ptr->info |= CAVE_OBJECT;
2781- c_ptr->mimic = c_ptr->feat;
2782- c_ptr->feat = feat_floor;
2780+ g_ptr->info |= CAVE_OBJECT;
2781+ g_ptr->mimic = g_ptr->feat;
2782+ g_ptr->feat = feat_floor;
27832783 }
27842784
27852785 /* Hidden traps will be trap terrains mimicing floor */
2786- else if (c_ptr->info & CAVE_TRAP)
2786+ else if (g_ptr->info & CAVE_TRAP)
27872787 {
2788- c_ptr->info &= ~CAVE_TRAP;
2789- c_ptr->mimic = c_ptr->feat;
2790- c_ptr->feat = choose_random_trap();
2788+ g_ptr->info &= ~CAVE_TRAP;
2789+ g_ptr->mimic = g_ptr->feat;
2790+ g_ptr->feat = choose_random_trap();
27912791 }
27922792
27932793 /* Another hidden trap */
2794- else if (c_ptr->feat == OLD_FEAT_INVIS)
2794+ else if (g_ptr->feat == OLD_FEAT_INVIS)
27952795 {
2796- c_ptr->mimic = feat_floor;
2797- c_ptr->feat = feat_trap_open;
2796+ g_ptr->mimic = feat_floor;
2797+ g_ptr->feat = feat_trap_open;
27982798 }
27992799 }
28002800 }
@@ -2805,25 +2805,25 @@ static errr rd_dungeon_old(void)
28052805 for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
28062806 {
28072807 /* Access the grid_array */
2808- c_ptr = &grid_array[y][x];
2808+ g_ptr = &grid_array[y][x];
28092809
2810- if ((c_ptr->special == OLD_QUEST_WATER_CAVE) && !dun_level)
2810+ if ((g_ptr->special == OLD_QUEST_WATER_CAVE) && !dun_level)
28112811 {
2812- if (c_ptr->feat == OLD_FEAT_QUEST_ENTER)
2812+ if (g_ptr->feat == OLD_FEAT_QUEST_ENTER)
28132813 {
2814- c_ptr->feat = feat_tree;
2815- c_ptr->special = 0;
2814+ g_ptr->feat = feat_tree;
2815+ g_ptr->special = 0;
28162816 }
2817- else if (c_ptr->feat == OLD_FEAT_BLDG_1)
2817+ else if (g_ptr->feat == OLD_FEAT_BLDG_1)
28182818 {
2819- c_ptr->special = lite_town ? QUEST_OLD_CASTLE : QUEST_ROYAL_CRYPT;
2819+ g_ptr->special = lite_town ? QUEST_OLD_CASTLE : QUEST_ROYAL_CRYPT;
28202820 }
28212821 }
2822- else if ((c_ptr->feat == OLD_FEAT_QUEST_EXIT) &&
2822+ else if ((g_ptr->feat == OLD_FEAT_QUEST_EXIT) &&
28232823 (p_ptr->inside_quest == OLD_QUEST_WATER_CAVE))
28242824 {
2825- c_ptr->feat = feat_up_stair;
2826- c_ptr->special = 0;
2825+ g_ptr->feat = feat_up_stair;
2826+ g_ptr->special = 0;
28272827 }
28282828 }
28292829 }
@@ -2886,13 +2886,13 @@ static errr rd_dungeon_old(void)
28862886 else
28872887 {
28882888 /* Access the item location */
2889- c_ptr = &grid_array[o_ptr->iy][o_ptr->ix];
2889+ g_ptr = &grid_array[o_ptr->iy][o_ptr->ix];
28902890
28912891 /* Build a stack */
2892- o_ptr->next_o_idx = c_ptr->o_idx;
2892+ o_ptr->next_o_idx = g_ptr->o_idx;
28932893
28942894 /* Place the object */
2895- c_ptr->o_idx = o_idx;
2895+ g_ptr->o_idx = o_idx;
28962896 }
28972897 }
28982898
@@ -2933,10 +2933,10 @@ static errr rd_dungeon_old(void)
29332933
29342934
29352935 /* Access grid */
2936- c_ptr = &grid_array[m_ptr->fy][m_ptr->fx];
2936+ g_ptr = &grid_array[m_ptr->fy][m_ptr->fx];
29372937
29382938 /* Mark the location */
2939- c_ptr->m_idx = m_idx;
2939+ g_ptr->m_idx = m_idx;
29402940
29412941 /* Count */
29422942 real_r_ptr(m_ptr)->cur_num++;
@@ -3104,13 +3104,13 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
31043104 for (i = count; i > 0; i--)
31053105 {
31063106 /* Access the grid_array */
3107- grid_type *c_ptr = &grid_array[y][x];
3107+ grid_type *g_ptr = &grid_array[y][x];
31083108
31093109 /* Extract grid_array data */
3110- c_ptr->info = templates[id].info;
3111- c_ptr->feat = templates[id].feat;
3112- c_ptr->mimic = templates[id].mimic;
3113- c_ptr->special = templates[id].special;
3110+ g_ptr->info = templates[id].info;
3111+ g_ptr->feat = templates[id].feat;
3112+ g_ptr->mimic = templates[id].mimic;
3113+ g_ptr->special = templates[id].special;
31143114
31153115 /* Advance/Wrap */
31163116 if (++x >= xmax)
@@ -3130,25 +3130,25 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
31303130 for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
31313131 {
31323132 /* Access the grid_array */
3133- grid_type *c_ptr = &grid_array[y][x];
3133+ grid_type *g_ptr = &grid_array[y][x];
31343134
3135- if ((c_ptr->special == OLD_QUEST_WATER_CAVE) && !dun_level)
3135+ if ((g_ptr->special == OLD_QUEST_WATER_CAVE) && !dun_level)
31363136 {
3137- if (c_ptr->feat == OLD_FEAT_QUEST_ENTER)
3137+ if (g_ptr->feat == OLD_FEAT_QUEST_ENTER)
31383138 {
3139- c_ptr->feat = feat_tree;
3140- c_ptr->special = 0;
3139+ g_ptr->feat = feat_tree;
3140+ g_ptr->special = 0;
31413141 }
3142- else if (c_ptr->feat == OLD_FEAT_BLDG_1)
3142+ else if (g_ptr->feat == OLD_FEAT_BLDG_1)
31433143 {
3144- c_ptr->special = lite_town ? QUEST_OLD_CASTLE : QUEST_ROYAL_CRYPT;
3144+ g_ptr->special = lite_town ? QUEST_OLD_CASTLE : QUEST_ROYAL_CRYPT;
31453145 }
31463146 }
3147- else if ((c_ptr->feat == OLD_FEAT_QUEST_EXIT) &&
3147+ else if ((g_ptr->feat == OLD_FEAT_QUEST_EXIT) &&
31483148 (p_ptr->inside_quest == OLD_QUEST_WATER_CAVE))
31493149 {
3150- c_ptr->feat = feat_up_stair;
3151- c_ptr->special = 0;
3150+ g_ptr->feat = feat_up_stair;
3151+ g_ptr->special = 0;
31523152 }
31533153 }
31543154 }
@@ -3204,13 +3204,13 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
32043204 else
32053205 {
32063206 /* Access the item location */
3207- grid_type *c_ptr = &grid_array[o_ptr->iy][o_ptr->ix];
3207+ grid_type *g_ptr = &grid_array[o_ptr->iy][o_ptr->ix];
32083208
32093209 /* Build a stack */
3210- o_ptr->next_o_idx = c_ptr->o_idx;
3210+ o_ptr->next_o_idx = g_ptr->o_idx;
32113211
32123212 /* Place the object */
3213- c_ptr->o_idx = o_idx;
3213+ g_ptr->o_idx = o_idx;
32143214 }
32153215 }
32163216
@@ -3226,7 +3226,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
32263226 /* Read the monsters */
32273227 for (i = 1; i < limit; i++)
32283228 {
3229- grid_type *c_ptr;
3229+ grid_type *g_ptr;
32303230 MONSTER_IDX m_idx;
32313231 monster_type *m_ptr;
32323232
@@ -3244,10 +3244,10 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
32443244
32453245
32463246 /* Access grid */
3247- c_ptr = &grid_array[m_ptr->fy][m_ptr->fx];
3247+ g_ptr = &grid_array[m_ptr->fy][m_ptr->fx];
32483248
32493249 /* Mark the location */
3250- c_ptr->m_idx = m_idx;
3250+ g_ptr->m_idx = m_idx;
32513251
32523252 /* Count */
32533253 real_r_ptr(m_ptr)->cur_num++;
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -434,9 +434,9 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
434434 int num = 0, bonus, chance, vir;
435435 HIT_POINT k;
436436
437- grid_type *c_ptr = &grid_array[y][x];
437+ grid_type *g_ptr = &grid_array[y][x];
438438
439- monster_type *m_ptr = &m_list[c_ptr->m_idx];
439+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
440440 monster_race *r_ptr = &r_info[m_ptr->r_idx];
441441
442442 /* Access the weapon */
@@ -535,7 +535,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
535535 }
536536
537537 /* Disturb the monster */
538- (void)set_monster_csleep(c_ptr->m_idx, 0);
538+ (void)set_monster_csleep(g_ptr->m_idx, 0);
539539
540540 /* Extract monster name (or "it") */
541541 monster_desc(m_name, m_ptr, 0);
@@ -773,7 +773,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
773773 {
774774 if (p_ptr->lev > randint1(r_ptr->level + resist_stun + 10))
775775 {
776- if (set_monster_stunned(c_ptr->m_idx, stun_effect + MON_STUNNED(m_ptr)))
776+ if (set_monster_stunned(g_ptr->m_idx, stun_effect + MON_STUNNED(m_ptr)))
777777 {
778778 msg_format(_("%^sはフラフラになった。", "%^s is stunned."), m_name);
779779 }
@@ -919,7 +919,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
919919 }
920920
921921 /* Apply stun */
922- (void)set_monster_stunned(c_ptr->m_idx, MON_STUNNED(m_ptr) + tmp);
922+ (void)set_monster_stunned(g_ptr->m_idx, MON_STUNNED(m_ptr) + tmp);
923923 }
924924 else
925925 {
@@ -973,7 +973,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
973973 drain_result = m_ptr->hp;
974974
975975 /* Damage, check for fear and death */
976- if (mon_take_hit(c_ptr->m_idx, k, fear, NULL))
976+ if (mon_take_hit(g_ptr->m_idx, k, fear, NULL))
977977 {
978978 *mdeath = TRUE;
979979 if ((p_ptr->pclass == CLASS_BERSERKER) && p_ptr->energy_use)
@@ -1100,7 +1100,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
11001100 else
11011101 {
11021102 msg_format(_("%^sは混乱したようだ。", "%^s appears confused."), m_name);
1103- (void)set_monster_confused(c_ptr->m_idx, MON_CONFUSED(m_ptr) + 10 + randint0(p_ptr->lev) / 5);
1103+ (void)set_monster_confused(g_ptr->m_idx, MON_CONFUSED(m_ptr) + 10 + randint0(p_ptr->lev) / 5);
11041104 }
11051105 }
11061106
@@ -1127,7 +1127,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
11271127 if (!resists_tele)
11281128 {
11291129 msg_format(_("%^sは消えた!", "%^s disappears!"), m_name);
1130- teleport_away(c_ptr->m_idx, 50, TELEPORT_PASSIVE);
1130+ teleport_away(g_ptr->m_idx, 50, TELEPORT_PASSIVE);
11311131 num = num_blow + 1; /* Can't hit it anymore! */
11321132 *mdeath = TRUE;
11331133 }
@@ -1150,7 +1150,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
11501150 }
11511151
11521152 /* Hack -- Get new monster */
1153- m_ptr = &m_list[c_ptr->m_idx];
1153+ m_ptr = &m_list[g_ptr->m_idx];
11541154
11551155 /* Oops, we need a different name... */
11561156 monster_desc(m_name, m_ptr, 0);
@@ -1161,7 +1161,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
11611161 }
11621162 else if (o_ptr->name1 == ART_G_HAMMER)
11631163 {
1164- monster_type *target_ptr = &m_list[c_ptr->m_idx];
1164+ monster_type *target_ptr = &m_list[g_ptr->m_idx];
11651165
11661166 if (target_ptr->hold_o_idx)
11671167 {
@@ -1324,8 +1324,8 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
13241324 bool mdeath = FALSE;
13251325 bool stormbringer = FALSE;
13261326
1327- grid_type *c_ptr = &grid_array[y][x];
1328- monster_type *m_ptr = &m_list[c_ptr->m_idx];
1327+ grid_type *g_ptr = &grid_array[y][x];
1328+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
13291329 monster_race *r_ptr = &r_info[m_ptr->r_idx];
13301330 GAME_TEXT m_name[MAX_NLEN];
13311331
@@ -1350,7 +1350,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
13501350 if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
13511351
13521352 /* Track a new monster */
1353- health_track(c_ptr->m_idx);
1353+ health_track(g_ptr->m_idx);
13541354 }
13551355
13561356 if ((r_ptr->flags1 & RF1_FEMALE) &&
@@ -1411,7 +1411,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
14111411 msg_format(_("そっちには何か恐いものがいる!", "There is something scary in your way!"));
14121412
14131413 /* Disturb the monster */
1414- (void)set_monster_csleep(c_ptr->m_idx, 0);
1414+ (void)set_monster_csleep(g_ptr->m_idx, 0);
14151415
14161416 return FALSE;
14171417 }
@@ -1467,7 +1467,7 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
14671467 }
14681468 }
14691469
1470- riding_t_m_idx = c_ptr->m_idx;
1470+ riding_t_m_idx = g_ptr->m_idx;
14711471 if (p_ptr->migite) py_attack_aux(y, x, &fear, &mdeath, 0, mode);
14721472 if (p_ptr->hidarite && !mdeath) py_attack_aux(y, x, &fear, &mdeath, 1, mode);
14731473
@@ -1475,15 +1475,15 @@ bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode)
14751475 if (!mdeath)
14761476 {
14771477 if ((p_ptr->muta2 & MUT2_HORNS) && !mdeath)
1478- natural_attack(c_ptr->m_idx, MUT2_HORNS, &fear, &mdeath);
1478+ natural_attack(g_ptr->m_idx, MUT2_HORNS, &fear, &mdeath);
14791479 if ((p_ptr->muta2 & MUT2_BEAK) && !mdeath)
1480- natural_attack(c_ptr->m_idx, MUT2_BEAK, &fear, &mdeath);
1480+ natural_attack(g_ptr->m_idx, MUT2_BEAK, &fear, &mdeath);
14811481 if ((p_ptr->muta2 & MUT2_SCOR_TAIL) && !mdeath)
1482- natural_attack(c_ptr->m_idx, MUT2_SCOR_TAIL, &fear, &mdeath);
1482+ natural_attack(g_ptr->m_idx, MUT2_SCOR_TAIL, &fear, &mdeath);
14831483 if ((p_ptr->muta2 & MUT2_TRUNK) && !mdeath)
1484- natural_attack(c_ptr->m_idx, MUT2_TRUNK, &fear, &mdeath);
1484+ natural_attack(g_ptr->m_idx, MUT2_TRUNK, &fear, &mdeath);
14851485 if ((p_ptr->muta2 & MUT2_TENTACLES) && !mdeath)
1486- natural_attack(c_ptr->m_idx, MUT2_TENTACLES, &fear, &mdeath);
1486+ natural_attack(g_ptr->m_idx, MUT2_TENTACLES, &fear, &mdeath);
14871487 }
14881488
14891489 /* Hack -- delay fear messages */
--- a/src/mind.c
+++ b/src/mind.c
@@ -1644,10 +1644,10 @@ static bool cast_ninja_spell(int spell)
16441644 {
16451645 POSITION ny = GRID_Y(path_g[i]);
16461646 POSITION nx = GRID_X(path_g[i]);
1647- grid_type *c_ptr = &grid_array[ny][nx];
1647+ grid_type *g_ptr = &grid_array[ny][nx];
16481648
16491649 if (in_bounds(ny, nx) && cave_empty_bold(ny, nx) &&
1650- !(c_ptr->info & CAVE_OBJECT) &&
1650+ !(g_ptr->info & CAVE_OBJECT) &&
16511651 !pattern_tile(ny, nx))
16521652 {
16531653 ty = ny;
--- 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)
472472 int i, best = 999;
473473 POSITION y, x, y1, x1;
474474
475- grid_type *c_ptr;
475+ grid_type *g_ptr;
476476 bool can_open_door = FALSE;
477477 int now_cost;
478478
@@ -510,15 +510,15 @@ static bool get_moves_aux2(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
510510 /* Simply move to player */
511511 if (player_bold(y, x)) return (FALSE);
512512
513- c_ptr = &grid_array[y][x];
513+ g_ptr = &grid_array[y][x];
514514
515- cost = c_ptr->cost;
515+ cost = g_ptr->cost;
516516
517517 /* Monster cannot kill or pass walls */
518518 if (!(((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall)) || ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != p_ptr->riding))))
519519 {
520520 if (cost == 0) continue;
521- if (!can_open_door && is_closed_door(c_ptr->feat)) continue;
521+ if (!can_open_door && is_closed_door(g_ptr->feat)) continue;
522522 }
523523
524524 /* Hack -- for kill or pass wall monster.. */
@@ -577,7 +577,7 @@ static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no
577577 int i, best;
578578 POSITION y, x, y1, x1;
579579
580- grid_type *c_ptr;
580+ grid_type *g_ptr;
581581 bool use_scent = FALSE;
582582
583583 monster_type *m_ptr = &m_list[m_idx];
@@ -607,19 +607,19 @@ static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no
607607 if (player_has_los_bold(y1, x1) && projectable(p_ptr->y, p_ptr->x, y1, x1)) return (FALSE);
608608
609609 /* Monster grid */
610- c_ptr = &grid_array[y1][x1];
610+ g_ptr = &grid_array[y1][x1];
611611
612612 /* If we can hear noises, advance towards them */
613- if (c_ptr->cost)
613+ if (g_ptr->cost)
614614 {
615615 best = 999;
616616 }
617617
618618 /* Otherwise, try to follow a scent trail */
619- else if (c_ptr->when)
619+ else if (g_ptr->when)
620620 {
621621 /* Too old smell */
622- if (grid_array[p_ptr->y][p_ptr->x].when - c_ptr->when > 127) return (FALSE);
622+ if (grid_array[p_ptr->y][p_ptr->x].when - g_ptr->when > 127) return (FALSE);
623623
624624 use_scent = TRUE;
625625 best = 0;
@@ -640,12 +640,12 @@ static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no
640640 /* Ignore locations off of edge */
641641 if (!in_bounds2(y, x)) continue;
642642
643- c_ptr = &grid_array[y][x];
643+ g_ptr = &grid_array[y][x];
644644
645645 /* We're following a scent trail */
646646 if (use_scent)
647647 {
648- int when = c_ptr->when;
648+ int when = g_ptr->when;
649649
650650 /* Accept younger scent */
651651 if (best > when) continue;
@@ -658,8 +658,8 @@ static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no
658658 int cost;
659659
660660 if (r_ptr->flags2 & (RF2_BASH_DOOR | RF2_OPEN_DOOR))
661- cost = c_ptr->dist;
662- else cost = c_ptr->cost;
661+ cost = g_ptr->dist;
662+ else cost = g_ptr->cost;
663663
664664 /* Accept louder sounds */
665665 if ((cost == 0) || (best < cost)) continue;
@@ -895,7 +895,7 @@ static bool find_safety(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
895895 POSITION *y_offsets;
896896 POSITION *x_offsets;
897897
898- grid_type *c_ptr;
898+ grid_type *g_ptr;
899899
900900 /* Start with adjacent locations, spread further */
901901 for (d = 1; d < 10; d++)
@@ -915,19 +915,19 @@ static bool find_safety(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
915915 /* Skip illegal locations */
916916 if (!in_bounds(y, x)) continue;
917917
918- c_ptr = &grid_array[y][x];
918+ g_ptr = &grid_array[y][x];
919919
920920 /* Skip locations in a wall */
921- if (!monster_can_cross_terrain(c_ptr->feat, &r_info[m_ptr->r_idx], (m_idx == p_ptr->riding) ? CEM_RIDING : 0)) continue;
921+ if (!monster_can_cross_terrain(g_ptr->feat, &r_info[m_ptr->r_idx], (m_idx == p_ptr->riding) ? CEM_RIDING : 0)) continue;
922922
923923 /* Check for "availability" (if monsters can flow) */
924924 if (!(m_ptr->mflag2 & MFLAG2_NOFLOW))
925925 {
926926 /* Ignore grids very far from the player */
927- if (c_ptr->dist == 0) continue;
927+ if (g_ptr->dist == 0) continue;
928928
929929 /* Ignore too-distant grids */
930- if (c_ptr->dist > grid_array[fy][fx].dist + 2 * d) continue;
930+ if (g_ptr->dist > grid_array[fy][fx].dist + 2 * d) continue;
931931 }
932932
933933 /* Check for absence of shot (more or less) */
@@ -1060,7 +1060,7 @@ static bool get_moves(MONSTER_IDX m_idx, DIRECTION *mm)
10601060 POSITION x2 = p_ptr->x;
10611061 bool done = FALSE;
10621062 bool will_run = mon_will_run(m_idx);
1063- grid_type *c_ptr;
1063+ grid_type *g_ptr;
10641064 bool no_flow = ((m_ptr->mflag2 & MFLAG2_NOFLOW) && (grid_array[m_ptr->fy][m_ptr->fx].cost > 2));
10651065 bool can_pass_wall = ((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall));
10661066
@@ -1104,10 +1104,10 @@ static bool get_moves(MONSTER_IDX m_idx, DIRECTION *mm)
11041104
11051105 if (!in_bounds2(yy, xx)) continue;
11061106
1107- c_ptr = &grid_array[yy][xx];
1107+ g_ptr = &grid_array[yy][xx];
11081108
11091109 /* Check grid */
1110- if (monster_can_cross_terrain(c_ptr->feat, r_ptr, 0))
1110+ if (monster_can_cross_terrain(g_ptr->feat, r_ptr, 0))
11111111 {
11121112 /* One more room grid */
11131113 room++;
@@ -2084,7 +2084,7 @@ void process_monster(MONSTER_IDX m_idx)
20842084
20852085 DIRECTION mm[8];
20862086
2087- grid_type *c_ptr;
2087+ grid_type *g_ptr;
20882088 feature_type *f_ptr;
20892089
20902090 monster_type *y_ptr;
@@ -2620,12 +2620,12 @@ void process_monster(MONSTER_IDX m_idx)
26202620 if (!in_bounds2(ny, nx)) continue;
26212621
26222622 /* Access that grid */
2623- c_ptr = &grid_array[ny][nx];
2624- f_ptr = &f_info[c_ptr->feat];
2625- can_cross = monster_can_cross_terrain(c_ptr->feat, r_ptr, is_riding_mon ? CEM_RIDING : 0);
2623+ g_ptr = &grid_array[ny][nx];
2624+ f_ptr = &f_info[g_ptr->feat];
2625+ can_cross = monster_can_cross_terrain(g_ptr->feat, r_ptr, is_riding_mon ? CEM_RIDING : 0);
26262626
26272627 /* Access that grid's contents */
2628- y_ptr = &m_list[c_ptr->m_idx];
2628+ y_ptr = &m_list[g_ptr->m_idx];
26292629
26302630 /* Hack -- player 'in' wall */
26312631 if (player_bold(ny, nx))
@@ -2634,7 +2634,7 @@ void process_monster(MONSTER_IDX m_idx)
26342634 }
26352635
26362636 /* Possibly a monster to attack */
2637- else if (c_ptr->m_idx)
2637+ else if (g_ptr->m_idx)
26382638 {
26392639 do_move = TRUE;
26402640 }
@@ -2669,7 +2669,7 @@ void process_monster(MONSTER_IDX m_idx)
26692669 }
26702670
26712671 /* Handle doors and secret doors */
2672- else if (is_closed_door(c_ptr->feat))
2672+ else if (is_closed_door(g_ptr->feat))
26732673 {
26742674 bool may_bash = TRUE;
26752675
@@ -2738,7 +2738,7 @@ void process_monster(MONSTER_IDX m_idx)
27382738 if (did_open_door || did_bash_door)
27392739 {
27402740 /* Break down the door */
2741- if (did_bash_door && ((randint0(100) < 50) || (feat_state(c_ptr->feat, FF_OPEN) == c_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS)))
2741+ if (did_bash_door && ((randint0(100) < 50) || (feat_state(g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS)))
27422742 {
27432743 cave_alter_feat(ny, nx, FF_BASH);
27442744
@@ -2759,7 +2759,7 @@ void process_monster(MONSTER_IDX m_idx)
27592759 cave_alter_feat(ny, nx, FF_OPEN);
27602760 }
27612761
2762- f_ptr = &f_info[c_ptr->feat];
2762+ f_ptr = &f_info[g_ptr->feat];
27632763
27642764 /* Handle viewable doors */
27652765 do_view = TRUE;
@@ -2767,7 +2767,7 @@ void process_monster(MONSTER_IDX m_idx)
27672767 }
27682768
27692769 /* Hack -- check for Glyph of Warding */
2770- if (do_move && is_glyph_grid(c_ptr) &&
2770+ if (do_move && is_glyph_grid(g_ptr) &&
27712771 !((r_ptr->flags1 & RF1_NEVER_BLOW) && player_bold(ny, nx)))
27722772 {
27732773 /* Assume no move allowed */
@@ -2777,17 +2777,17 @@ void process_monster(MONSTER_IDX m_idx)
27772777 if (!is_pet(m_ptr) && (randint1(BREAK_GLYPH) < r_ptr->level))
27782778 {
27792779 /* Describe observable breakage */
2780- if (c_ptr->info & CAVE_MARK)
2780+ if (g_ptr->info & CAVE_MARK)
27812781 {
27822782 msg_print(_("守りのルーンが壊れた!", "The rune of protection is broken!"));
27832783 }
27842784
27852785 /* Forget the rune */
2786- c_ptr->info &= ~(CAVE_MARK);
2786+ g_ptr->info &= ~(CAVE_MARK);
27872787
27882788 /* Break the rune */
2789- c_ptr->info &= ~(CAVE_OBJECT);
2790- c_ptr->mimic = 0;
2789+ g_ptr->info &= ~(CAVE_OBJECT);
2790+ g_ptr->mimic = 0;
27912791
27922792 /* Allow movement */
27932793 do_move = TRUE;
@@ -2795,7 +2795,7 @@ void process_monster(MONSTER_IDX m_idx)
27952795 note_spot(ny, nx);
27962796 }
27972797 }
2798- else if (do_move && is_explosive_rune_grid(c_ptr) &&
2798+ else if (do_move && is_explosive_rune_grid(g_ptr) &&
27992799 !((r_ptr->flags1 & RF1_NEVER_BLOW) && player_bold(ny, nx)))
28002800 {
28012801 /* Assume no move allowed */
@@ -2808,7 +2808,7 @@ void process_monster(MONSTER_IDX m_idx)
28082808 if (randint1(BREAK_MINOR_GLYPH) > r_ptr->level)
28092809 {
28102810 /* Describe observable breakage */
2811- if (c_ptr->info & CAVE_MARK)
2811+ if (g_ptr->info & CAVE_MARK)
28122812 {
28132813 msg_print(_("ルーンが爆発した!", "The rune explodes!"));
28142814 project(0, 2, ny, nx, 2 * (p_ptr->lev + damroll(7, 7)), GF_MANA, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
@@ -2820,11 +2820,11 @@ void process_monster(MONSTER_IDX m_idx)
28202820 }
28212821
28222822 /* Forget the rune */
2823- c_ptr->info &= ~(CAVE_MARK);
2823+ g_ptr->info &= ~(CAVE_MARK);
28242824
28252825 /* Break the rune */
2826- c_ptr->info &= ~(CAVE_OBJECT);
2827- c_ptr->mimic = 0;
2826+ g_ptr->info &= ~(CAVE_OBJECT);
2827+ g_ptr->mimic = 0;
28282828
28292829 note_spot(ny, nx);
28302830 lite_spot(ny, nx);
@@ -2879,7 +2879,7 @@ void process_monster(MONSTER_IDX m_idx)
28792879 }
28802880
28812881 /* A monster is in the way */
2882- if (do_move && c_ptr->m_idx)
2882+ if (do_move && g_ptr->m_idx)
28832883 {
28842884 monster_race *z_ptr = &r_info[y_ptr->r_idx];
28852885
@@ -2889,7 +2889,7 @@ void process_monster(MONSTER_IDX m_idx)
28892889 /* Attack 'enemies' */
28902890 if (((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW) &&
28912891 (r_ptr->mexp * r_ptr->level > z_ptr->mexp * z_ptr->level) &&
2892- can_cross && (c_ptr->m_idx != p_ptr->riding)) ||
2892+ can_cross && (g_ptr->m_idx != p_ptr->riding)) ||
28932893 are_enemies(m_ptr, y_ptr) || MON_CONFUSED(m_ptr))
28942894 {
28952895 if (!(r_ptr->flags1 & RF1_NEVER_BLOW))
@@ -2902,7 +2902,7 @@ void process_monster(MONSTER_IDX m_idx)
29022902 /* attack */
29032903 if (y_ptr->r_idx && (y_ptr->hp >= 0))
29042904 {
2905- if (monst_attack_monst(m_idx, c_ptr->m_idx)) return;
2905+ if (monst_attack_monst(m_idx, g_ptr->m_idx)) return;
29062906
29072907 /* In anti-melee dungeon, stupid or confused monster takes useless turn */
29082908 else if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
@@ -2921,7 +2921,7 @@ void process_monster(MONSTER_IDX m_idx)
29212921 /* Push past weaker monsters (unless leaving a wall) */
29222922 else if ((r_ptr->flags2 & RF2_MOVE_BODY) && !(r_ptr->flags1 & RF1_NEVER_MOVE) &&
29232923 (r_ptr->mexp > z_ptr->mexp) &&
2924- can_cross && (c_ptr->m_idx != p_ptr->riding) &&
2924+ can_cross && (g_ptr->m_idx != p_ptr->riding) &&
29252925 monster_can_cross_terrain(grid_array[m_ptr->fy][m_ptr->fx].feat, z_ptr, 0))
29262926 {
29272927 /* Allow movement */
@@ -2931,7 +2931,7 @@ void process_monster(MONSTER_IDX m_idx)
29312931 did_move_body = TRUE;
29322932
29332933 /* Wake up the moved monster */
2934- (void)set_monster_csleep(c_ptr->m_idx, 0);
2934+ (void)set_monster_csleep(g_ptr->m_idx, 0);
29352935
29362936 /* Message */
29372937 }
@@ -2964,7 +2964,7 @@ void process_monster(MONSTER_IDX m_idx)
29642964 return;
29652965 }
29662966
2967- f_ptr = &f_info[c_ptr->feat];
2967+ f_ptr = &f_info[g_ptr->feat];
29682968
29692969 /* Note changes to viewable region */
29702970 do_view = TRUE;
@@ -2973,7 +2973,7 @@ void process_monster(MONSTER_IDX m_idx)
29732973
29742974 if (must_alter_to_move && (r_ptr->flags7 & RF7_AQUATIC))
29752975 {
2976- if (!monster_can_cross_terrain(c_ptr->feat, r_ptr, is_riding_mon ? CEM_RIDING : 0))
2976+ if (!monster_can_cross_terrain(g_ptr->feat, r_ptr, is_riding_mon ? CEM_RIDING : 0))
29772977 {
29782978 /* Assume no move allowed */
29792979 do_move = FALSE;
@@ -3018,21 +3018,21 @@ void process_monster(MONSTER_IDX m_idx)
30183018 if (!is_riding_mon)
30193019 {
30203020 /* Hack -- Update the old location */
3021- grid_array[oy][ox].m_idx = c_ptr->m_idx;
3021+ grid_array[oy][ox].m_idx = g_ptr->m_idx;
30223022
30233023 /* Mega-Hack -- move the old monster, if any */
3024- if (c_ptr->m_idx)
3024+ if (g_ptr->m_idx)
30253025 {
30263026 /* Move the old monster */
30273027 y_ptr->fy = oy;
30283028 y_ptr->fx = ox;
30293029
30303030 /* Update the old monster */
3031- update_monster(c_ptr->m_idx, TRUE);
3031+ update_monster(g_ptr->m_idx, TRUE);
30323032 }
30333033
30343034 /* Hack -- Update the new location */
3035- c_ptr->m_idx = m_idx;
3035+ g_ptr->m_idx = m_idx;
30363036
30373037 /* Move the monster */
30383038 m_ptr->fy = ny;
@@ -3059,14 +3059,14 @@ void process_monster(MONSTER_IDX m_idx)
30593059 }
30603060
30613061 /* Take or Kill objects on the floor */
3062- if (c_ptr->o_idx && (r_ptr->flags2 & (RF2_TAKE_ITEM | RF2_KILL_ITEM)) &&
3062+ if (g_ptr->o_idx && (r_ptr->flags2 & (RF2_TAKE_ITEM | RF2_KILL_ITEM)) &&
30633063 (!is_pet(m_ptr) || ((p_ptr->pet_extra_flags & PF_PICKUP_ITEMS) && (r_ptr->flags2 & RF2_TAKE_ITEM))))
30643064 {
30653065 OBJECT_IDX this_o_idx, next_o_idx;
30663066 bool do_take = (r_ptr->flags2 & RF2_TAKE_ITEM) ? TRUE : FALSE;
30673067
30683068 /* Scan all objects in the grid */
3069- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
3069+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
30703070 {
30713071 BIT_FLAGS flgs[TR_FLAG_SIZE], flg2 = 0L, flg3 = 0L, flgr = 0L;
30723072 GAME_TEXT m_name[MAX_NLEN], o_name[MAX_NLEN];
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -2370,13 +2370,13 @@ bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 m
23702370 */
23712371 bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
23722372 {
2373- grid_type *c_ptr = &grid_array[y][x];
2373+ grid_type *g_ptr = &grid_array[y][x];
23742374
23752375 /* Player or other monster */
23762376 if (player_bold(y, x)) return FALSE;
2377- if (c_ptr->m_idx) return FALSE;
2377+ if (g_ptr->m_idx) return FALSE;
23782378
2379- return monster_can_cross_terrain(c_ptr->feat, r_ptr, mode);
2379+ return monster_can_cross_terrain(g_ptr->feat, r_ptr, mode);
23802380 }
23812381
23822382
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -311,16 +311,16 @@ void delete_monster_idx(MONSTER_IDX i)
311311 */
312312 void delete_monster(POSITION y, POSITION x)
313313 {
314- grid_type *c_ptr;
314+ grid_type *g_ptr;
315315
316316 /* Paranoia */
317317 if (!in_bounds(y, x)) return;
318318
319319 /* Check the grid */
320- c_ptr = &grid_array[y][x];
320+ g_ptr = &grid_array[y][x];
321321
322322 /* Delete the monster (if any) */
323- if (c_ptr->m_idx) delete_monster_idx(c_ptr->m_idx);
323+ if (g_ptr->m_idx) delete_monster_idx(g_ptr->m_idx);
324324 }
325325
326326
@@ -334,7 +334,7 @@ static void compact_monsters_aux(IDX i1, IDX i2)
334334 {
335335 POSITION y, x;
336336 int i;
337- grid_type *c_ptr;
337+ grid_type *g_ptr;
338338 monster_type *m_ptr;
339339 OBJECT_IDX this_o_idx, next_o_idx = 0;
340340
@@ -348,10 +348,10 @@ static void compact_monsters_aux(IDX i1, IDX i2)
348348 x = m_ptr->fx;
349349
350350 /* Cave grid */
351- c_ptr = &grid_array[y][x];
351+ g_ptr = &grid_array[y][x];
352352
353353 /* Update the grid_array */
354- c_ptr->m_idx = i2;
354+ g_ptr->m_idx = i2;
355355
356356 /* Repair objects being carried by monster */
357357 for (this_o_idx = m_ptr->hold_o_idx; this_o_idx; this_o_idx = next_o_idx)
@@ -2940,7 +2940,7 @@ byte get_mspeed(monster_race *r_ptr)
29402940 static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
29412941 {
29422942 /* Access the location */
2943- grid_type *c_ptr = &grid_array[y][x];
2943+ grid_type *g_ptr = &grid_array[y][x];
29442944 monster_type *m_ptr;
29452945 monster_race *r_ptr = &r_info[r_idx];
29462946 concptr name = (r_name + r_ptr->name);
@@ -3022,22 +3022,22 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
30223022 }
30233023 }
30243024
3025- if (is_glyph_grid(c_ptr))
3025+ if (is_glyph_grid(g_ptr))
30263026 {
30273027 if (randint1(BREAK_GLYPH) < (r_ptr->level+20))
30283028 {
30293029 /* Describe observable breakage */
3030- if (c_ptr->info & CAVE_MARK)
3030+ if (g_ptr->info & CAVE_MARK)
30313031 {
30323032 msg_print(_("守りのルーンが壊れた!", "The rune of protection is broken!"));
30333033 }
30343034
30353035 /* Forget the rune */
3036- c_ptr->info &= ~(CAVE_MARK);
3036+ g_ptr->info &= ~(CAVE_MARK);
30373037
30383038 /* Break the rune */
3039- c_ptr->info &= ~(CAVE_OBJECT);
3040- c_ptr->mimic = 0;
3039+ g_ptr->info &= ~(CAVE_OBJECT);
3040+ g_ptr->mimic = 0;
30413041
30423042 note_spot(y, x);
30433043 }
@@ -3049,15 +3049,15 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
30493049 if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL) || (r_ptr->level < 10)) mode &= ~PM_KAGE;
30503050
30513051 /* Make a new monster */
3052- c_ptr->m_idx = m_pop();
3053- hack_m_idx_ii = c_ptr->m_idx;
3052+ g_ptr->m_idx = m_pop();
3053+ hack_m_idx_ii = g_ptr->m_idx;
30543054
30553055 /* Mega-Hack -- catch "failure" */
3056- if (!c_ptr->m_idx) return (FALSE);
3056+ if (!g_ptr->m_idx) return (FALSE);
30573057
30583058
30593059 /* Get a new monster record */
3060- m_ptr = &m_list[c_ptr->m_idx];
3060+ m_ptr = &m_list[g_ptr->m_idx];
30613061
30623062 /* Save the race */
30633063 m_ptr->r_idx = r_idx;
@@ -3117,7 +3117,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
31173117
31183118 if (r_ptr->flags7 & RF7_CHAMELEON)
31193119 {
3120- choose_new_monster(c_ptr->m_idx, TRUE, 0);
3120+ choose_new_monster(g_ptr->m_idx, TRUE, 0);
31213121 r_ptr = &r_info[m_ptr->r_idx];
31223122 m_ptr->mflag2 |= MFLAG2_CHAMELEON;
31233123
@@ -3155,7 +3155,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
31553155 if ((mode & PM_ALLOW_SLEEP) && r_ptr->sleep && !ironman_nightmare)
31563156 {
31573157 int val = r_ptr->sleep;
3158- (void)set_monster_csleep(c_ptr->m_idx, (val * 2) + randint1(val * 10));
3158+ (void)set_monster_csleep(g_ptr->m_idx, (val * 2) + randint1(val * 10));
31593159 }
31603160
31613161 /* Assign maximal hitpoints */
@@ -3191,7 +3191,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
31913191 /* Extract the monster base speed */
31923192 m_ptr->mspeed = get_mspeed(r_ptr);
31933193
3194- if (mode & PM_HASTE) (void)set_monster_fast(c_ptr->m_idx, 100);
3194+ if (mode & PM_HASTE) (void)set_monster_fast(g_ptr->m_idx, 100);
31953195
31963196 /* Give a random starting energy */
31973197 if (!ironman_nightmare)
@@ -3215,7 +3215,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
32153215 }
32163216
32173217 /* Hack -- see "process_monsters()" */
3218- if (c_ptr->m_idx < hack_m_idx)
3218+ if (g_ptr->m_idx < hack_m_idx)
32193219 {
32203220 /* Monster is still being born */
32213221 m_ptr->mflag |= (MFLAG_BORN);
@@ -3226,7 +3226,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
32263226 p_ptr->update |= (PU_MON_LITE);
32273227 else if ((r_ptr->flags7 & RF7_HAS_LD_MASK) && !MON_CSLEEP(m_ptr))
32283228 p_ptr->update |= (PU_MON_LITE);
3229- update_monster(c_ptr->m_idx, TRUE);
3229+ update_monster(g_ptr->m_idx, TRUE);
32303230
32313231
32323232 /* Count the monsters on the level */
@@ -3284,13 +3284,13 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
32843284 }
32853285 }
32863286
3287- if (is_explosive_rune_grid(c_ptr))
3287+ if (is_explosive_rune_grid(g_ptr))
32883288 {
32893289 /* Break the ward */
32903290 if (randint1(BREAK_MINOR_GLYPH) > r_ptr->level)
32913291 {
32923292 /* Describe observable breakage */
3293- if (c_ptr->info & CAVE_MARK)
3293+ if (g_ptr->info & CAVE_MARK)
32943294 {
32953295 msg_print(_("ルーンが爆発した!", "The rune explodes!"));
32963296 project(0, 2, y, x, 2 * (p_ptr->lev + damroll(7, 7)), GF_MANA, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
@@ -3302,11 +3302,11 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
33023302 }
33033303
33043304 /* Forget the rune */
3305- c_ptr->info &= ~(CAVE_MARK);
3305+ g_ptr->info &= ~(CAVE_MARK);
33063306
33073307 /* Break the rune */
3308- c_ptr->info &= ~(CAVE_OBJECT);
3309- c_ptr->mimic = 0;
3308+ g_ptr->info &= ~(CAVE_OBJECT);
3309+ g_ptr->mimic = 0;
33103310
33113311 note_spot(y, x);
33123312 lite_spot(y, x);
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -404,7 +404,7 @@ bool raise_possible(monster_type *m_ptr)
404404 POSITION y = m_ptr->fy;
405405 POSITION x = m_ptr->fx;
406406 OBJECT_IDX this_o_idx, next_o_idx = 0;
407- grid_type *c_ptr;
407+ grid_type *g_ptr;
408408
409409 for (xx = x - 5; xx <= x + 5; xx++)
410410 {
@@ -414,9 +414,9 @@ bool raise_possible(monster_type *m_ptr)
414414 if (!los(y, x, yy, xx)) continue;
415415 if (!projectable(y, x, yy, xx)) continue;
416416
417- c_ptr = &grid_array[yy][xx];
417+ g_ptr = &grid_array[yy][xx];
418418 /* Scan the pile of objects */
419- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
419+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
420420 {
421421 object_type *o_ptr = &o_list[this_o_idx];
422422
@@ -1257,13 +1257,13 @@ static bool adjacent_grid_check(monster_type *m_ptr, POSITION *yp, POSITION *xp,
12571257 {
12581258 int next_x = *xp + tonari_x[tonari][i];
12591259 int next_y = *yp + tonari_y[tonari][i];
1260- grid_type *c_ptr;
1260+ grid_type *g_ptr;
12611261
12621262 /* Access the next grid */
1263- c_ptr = &grid_array[next_y][next_x];
1263+ g_ptr = &grid_array[next_y][next_x];
12641264
12651265 /* Skip this feature */
1266- if (!cave_have_flag_grid(c_ptr, f_flag)) continue;
1266+ if (!cave_have_flag_grid(g_ptr, f_flag)) continue;
12671267
12681268 if (path_check(m_ptr->fy, m_ptr->fx, next_y, next_x))
12691269 {
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -2281,22 +2281,22 @@ bool mutation_power_aux(int power)
22812281 case MUT1_BANISH:
22822282 {
22832283 POSITION x, y;
2284- grid_type *c_ptr;
2284+ grid_type *g_ptr;
22852285 monster_type *m_ptr;
22862286 monster_race *r_ptr;
22872287 if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
22882288 y = p_ptr->y + ddy[dir];
22892289 x = p_ptr->x + ddx[dir];
2290- c_ptr = &grid_array[y][x];
2290+ g_ptr = &grid_array[y][x];
22912291
2292- if (!c_ptr->m_idx)
2292+ if (!g_ptr->m_idx)
22932293 {
22942294 msg_print(_("邪悪な存在を感じとれません!", "You sense no evil there!"));
22952295
22962296 break;
22972297 }
22982298
2299- m_ptr = &m_list[c_ptr->m_idx];
2299+ m_ptr = &m_list[g_ptr->m_idx];
23002300 r_ptr = &r_info[m_ptr->r_idx];
23012301
23022302 if ((r_ptr->flags3 & RF3_EVIL) &&
@@ -2313,7 +2313,7 @@ bool mutation_power_aux(int power)
23132313 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
23142314 }
23152315 /* Delete the monster, rather than killing it. */
2316- delete_monster_idx(c_ptr->m_idx);
2316+ delete_monster_idx(g_ptr->m_idx);
23172317 msg_print(_("その邪悪なモンスターは硫黄臭い煙とともに消え去った!", "The evil creature vanishes in a puff of sulfurous smoke!"));
23182318
23192319 }
@@ -2328,12 +2328,12 @@ bool mutation_power_aux(int power)
23282328 case MUT1_COLD_TOUCH:
23292329 {
23302330 POSITION x, y;
2331- grid_type *c_ptr;
2331+ grid_type *g_ptr;
23322332 if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
23332333 y = p_ptr->y + ddy[dir];
23342334 x = p_ptr->x + ddx[dir];
2335- c_ptr = &grid_array[y][x];
2336- if (!c_ptr->m_idx)
2335+ g_ptr = &grid_array[y][x];
2336+ if (!g_ptr->m_idx)
23372337 {
23382338 msg_print(_("あなたは何もない場所で手を振った。", "You wave your hands in the air."));
23392339
--- a/src/object1.c
+++ b/src/object1.c
@@ -4368,12 +4368,12 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode)
43684368 {
43694369 int i;
43704370 OBJECT_IDX o_idx;
4371- grid_type *c_ptr = &grid_array[p_ptr->y][p_ptr->x];
4371+ grid_type *g_ptr = &grid_array[p_ptr->y][p_ptr->x];
43724372
43734373 if (command_wrk != (USE_FLOOR)) break;
43744374
43754375 /* Get the object being moved. */
4376- o_idx = c_ptr->o_idx;
4376+ o_idx = g_ptr->o_idx;
43774377
43784378 /* Only rotate a pile of two or more objects. */
43794379 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
@@ -4382,7 +4382,7 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode)
43824382 excise_object_idx(o_idx);
43834383
43844384 /* Find end of the list. */
4385- i = c_ptr->o_idx;
4385+ i = g_ptr->o_idx;
43864386 while (o_list[i].next_o_idx)
43874387 i = o_list[i].next_o_idx;
43884388
--- a/src/object2.c
+++ b/src/object2.c
@@ -123,15 +123,15 @@ void excise_object_idx(OBJECT_IDX o_idx)
123123 /* Dungeon */
124124 else
125125 {
126- grid_type *c_ptr;
126+ grid_type *g_ptr;
127127
128128 POSITION y = j_ptr->iy;
129129 POSITION x = j_ptr->ix;
130130
131- c_ptr = &grid_array[y][x];
131+ g_ptr = &grid_array[y][x];
132132
133133 /* Scan all objects in the grid */
134- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
134+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
135135 {
136136 object_type *o_ptr;
137137 o_ptr = &o_list[this_o_idx];
@@ -145,7 +145,7 @@ void excise_object_idx(OBJECT_IDX o_idx)
145145 if (prev_o_idx == 0)
146146 {
147147 /* Remove from list */
148- c_ptr->o_idx = next_o_idx;
148+ g_ptr->o_idx = next_o_idx;
149149 }
150150
151151 /* Real previous */
@@ -217,16 +217,16 @@ void delete_object_idx(OBJECT_IDX o_idx)
217217 */
218218 void delete_object(POSITION y, POSITION x)
219219 {
220- grid_type *c_ptr;
220+ grid_type *g_ptr;
221221 OBJECT_IDX this_o_idx, next_o_idx = 0;
222222
223223 /* Refuse "illegal" locations */
224224 if (!in_bounds(y, x)) return;
225225
226- c_ptr = &grid_array[y][x];
226+ g_ptr = &grid_array[y][x];
227227
228228 /* Scan all objects in the grid */
229- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
229+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
230230 {
231231 object_type *o_ptr;
232232 o_ptr = &o_list[this_o_idx];
@@ -240,7 +240,7 @@ void delete_object(POSITION y, POSITION x)
240240 }
241241
242242 /* Objects are gone */
243- c_ptr->o_idx = 0;
243+ g_ptr->o_idx = 0;
244244
245245 /* Visual update */
246246 lite_spot(y, x);
@@ -257,7 +257,7 @@ void delete_object(POSITION y, POSITION x)
257257 static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
258258 {
259259 OBJECT_IDX i;
260- grid_type *c_ptr;
260+ grid_type *g_ptr;
261261 object_type *o_ptr;
262262
263263 /* Do nothing */
@@ -306,13 +306,13 @@ static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
306306 x = o_ptr->ix;
307307
308308 /* Acquire grid */
309- c_ptr = &grid_array[y][x];
309+ g_ptr = &grid_array[y][x];
310310
311311 /* Repair grid */
312- if (c_ptr->o_idx == i1)
312+ if (g_ptr->o_idx == i1)
313313 {
314314 /* Repair */
315- c_ptr->o_idx = i2;
315+ g_ptr->o_idx = i2;
316316 }
317317 }
318318
@@ -442,7 +442,7 @@ void compact_objects(int size)
442442 * Delete all the items when player leaves the level
443443 * @note we do NOT visually reflect these (irrelevant) changes
444444 * @details
445- * Hack -- we clear the "c_ptr->o_idx" field for every grid,
445+ * Hack -- we clear the "g_ptr->o_idx" field for every grid,
446446 * and the "m_ptr->next_o_idx" field for every monster, since
447447 * we know we are clearing every object. Technically, we only
448448 * clear those fields for grids/monsters containing objects,
@@ -487,17 +487,17 @@ void wipe_o_list(void)
487487 /* Dungeon */
488488 else
489489 {
490- grid_type *c_ptr;
490+ grid_type *g_ptr;
491491
492492 /* Access location */
493493 POSITION y = o_ptr->iy;
494494 POSITION x = o_ptr->ix;
495495
496496 /* Access grid */
497- c_ptr = &grid_array[y][x];
497+ g_ptr = &grid_array[y][x];
498498
499499 /* Hack -- see above */
500- c_ptr->o_idx = 0;
500+ g_ptr->o_idx = 0;
501501 }
502502 object_wipe(o_ptr);
503503 }
@@ -4868,7 +4868,7 @@ void place_object(POSITION y, POSITION x, BIT_FLAGS mode)
48684868 OBJECT_IDX o_idx;
48694869
48704870 /* Acquire grid */
4871- grid_type *c_ptr = &grid_array[y][x];
4871+ grid_type *g_ptr = &grid_array[y][x];
48724872
48734873 object_type forge;
48744874 object_type *q_ptr;
@@ -4881,7 +4881,7 @@ void place_object(POSITION y, POSITION x, BIT_FLAGS mode)
48814881 if (!cave_drop_bold(y, x)) return;
48824882
48834883 /* Avoid stacking on other objects */
4884- if (c_ptr->o_idx) return;
4884+ if (g_ptr->o_idx) return;
48854885
48864886 q_ptr = &forge;
48874887 object_wipe(q_ptr);
@@ -4906,10 +4906,10 @@ void place_object(POSITION y, POSITION x, BIT_FLAGS mode)
49064906 o_ptr->ix = x;
49074907
49084908 /* Build a stack */
4909- o_ptr->next_o_idx = c_ptr->o_idx;
4909+ o_ptr->next_o_idx = g_ptr->o_idx;
49104910
49114911 /* Place the object */
4912- c_ptr->o_idx = o_idx;
4912+ g_ptr->o_idx = o_idx;
49134913
49144914 note_spot(y, x);
49154915
@@ -4982,7 +4982,7 @@ void place_gold(POSITION y, POSITION x)
49824982 OBJECT_IDX o_idx;
49834983
49844984 /* Acquire grid */
4985- grid_type *c_ptr = &grid_array[y][x];
4985+ grid_type *g_ptr = &grid_array[y][x];
49864986
49874987 object_type forge;
49884988 object_type *q_ptr;
@@ -4995,7 +4995,7 @@ void place_gold(POSITION y, POSITION x)
49954995 if (!cave_drop_bold(y, x)) return;
49964996
49974997 /* Avoid stacking on other objects */
4998- if (c_ptr->o_idx) return;
4998+ if (g_ptr->o_idx) return;
49994999
50005000 q_ptr = &forge;
50015001 object_wipe(q_ptr);
@@ -5020,10 +5020,10 @@ void place_gold(POSITION y, POSITION x)
50205020 o_ptr->ix = x;
50215021
50225022 /* Build a stack */
5023- o_ptr->next_o_idx = c_ptr->o_idx;
5023+ o_ptr->next_o_idx = g_ptr->o_idx;
50245024
50255025 /* Place the object */
5026- c_ptr->o_idx = o_idx;
5026+ g_ptr->o_idx = o_idx;
50275027
50285028 note_spot(y, x);
50295029
@@ -5066,7 +5066,7 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
50665066 OBJECT_IDX o_idx = 0;
50675067 OBJECT_IDX this_o_idx, next_o_idx = 0;
50685068
5069- grid_type *c_ptr;
5069+ grid_type *g_ptr;
50705070
50715071 GAME_TEXT o_name[MAX_NLEN];
50725072
@@ -5132,7 +5132,7 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
51325132 if (!projectable(y, x, ty, tx)) continue;
51335133
51345134 /* Obtain grid */
5135- c_ptr = &grid_array[ty][tx];
5135+ g_ptr = &grid_array[ty][tx];
51365136
51375137 /* Require floor space */
51385138 if (!cave_drop_bold(ty, tx)) continue;
@@ -5141,7 +5141,7 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
51415141 k = 0;
51425142
51435143 /* Scan objects in that grid */
5144- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
5144+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
51455145 {
51465146 object_type *o_ptr;
51475147 o_ptr = &o_list[this_o_idx];
@@ -5289,10 +5289,10 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
52895289 }
52905290
52915291
5292- c_ptr = &grid_array[by][bx];
5292+ g_ptr = &grid_array[by][bx];
52935293
52945294 /* Scan objects in that grid for combination */
5295- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
5295+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
52965296 {
52975297 object_type *o_ptr;
52985298 o_ptr = &o_list[this_o_idx];
@@ -5353,10 +5353,10 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
53535353 j_ptr->held_m_idx = 0;
53545354
53555355 /* Build a stack */
5356- j_ptr->next_o_idx = c_ptr->o_idx;
5356+ j_ptr->next_o_idx = g_ptr->o_idx;
53575357
53585358 /* Place the object */
5359- c_ptr->o_idx = o_idx;
5359+ g_ptr->o_idx = o_idx;
53605360
53615361 /* Success */
53625362 done = TRUE;
@@ -6699,7 +6699,7 @@ static int blow_damcalc(monster_type *m_ptr, monster_blow *blow_ptr)
66996699 bool process_warning(POSITION xx, POSITION yy)
67006700 {
67016701 POSITION mx, my;
6702- grid_type *c_ptr;
6702+ grid_type *g_ptr;
67036703 GAME_TEXT o_name[MAX_NLEN];
67046704
67056705 #define WARNING_AWARE_RANGE 12
@@ -6716,11 +6716,11 @@ bool process_warning(POSITION xx, POSITION yy)
67166716
67176717 if (!in_bounds(my, mx) || (distance(my, mx, yy, xx) > WARNING_AWARE_RANGE)) continue;
67186718
6719- c_ptr = &grid_array[my][mx];
6719+ g_ptr = &grid_array[my][mx];
67206720
6721- if (!c_ptr->m_idx) continue;
6721+ if (!g_ptr->m_idx) continue;
67226722
6723- m_ptr = &m_list[c_ptr->m_idx];
6723+ m_ptr = &m_list[g_ptr->m_idx];
67246724
67256725 if (MON_CSLEEP(m_ptr)) continue;
67266726 if (!is_hostile(m_ptr)) continue;
@@ -6736,36 +6736,36 @@ bool process_warning(POSITION xx, POSITION yy)
67366736
67376737 if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MAGIC))
67386738 {
6739- if (f4 & RF4_BA_CHAO) spell_damcalc_by_spellnum(MS_BALL_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
6740- if (f5 & RF5_BA_MANA) spell_damcalc_by_spellnum(MS_BALL_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
6741- if (f5 & RF5_BA_DARK) spell_damcalc_by_spellnum(MS_BALL_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
6742- if (f5 & RF5_BA_LITE) spell_damcalc_by_spellnum(MS_STARBURST, GF_LITE, c_ptr->m_idx, &dam_max0);
6743- if (f6 & RF6_HAND_DOOM) spell_damcalc_by_spellnum(MS_HAND_DOOM, GF_HAND_DOOM, c_ptr->m_idx, &dam_max0);
6744- if (f6 & RF6_PSY_SPEAR) spell_damcalc_by_spellnum(MS_PSY_SPEAR, GF_PSY_SPEAR, c_ptr->m_idx, &dam_max0);
6739+ if (f4 & RF4_BA_CHAO) spell_damcalc_by_spellnum(MS_BALL_CHAOS, GF_CHAOS, g_ptr->m_idx, &dam_max0);
6740+ if (f5 & RF5_BA_MANA) spell_damcalc_by_spellnum(MS_BALL_MANA, GF_MANA, g_ptr->m_idx, &dam_max0);
6741+ if (f5 & RF5_BA_DARK) spell_damcalc_by_spellnum(MS_BALL_DARK, GF_DARK, g_ptr->m_idx, &dam_max0);
6742+ if (f5 & RF5_BA_LITE) spell_damcalc_by_spellnum(MS_STARBURST, GF_LITE, g_ptr->m_idx, &dam_max0);
6743+ if (f6 & RF6_HAND_DOOM) spell_damcalc_by_spellnum(MS_HAND_DOOM, GF_HAND_DOOM, g_ptr->m_idx, &dam_max0);
6744+ if (f6 & RF6_PSY_SPEAR) spell_damcalc_by_spellnum(MS_PSY_SPEAR, GF_PSY_SPEAR, g_ptr->m_idx, &dam_max0);
67456745 }
6746- if (f4 & RF4_ROCKET) spell_damcalc_by_spellnum(MS_ROCKET, GF_ROCKET, c_ptr->m_idx, &dam_max0);
6747- if (f4 & RF4_BR_ACID) spell_damcalc_by_spellnum(MS_BR_ACID, GF_ACID, c_ptr->m_idx, &dam_max0);
6748- if (f4 & RF4_BR_ELEC) spell_damcalc_by_spellnum(MS_BR_ELEC, GF_ELEC, c_ptr->m_idx, &dam_max0);
6749- if (f4 & RF4_BR_FIRE) spell_damcalc_by_spellnum(MS_BR_FIRE, GF_FIRE, c_ptr->m_idx, &dam_max0);
6750- if (f4 & RF4_BR_COLD) spell_damcalc_by_spellnum(MS_BR_COLD, GF_COLD, c_ptr->m_idx, &dam_max0);
6751- if (f4 & RF4_BR_POIS) spell_damcalc_by_spellnum(MS_BR_POIS, GF_POIS, c_ptr->m_idx, &dam_max0);
6752- if (f4 & RF4_BR_NETH) spell_damcalc_by_spellnum(MS_BR_NETHER, GF_NETHER, c_ptr->m_idx, &dam_max0);
6753- if (f4 & RF4_BR_LITE) spell_damcalc_by_spellnum(MS_BR_LITE, GF_LITE, c_ptr->m_idx, &dam_max0);
6754- if (f4 & RF4_BR_DARK) spell_damcalc_by_spellnum(MS_BR_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
6755- if (f4 & RF4_BR_CONF) spell_damcalc_by_spellnum(MS_BR_CONF, GF_CONFUSION, c_ptr->m_idx, &dam_max0);
6756- if (f4 & RF4_BR_SOUN) spell_damcalc_by_spellnum(MS_BR_SOUND, GF_SOUND, c_ptr->m_idx, &dam_max0);
6757- if (f4 & RF4_BR_CHAO) spell_damcalc_by_spellnum(MS_BR_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
6758- if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(MS_BR_DISEN, GF_DISENCHANT, c_ptr->m_idx, &dam_max0);
6759- if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(MS_BR_NEXUS, GF_NEXUS, c_ptr->m_idx, &dam_max0);
6760- if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(MS_BR_TIME, GF_TIME, c_ptr->m_idx, &dam_max0);
6761- if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIAL, c_ptr->m_idx, &dam_max0);
6762- if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(MS_BR_GRAVITY, GF_GRAVITY, c_ptr->m_idx, &dam_max0);
6763- if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(MS_BR_SHARDS, GF_SHARDS, c_ptr->m_idx, &dam_max0);
6764- if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(MS_BR_PLASMA, GF_PLASMA, c_ptr->m_idx, &dam_max0);
6765- if (f4 & RF4_BR_WALL) spell_damcalc_by_spellnum(MS_BR_FORCE, GF_FORCE, c_ptr->m_idx, &dam_max0);
6766- if (f4 & RF4_BR_MANA) spell_damcalc_by_spellnum(MS_BR_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
6767- if (f4 & RF4_BR_NUKE) spell_damcalc_by_spellnum(MS_BR_NUKE, GF_NUKE, c_ptr->m_idx, &dam_max0);
6768- if (f4 & RF4_BR_DISI) spell_damcalc_by_spellnum(MS_BR_DISI, GF_DISINTEGRATE, c_ptr->m_idx, &dam_max0);
6746+ if (f4 & RF4_ROCKET) spell_damcalc_by_spellnum(MS_ROCKET, GF_ROCKET, g_ptr->m_idx, &dam_max0);
6747+ if (f4 & RF4_BR_ACID) spell_damcalc_by_spellnum(MS_BR_ACID, GF_ACID, g_ptr->m_idx, &dam_max0);
6748+ if (f4 & RF4_BR_ELEC) spell_damcalc_by_spellnum(MS_BR_ELEC, GF_ELEC, g_ptr->m_idx, &dam_max0);
6749+ if (f4 & RF4_BR_FIRE) spell_damcalc_by_spellnum(MS_BR_FIRE, GF_FIRE, g_ptr->m_idx, &dam_max0);
6750+ if (f4 & RF4_BR_COLD) spell_damcalc_by_spellnum(MS_BR_COLD, GF_COLD, g_ptr->m_idx, &dam_max0);
6751+ if (f4 & RF4_BR_POIS) spell_damcalc_by_spellnum(MS_BR_POIS, GF_POIS, g_ptr->m_idx, &dam_max0);
6752+ if (f4 & RF4_BR_NETH) spell_damcalc_by_spellnum(MS_BR_NETHER, GF_NETHER, g_ptr->m_idx, &dam_max0);
6753+ if (f4 & RF4_BR_LITE) spell_damcalc_by_spellnum(MS_BR_LITE, GF_LITE, g_ptr->m_idx, &dam_max0);
6754+ if (f4 & RF4_BR_DARK) spell_damcalc_by_spellnum(MS_BR_DARK, GF_DARK, g_ptr->m_idx, &dam_max0);
6755+ if (f4 & RF4_BR_CONF) spell_damcalc_by_spellnum(MS_BR_CONF, GF_CONFUSION, g_ptr->m_idx, &dam_max0);
6756+ if (f4 & RF4_BR_SOUN) spell_damcalc_by_spellnum(MS_BR_SOUND, GF_SOUND, g_ptr->m_idx, &dam_max0);
6757+ if (f4 & RF4_BR_CHAO) spell_damcalc_by_spellnum(MS_BR_CHAOS, GF_CHAOS, g_ptr->m_idx, &dam_max0);
6758+ if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(MS_BR_DISEN, GF_DISENCHANT, g_ptr->m_idx, &dam_max0);
6759+ if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(MS_BR_NEXUS, GF_NEXUS, g_ptr->m_idx, &dam_max0);
6760+ if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(MS_BR_TIME, GF_TIME, g_ptr->m_idx, &dam_max0);
6761+ if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIAL, g_ptr->m_idx, &dam_max0);
6762+ if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(MS_BR_GRAVITY, GF_GRAVITY, g_ptr->m_idx, &dam_max0);
6763+ if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(MS_BR_SHARDS, GF_SHARDS, g_ptr->m_idx, &dam_max0);
6764+ if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(MS_BR_PLASMA, GF_PLASMA, g_ptr->m_idx, &dam_max0);
6765+ if (f4 & RF4_BR_WALL) spell_damcalc_by_spellnum(MS_BR_FORCE, GF_FORCE, g_ptr->m_idx, &dam_max0);
6766+ if (f4 & RF4_BR_MANA) spell_damcalc_by_spellnum(MS_BR_MANA, GF_MANA, g_ptr->m_idx, &dam_max0);
6767+ if (f4 & RF4_BR_NUKE) spell_damcalc_by_spellnum(MS_BR_NUKE, GF_NUKE, g_ptr->m_idx, &dam_max0);
6768+ if (f4 & RF4_BR_DISI) spell_damcalc_by_spellnum(MS_BR_DISI, GF_DISINTEGRATE, g_ptr->m_idx, &dam_max0);
67696769 }
67706770
67716771 /* Monster melee attacks */
@@ -6814,9 +6814,9 @@ bool process_warning(POSITION xx, POSITION yy)
68146814 }
68156815 else old_damage = old_damage / 2;
68166816
6817- c_ptr = &grid_array[yy][xx];
6818- if (((!easy_disarm && is_trap(c_ptr->feat))
6819- || (c_ptr->mimic && is_trap(c_ptr->feat))) && !one_in_(13))
6817+ g_ptr = &grid_array[yy][xx];
6818+ if (((!easy_disarm && is_trap(g_ptr->feat))
6819+ || (g_ptr->mimic && is_trap(g_ptr->feat))) && !one_in_(13))
68206820 {
68216821 object_type *o_ptr = choose_warning_item();
68226822
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -360,11 +360,11 @@ HIT_POINT tot_dam_aux(object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, B
360360 static void discover_hidden_things(POSITION y, POSITION x)
361361 {
362362 OBJECT_IDX this_o_idx, next_o_idx = 0;
363- grid_type *c_ptr;
364- c_ptr = &grid_array[y][x];
363+ grid_type *g_ptr;
364+ g_ptr = &grid_array[y][x];
365365
366366 /* Invisible trap */
367- if (c_ptr->mimic && is_trap(c_ptr->feat))
367+ if (g_ptr->mimic && is_trap(g_ptr->feat))
368368 {
369369 /* Pick a trap */
370370 disclose_grid(y, x);
@@ -375,7 +375,7 @@ static void discover_hidden_things(POSITION y, POSITION x)
375375 }
376376
377377 /* Secret door */
378- if (is_hidden_door(c_ptr))
378+ if (is_hidden_door(g_ptr))
379379 {
380380 msg_print(_("隠しドアを発見した。", "You have found a secret door."));
381381
@@ -386,7 +386,7 @@ static void discover_hidden_things(POSITION y, POSITION x)
386386 }
387387
388388 /* Scan all objects in the grid */
389- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
389+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
390390 {
391391 object_type *o_ptr;
392392 o_ptr = &o_list[this_o_idx];
@@ -545,7 +545,7 @@ void py_pickup_aux(OBJECT_IDX o_idx)
545545 */
546546 void carry(bool pickup)
547547 {
548- grid_type *c_ptr = &grid_array[p_ptr->y][p_ptr->x];
548+ grid_type *g_ptr = &grid_array[p_ptr->y][p_ptr->x];
549549
550550 OBJECT_IDX this_o_idx, next_o_idx = 0;
551551
@@ -560,7 +560,7 @@ void carry(bool pickup)
560560 handle_stuff();
561561
562562 /* Automatically pickup/destroy/inscribe items */
563- autopick_pickup_items(c_ptr);
563+ autopick_pickup_items(g_ptr);
564564
565565 if (easy_floor)
566566 {
@@ -569,7 +569,7 @@ void carry(bool pickup)
569569 }
570570
571571 /* Scan the pile of objects */
572- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
572+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
573573 {
574574 object_type *o_ptr;
575575 o_ptr = &o_list[this_o_idx];
@@ -825,15 +825,15 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
825825 {
826826 POSITION oy = p_ptr->y;
827827 POSITION ox = p_ptr->x;
828- grid_type *c_ptr = &grid_array[ny][nx];
828+ grid_type *g_ptr = &grid_array[ny][nx];
829829 grid_type *oc_ptr = &grid_array[oy][ox];
830- feature_type *f_ptr = &f_info[c_ptr->feat];
830+ feature_type *f_ptr = &f_info[g_ptr->feat];
831831 feature_type *of_ptr = &f_info[oc_ptr->feat];
832832
833833 if (!(mpe_mode & MPE_STAYING))
834834 {
835835 MONSTER_IDX om_idx = oc_ptr->m_idx;
836- MONSTER_IDX nm_idx = c_ptr->m_idx;
836+ MONSTER_IDX nm_idx = g_ptr->m_idx;
837837
838838 p_ptr->y = ny;
839839 p_ptr->x = nx;
@@ -842,7 +842,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
842842 if (!(mpe_mode & MPE_DONT_SWAP_MON))
843843 {
844844 /* Swap two monsters */
845- c_ptr->m_idx = om_idx;
845+ g_ptr->m_idx = om_idx;
846846 oc_ptr->m_idx = nm_idx;
847847
848848 if (om_idx > 0) /* Monster on old spot (or p_ptr->riding) */
@@ -880,7 +880,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
880880 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
881881
882882 /* Remove "unsafe" flag */
883- if ((!p_ptr->blind && !no_lite()) || !is_trap(c_ptr->feat)) c_ptr->info &= ~(CAVE_UNSAFE);
883+ if ((!p_ptr->blind && !no_lite()) || !is_trap(g_ptr->feat)) g_ptr->info &= ~(CAVE_UNSAFE);
884884
885885 /* For get everything when requested hehe I'm *NASTY* */
886886 if (dun_level && (d_info[p_ptr->dungeon_idx].flags1 & DF1_FORGET)) wiz_dark();
@@ -888,7 +888,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
888888
889889 if (p_ptr->pclass == CLASS_NINJA)
890890 {
891- if (c_ptr->info & (CAVE_GLOW)) set_superstealth(FALSE);
891+ if (g_ptr->info & (CAVE_GLOW)) set_superstealth(FALSE);
892892 else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
893893 }
894894
@@ -977,7 +977,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
977977
978978 leave_quest_check();
979979
980- p_ptr->inside_quest = c_ptr->special;
980+ p_ptr->inside_quest = g_ptr->special;
981981 dun_level = 0;
982982 p_ptr->oldpx = 0;
983983 p_ptr->oldpy = 0;
@@ -991,7 +991,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
991991 disturb(FALSE, TRUE);
992992
993993 /* Hidden trap */
994- if (c_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET))
994+ if (g_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET))
995995 {
996996 msg_print(_("トラップだ!", "You found a trap!"));
997997
@@ -1007,13 +1007,13 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
10071007
10081008 /* Warn when leaving trap detected region */
10091009 if (!(mpe_mode & MPE_STAYING) && (disturb_trap_detect || alert_trap_detect)
1010- && p_ptr->dtrap && !(c_ptr->info & CAVE_IN_DETECT))
1010+ && p_ptr->dtrap && !(g_ptr->info & CAVE_IN_DETECT))
10111011 {
10121012 /* No duplicate warning */
10131013 p_ptr->dtrap = FALSE;
10141014
10151015 /* You are just on the edge */
1016- if (!(c_ptr->info & CAVE_UNSAFE))
1016+ if (!(g_ptr->info & CAVE_UNSAFE))
10171017 {
10181018 if (alert_trap_detect)
10191019 {
@@ -1104,9 +1104,9 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
11041104 POSITION x = p_ptr->x + ddx[dir];
11051105
11061106 /* Examine the destination */
1107- grid_type *c_ptr = &grid_array[y][x];
1107+ grid_type *g_ptr = &grid_array[y][x];
11081108
1109- feature_type *f_ptr = &f_info[c_ptr->feat];
1109+ feature_type *f_ptr = &f_info[g_ptr->feat];
11101110
11111111 monster_type *m_ptr;
11121112
@@ -1115,7 +1115,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
11151115
11161116 GAME_TEXT m_name[MAX_NLEN];
11171117
1118- bool p_can_enter = player_can_enter(c_ptr->feat, CEM_P_CAN_ENTER_PATTERN);
1118+ bool p_can_enter = player_can_enter(g_ptr->feat, CEM_P_CAN_ENTER_PATTERN);
11191119 bool p_can_kill_walls = FALSE;
11201120 bool stormbringer = FALSE;
11211121
@@ -1128,7 +1128,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
11281128 (y == 0) || (y == MAX_HGT - 1)))
11291129 {
11301130 /* Can the player enter the grid? */
1131- if (c_ptr->mimic && player_can_enter(c_ptr->mimic, 0))
1131+ if (g_ptr->mimic && player_can_enter(g_ptr->mimic, 0))
11321132 {
11331133 /* Hack: move to new area */
11341134 if ((y == 0) && (x == 0))
@@ -1210,7 +1210,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
12101210 p_can_enter = FALSE;
12111211 }
12121212
1213- m_ptr = &m_list[c_ptr->m_idx];
1213+ m_ptr = &m_list[g_ptr->m_idx];
12141214
12151215 if (inventory[INVEN_RARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
12161216 if (inventory[INVEN_LARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
@@ -1222,7 +1222,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
12221222 !have_flag(f_ptr->flags, FF_PERMANENT);
12231223
12241224 /* Hack -- attack monsters */
1225- if (c_ptr->m_idx && (m_ptr->ml || p_can_enter || p_can_kill_walls))
1225+ if (g_ptr->m_idx && (m_ptr->ml || p_can_enter || p_can_kill_walls))
12261226 {
12271227 monster_race *r_ptr = &r_info[m_ptr->r_idx];
12281228
@@ -1233,7 +1233,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
12331233 pattern_seq(p_ptr->y, p_ptr->x, y, x) && (p_can_enter || p_can_kill_walls))
12341234 {
12351235 /* Disturb the monster */
1236- (void)set_monster_csleep(c_ptr->m_idx, 0);
1236+ (void)set_monster_csleep(g_ptr->m_idx, 0);
12371237
12381238 /* Extract monster name (or "it") */
12391239 monster_desc(m_name, m_ptr, 0);
@@ -1244,7 +1244,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
12441244 if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
12451245
12461246 /* Track a new monster */
1247- health_track(c_ptr->m_idx);
1247+ health_track(g_ptr->m_idx);
12481248 }
12491249
12501250 /* displace? */
@@ -1307,7 +1307,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
13071307 !(riding_r_ptr->flags7 & RF7_AQUATIC) &&
13081308 (have_flag(f_ptr->flags, FF_DEEP) || (riding_r_ptr->flags2 & RF2_AURA_FIRE)))
13091309 {
1310- msg_format(_("%sの上に行けない。", "Can't swim."), f_name + f_info[get_feat_mimic(c_ptr)].name);
1310+ msg_format(_("%sの上に行けない。", "Can't swim."), f_name + f_info[get_feat_mimic(g_ptr)].name);
13111311 free_turn(p_ptr);
13121312 oktomove = FALSE;
13131313 disturb(FALSE, TRUE);
@@ -1321,7 +1321,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
13211321 }
13221322 else if (have_flag(f_ptr->flags, FF_LAVA) && !(riding_r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK))
13231323 {
1324- msg_format(_("%sの上に行けない。", "Too hot to go through."), f_name + f_info[get_feat_mimic(c_ptr)].name);
1324+ msg_format(_("%sの上に行けない。", "Too hot to go through."), f_name + f_info[get_feat_mimic(g_ptr)].name);
13251325 free_turn(p_ptr);
13261326 oktomove = FALSE;
13271327 disturb(FALSE, TRUE);
@@ -1343,7 +1343,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
13431343
13441344 else if (!have_flag(f_ptr->flags, FF_MOVE) && have_flag(f_ptr->flags, FF_CAN_FLY) && !p_ptr->levitation)
13451345 {
1346- msg_format(_("空を飛ばないと%sの上には行けない。", "You need to fly to go through the %s."), f_name + f_info[get_feat_mimic(c_ptr)].name);
1346+ msg_format(_("空を飛ばないと%sの上には行けない。", "You need to fly to go through the %s."), f_name + f_info[get_feat_mimic(g_ptr)].name);
13471347 free_turn(p_ptr);
13481348 running = 0;
13491349 oktomove = FALSE;
@@ -1361,9 +1361,9 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
13611361
13621362
13631363 /* Disarm a visible trap */
1364- else if ((do_pickup != easy_disarm) && have_flag(f_ptr->flags, FF_DISARM) && !c_ptr->mimic)
1364+ else if ((do_pickup != easy_disarm) && have_flag(f_ptr->flags, FF_DISARM) && !g_ptr->mimic)
13651365 {
1366- if (!trap_can_be_ignored(c_ptr->feat))
1366+ if (!trap_can_be_ignored(g_ptr->feat))
13671367 {
13681368 (void)do_cmd_disarm_aux(y, x, dir);
13691369 return;
@@ -1375,17 +1375,17 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
13751375 else if (!p_can_enter && !p_can_kill_walls)
13761376 {
13771377 /* Feature code (applying "mimic" field) */
1378- FEAT_IDX feat = get_feat_mimic(c_ptr);
1378+ FEAT_IDX feat = get_feat_mimic(g_ptr);
13791379 feature_type *mimic_f_ptr = &f_info[feat];
13801380 concptr name = f_name + mimic_f_ptr->name;
13811381
13821382 oktomove = FALSE;
13831383
13841384 /* Notice things in the dark */
1385- if (!(c_ptr->info & CAVE_MARK) && !player_can_see_bold(y, x))
1385+ if (!(g_ptr->info & CAVE_MARK) && !player_can_see_bold(y, x))
13861386 {
13871387 /* Boundary floor mimic */
1388- if (boundary_floor(c_ptr, f_ptr, mimic_f_ptr))
1388+ if (boundary_floor(g_ptr, f_ptr, mimic_f_ptr))
13891389 {
13901390 msg_print(_("それ以上先には進めないようだ。", "You feel you cannot go any more."));
13911391 }
@@ -1400,7 +1400,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
14001400 is_a_vowel(name[0]) ? "an" : "a", name);
14011401 #endif
14021402
1403- c_ptr->info |= (CAVE_MARK);
1403+ g_ptr->info |= (CAVE_MARK);
14041404 lite_spot(y, x);
14051405 }
14061406 }
@@ -1409,7 +1409,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
14091409 else
14101410 {
14111411 /* Boundary floor mimic */
1412- if (boundary_floor(c_ptr, f_ptr, mimic_f_ptr))
1412+ if (boundary_floor(g_ptr, f_ptr, mimic_f_ptr))
14131413 {
14141414 msg_print(_("それ以上先には進めない。", "You cannot go any more."));
14151415 if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
@@ -1441,7 +1441,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
14411441
14421442 disturb(FALSE, TRUE);
14431443
1444- if (!boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) sound(SOUND_HITWALL);
1444+ if (!boundary_floor(g_ptr, f_ptr, mimic_f_ptr)) sound(SOUND_HITWALL);
14451445 }
14461446
14471447 /* Normal movement */
@@ -1518,7 +1518,7 @@ static bool ignore_avoid_run;
15181518 */
15191519 static bool see_wall(DIRECTION dir, POSITION y, POSITION x)
15201520 {
1521- grid_type *c_ptr;
1521+ grid_type *g_ptr;
15221522
15231523 /* Get the new location */
15241524 y += ddy[dir];
@@ -1528,13 +1528,13 @@ static bool see_wall(DIRECTION dir, POSITION y, POSITION x)
15281528 if (!in_bounds2(y, x)) return (FALSE);
15291529
15301530 /* Access grid */
1531- c_ptr = &grid_array[y][x];
1531+ g_ptr = &grid_array[y][x];
15321532
15331533 /* Must be known to the player */
1534- if (c_ptr->info & (CAVE_MARK))
1534+ if (g_ptr->info & (CAVE_MARK))
15351535 {
15361536 /* Feature code (applying "mimic" field) */
1537- s16b feat = get_feat_mimic(c_ptr);
1537+ s16b feat = get_feat_mimic(g_ptr);
15381538 feature_type *f_ptr = &f_info[feat];
15391539
15401540 /* Wall grids are known walls */
@@ -1733,7 +1733,7 @@ static bool run_test(void)
17331733 int row, col;
17341734 int i, max, inv;
17351735 int option = 0, option2 = 0;
1736- grid_type *c_ptr;
1736+ grid_type *g_ptr;
17371737 FEAT_IDX feat;
17381738 feature_type *f_ptr;
17391739
@@ -1780,23 +1780,23 @@ static bool run_test(void)
17801780 col = p_ptr->x + ddx[new_dir];
17811781
17821782 /* Access grid */
1783- c_ptr = &grid_array[row][col];
1783+ g_ptr = &grid_array[row][col];
17841784
17851785 /* Feature code (applying "mimic" field) */
1786- feat = get_feat_mimic(c_ptr);
1786+ feat = get_feat_mimic(g_ptr);
17871787 f_ptr = &f_info[feat];
17881788
17891789 /* Visible monsters abort running */
1790- if (c_ptr->m_idx)
1790+ if (g_ptr->m_idx)
17911791 {
1792- monster_type *m_ptr = &m_list[c_ptr->m_idx];
1792+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
17931793
17941794 /* Visible monster */
17951795 if (m_ptr->ml) return (TRUE);
17961796 }
17971797
17981798 /* Visible objects abort running */
1799- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
1799+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
18001800 {
18011801 object_type *o_ptr;
18021802 o_ptr = &o_list[this_o_idx];
@@ -1812,7 +1812,7 @@ static bool run_test(void)
18121812 inv = TRUE;
18131813
18141814 /* Check memorized grids */
1815- if (c_ptr->info & (CAVE_MARK))
1815+ if (g_ptr->info & (CAVE_MARK))
18161816 {
18171817 bool notice = have_flag(f_ptr->flags, FF_NOTICE);
18181818
@@ -2127,7 +2127,7 @@ static DIRECTION travel_test(DIRECTION prev_dir)
21272127 {
21282128 DIRECTION new_dir = 0;
21292129 int i, max;
2130- const grid_type *c_ptr;
2130+ const grid_type *g_ptr;
21312131 int cost;
21322132
21332133 /* Cannot travel when blind */
@@ -2174,12 +2174,12 @@ static DIRECTION travel_test(DIRECTION prev_dir)
21742174 POSITION col = p_ptr->x + ddx[dir];
21752175
21762176 /* Access grid */
2177- c_ptr = &grid_array[row][col];
2177+ g_ptr = &grid_array[row][col];
21782178
21792179 /* Visible monsters abort running */
2180- if (c_ptr->m_idx)
2180+ if (g_ptr->m_idx)
21812181 {
2182- monster_type *m_ptr = &m_list[c_ptr->m_idx];
2182+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
21832183
21842184 /* Visible monster */
21852185 if (m_ptr->ml) return (0);
@@ -2204,13 +2204,13 @@ static DIRECTION travel_test(DIRECTION prev_dir)
22042204 if (!new_dir) return (0);
22052205
22062206 /* Access newly move grid */
2207- c_ptr = &grid_array[p_ptr->y+ddy[new_dir]][p_ptr->x+ddx[new_dir]];
2207+ g_ptr = &grid_array[p_ptr->y+ddy[new_dir]][p_ptr->x+ddx[new_dir]];
22082208
22092209 /* Close door abort traveling */
2210- if (!easy_open && is_closed_door(c_ptr->feat)) return (0);
2210+ if (!easy_open && is_closed_door(g_ptr->feat)) return (0);
22112211
22122212 /* Visible and unignorable trap abort tarveling */
2213- if (!c_ptr->mimic && !trap_can_be_ignored(c_ptr->feat)) return (0);
2213+ if (!g_ptr->mimic && !trap_can_be_ignored(g_ptr->feat)) return (0);
22142214
22152215 /* Move new grid */
22162216 return (new_dir);
--- a/src/realm-hissatsu.c
+++ b/src/realm-hissatsu.c
@@ -512,7 +512,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
512512 {
513513 POSITION y = 0, x = 0;
514514
515- grid_type *c_ptr;
515+ grid_type *g_ptr;
516516 monster_type *m_ptr;
517517
518518 if (p_ptr->cut < 300)
@@ -524,11 +524,11 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
524524 {
525525 y = p_ptr->y + ddy_ddd[dir];
526526 x = p_ptr->x + ddx_ddd[dir];
527- c_ptr = &grid_array[y][x];
528- m_ptr = &m_list[c_ptr->m_idx];
527+ g_ptr = &grid_array[y][x];
528+ m_ptr = &m_list[g_ptr->m_idx];
529529
530530 /* Hack -- attack monsters */
531- if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
531+ if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
532532 {
533533 if (!monster_living(m_ptr->r_idx))
534534 {
@@ -634,14 +634,14 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
634634 POSITION y, x;
635635 POSITION ny, nx;
636636 MONSTER_IDX m_idx;
637- grid_type *c_ptr;
637+ grid_type *g_ptr;
638638 monster_type *m_ptr;
639639
640640 y = p_ptr->y + ddy[dir];
641641 x = p_ptr->x + ddx[dir];
642- c_ptr = &grid_array[y][x];
642+ g_ptr = &grid_array[y][x];
643643
644- if (c_ptr->m_idx)
644+ if (g_ptr->m_idx)
645645 py_attack(y, x, HISSATSU_3DAN);
646646 else
647647 {
@@ -655,11 +655,11 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
655655 }
656656
657657 /* Monster is dead? */
658- if (!c_ptr->m_idx) break;
658+ if (!g_ptr->m_idx) break;
659659
660660 ny = y + ddy[dir];
661661 nx = x + ddx[dir];
662- m_idx = c_ptr->m_idx;
662+ m_idx = g_ptr->m_idx;
663663 m_ptr = &m_list[m_idx];
664664
665665 /* Monster cannot move back? */
@@ -670,7 +670,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
670670 continue;
671671 }
672672
673- c_ptr->m_idx = 0;
673+ g_ptr->m_idx = 0;
674674 grid_array[ny][nx].m_idx = m_idx;
675675 m_ptr->fy = ny;
676676 m_ptr->fx = nx;
@@ -684,7 +684,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
684684 lite_spot(ny, nx);
685685
686686 /* Player can move forward? */
687- if (player_can_enter(c_ptr->feat, 0))
687+ if (player_can_enter(g_ptr->feat, 0))
688688 {
689689 if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
690690 }
--- a/src/rooms-normal.c
+++ b/src/rooms-normal.c
@@ -16,7 +16,7 @@ bool build_type1(void)
1616
1717 bool light;
1818
19- grid_type *c_ptr;
19+ grid_type *g_ptr;
2020
2121 bool curtain = (d_info[p_ptr->dungeon_idx].flags1 & DF1_CURTAIN) &&
2222 one_in_((d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_CAVE) ? 48 : 512);
@@ -62,27 +62,27 @@ bool build_type1(void)
6262 {
6363 for (x = x1 - 1; x <= x2 + 1; x++)
6464 {
65- c_ptr = &grid_array[y][x];
66- place_floor_grid(c_ptr);
67- c_ptr->info |= (CAVE_ROOM);
68- if (light) c_ptr->info |= (CAVE_GLOW);
65+ g_ptr = &grid_array[y][x];
66+ place_floor_grid(g_ptr);
67+ g_ptr->info |= (CAVE_ROOM);
68+ if (light) g_ptr->info |= (CAVE_GLOW);
6969 }
7070 }
7171
7272 /* Walls around the room */
7373 for (y = y1 - 1; y <= y2 + 1; y++)
7474 {
75- c_ptr = &grid_array[y][x1 - 1];
76- place_outer_grid(c_ptr);
77- c_ptr = &grid_array[y][x2 + 1];
78- place_outer_grid(c_ptr);
75+ g_ptr = &grid_array[y][x1 - 1];
76+ place_outer_grid(g_ptr);
77+ g_ptr = &grid_array[y][x2 + 1];
78+ place_outer_grid(g_ptr);
7979 }
8080 for (x = x1 - 1; x <= x2 + 1; x++)
8181 {
82- c_ptr = &grid_array[y1 - 1][x];
83- place_outer_grid(c_ptr);
84- c_ptr = &grid_array[y2 + 1][x];
85- place_outer_grid(c_ptr);
82+ g_ptr = &grid_array[y1 - 1][x];
83+ place_outer_grid(g_ptr);
84+ g_ptr = &grid_array[y2 + 1][x];
85+ place_outer_grid(g_ptr);
8686 }
8787
8888
@@ -91,21 +91,21 @@ bool build_type1(void)
9191 {
9292 for (y = y1; y <= y2; y++)
9393 {
94- c_ptr = &grid_array[y][x1];
95- c_ptr->feat = feat_door[DOOR_CURTAIN].closed;
96- c_ptr->info &= ~(CAVE_MASK);
97- c_ptr = &grid_array[y][x2];
98- c_ptr->feat = feat_door[DOOR_CURTAIN].closed;
99- c_ptr->info &= ~(CAVE_MASK);
94+ g_ptr = &grid_array[y][x1];
95+ g_ptr->feat = feat_door[DOOR_CURTAIN].closed;
96+ g_ptr->info &= ~(CAVE_MASK);
97+ g_ptr = &grid_array[y][x2];
98+ g_ptr->feat = feat_door[DOOR_CURTAIN].closed;
99+ g_ptr->info &= ~(CAVE_MASK);
100100 }
101101 for (x = x1; x <= x2; x++)
102102 {
103- c_ptr = &grid_array[y1][x];
104- c_ptr->feat = feat_door[DOOR_CURTAIN].closed;
105- c_ptr->info &= ~(CAVE_MASK);
106- c_ptr = &grid_array[y2][x];
107- c_ptr->feat = feat_door[DOOR_CURTAIN].closed;
108- c_ptr->info &= ~(CAVE_MASK);
103+ g_ptr = &grid_array[y1][x];
104+ g_ptr->feat = feat_door[DOOR_CURTAIN].closed;
105+ g_ptr->info &= ~(CAVE_MASK);
106+ g_ptr = &grid_array[y2][x];
107+ g_ptr->feat = feat_door[DOOR_CURTAIN].closed;
108+ g_ptr->info &= ~(CAVE_MASK);
109109 }
110110 }
111111
@@ -117,8 +117,8 @@ bool build_type1(void)
117117 {
118118 for (x = x1; x <= x2; x += 2)
119119 {
120- c_ptr = &grid_array[y][x];
121- place_inner_grid(c_ptr);
120+ g_ptr = &grid_array[y][x];
121+ place_inner_grid(g_ptr);
122122 }
123123 }
124124 }
@@ -128,17 +128,17 @@ bool build_type1(void)
128128 {
129129 if ((y1 + 4 < y2) && (x1 + 4 < x2))
130130 {
131- c_ptr = &grid_array[y1 + 1][x1 + 1];
132- place_inner_grid(c_ptr);
131+ g_ptr = &grid_array[y1 + 1][x1 + 1];
132+ place_inner_grid(g_ptr);
133133
134- c_ptr = &grid_array[y1 + 1][x2 - 1];
135- place_inner_grid(c_ptr);
134+ g_ptr = &grid_array[y1 + 1][x2 - 1];
135+ place_inner_grid(g_ptr);
136136
137- c_ptr = &grid_array[y2 - 1][x1 + 1];
138- place_inner_grid(c_ptr);
137+ g_ptr = &grid_array[y2 - 1][x1 + 1];
138+ place_inner_grid(g_ptr);
139139
140- c_ptr = &grid_array[y2 - 1][x2 - 1];
141- place_inner_grid(c_ptr);
140+ g_ptr = &grid_array[y2 - 1][x2 - 1];
141+ place_inner_grid(g_ptr);
142142 }
143143 }
144144
@@ -147,17 +147,17 @@ bool build_type1(void)
147147 {
148148 for (y = y1 + 2; y <= y2 - 2; y += 2)
149149 {
150- c_ptr = &grid_array[y][x1];
151- place_inner_grid(c_ptr);
152- c_ptr = &grid_array[y][x2];
153- place_inner_grid(c_ptr);
150+ g_ptr = &grid_array[y][x1];
151+ place_inner_grid(g_ptr);
152+ g_ptr = &grid_array[y][x2];
153+ place_inner_grid(g_ptr);
154154 }
155155 for (x = x1 + 2; x <= x2 - 2; x += 2)
156156 {
157- c_ptr = &grid_array[y1][x];
158- place_inner_grid(c_ptr);
159- c_ptr = &grid_array[y2][x];
160- place_inner_grid(c_ptr);
157+ g_ptr = &grid_array[y1][x];
158+ place_inner_grid(g_ptr);
159+ g_ptr = &grid_array[y2][x];
160+ place_inner_grid(g_ptr);
161161 }
162162 }
163163 /* Hack -- Occasional divided room */
@@ -210,7 +210,7 @@ bool build_type2(void)
210210 POSITION y1a, x1a, y2a, x2a;
211211 POSITION y1b, x1b, y2b, x2b;
212212 bool light;
213- grid_type *c_ptr;
213+ grid_type *g_ptr;
214214
215215 /* Find and reserve some space in the dungeon. Get center of room. */
216216 if (!find_space(&yval, &xval, 11, 25)) return FALSE;
@@ -236,10 +236,10 @@ bool build_type2(void)
236236 {
237237 for (x = x1a - 1; x <= x2a + 1; x++)
238238 {
239- c_ptr = &grid_array[y][x];
240- place_floor_grid(c_ptr);
241- c_ptr->info |= (CAVE_ROOM);
242- if (light) c_ptr->info |= (CAVE_GLOW);
239+ g_ptr = &grid_array[y][x];
240+ place_floor_grid(g_ptr);
241+ g_ptr->info |= (CAVE_ROOM);
242+ if (light) g_ptr->info |= (CAVE_GLOW);
243243 }
244244 }
245245
@@ -248,10 +248,10 @@ bool build_type2(void)
248248 {
249249 for (x = x1b - 1; x <= x2b + 1; x++)
250250 {
251- c_ptr = &grid_array[y][x];
252- place_floor_grid(c_ptr);
253- c_ptr->info |= (CAVE_ROOM);
254- if (light) c_ptr->info |= (CAVE_GLOW);
251+ g_ptr = &grid_array[y][x];
252+ place_floor_grid(g_ptr);
253+ g_ptr->info |= (CAVE_ROOM);
254+ if (light) g_ptr->info |= (CAVE_GLOW);
255255 }
256256 }
257257
@@ -259,33 +259,33 @@ bool build_type2(void)
259259 /* Place the walls around room "a" */
260260 for (y = y1a - 1; y <= y2a + 1; y++)
261261 {
262- c_ptr = &grid_array[y][x1a - 1];
263- place_outer_grid(c_ptr);
264- c_ptr = &grid_array[y][x2a + 1];
265- place_outer_grid(c_ptr);
262+ g_ptr = &grid_array[y][x1a - 1];
263+ place_outer_grid(g_ptr);
264+ g_ptr = &grid_array[y][x2a + 1];
265+ place_outer_grid(g_ptr);
266266 }
267267 for (x = x1a - 1; x <= x2a + 1; x++)
268268 {
269- c_ptr = &grid_array[y1a - 1][x];
270- place_outer_grid(c_ptr);
271- c_ptr = &grid_array[y2a + 1][x];
272- place_outer_grid(c_ptr);
269+ g_ptr = &grid_array[y1a - 1][x];
270+ place_outer_grid(g_ptr);
271+ g_ptr = &grid_array[y2a + 1][x];
272+ place_outer_grid(g_ptr);
273273 }
274274
275275 /* Place the walls around room "b" */
276276 for (y = y1b - 1; y <= y2b + 1; y++)
277277 {
278- c_ptr = &grid_array[y][x1b - 1];
279- place_outer_grid(c_ptr);
280- c_ptr = &grid_array[y][x2b + 1];
281- place_outer_grid(c_ptr);
278+ g_ptr = &grid_array[y][x1b - 1];
279+ place_outer_grid(g_ptr);
280+ g_ptr = &grid_array[y][x2b + 1];
281+ place_outer_grid(g_ptr);
282282 }
283283 for (x = x1b - 1; x <= x2b + 1; x++)
284284 {
285- c_ptr = &grid_array[y1b - 1][x];
286- place_outer_grid(c_ptr);
287- c_ptr = &grid_array[y2b + 1][x];
288- place_outer_grid(c_ptr);
285+ g_ptr = &grid_array[y1b - 1][x];
286+ place_outer_grid(g_ptr);
287+ g_ptr = &grid_array[y2b + 1][x];
288+ place_outer_grid(g_ptr);
289289 }
290290
291291
@@ -295,8 +295,8 @@ bool build_type2(void)
295295 {
296296 for (x = x1a; x <= x2a; x++)
297297 {
298- c_ptr = &grid_array[y][x];
299- place_floor_grid(c_ptr);
298+ g_ptr = &grid_array[y][x];
299+ place_floor_grid(g_ptr);
300300 }
301301 }
302302
@@ -305,8 +305,8 @@ bool build_type2(void)
305305 {
306306 for (x = x1b; x <= x2b; x++)
307307 {
308- c_ptr = &grid_array[y][x];
309- place_floor_grid(c_ptr);
308+ g_ptr = &grid_array[y][x];
309+ place_floor_grid(g_ptr);
310310 }
311311 }
312312
@@ -333,7 +333,7 @@ bool build_type3(void)
333333 POSITION y1b, x1b, y2b, x2b;
334334 POSITION yval, xval;
335335 bool light;
336- grid_type *c_ptr;
336+ grid_type *g_ptr;
337337
338338
339339 /* Find and reserve some space in the dungeon. Get center of room. */
@@ -371,10 +371,10 @@ bool build_type3(void)
371371 {
372372 for (x = x1a - 1; x <= x2a + 1; x++)
373373 {
374- c_ptr = &grid_array[y][x];
375- place_floor_grid(c_ptr);
376- c_ptr->info |= (CAVE_ROOM);
377- if (light) c_ptr->info |= (CAVE_GLOW);
374+ g_ptr = &grid_array[y][x];
375+ place_floor_grid(g_ptr);
376+ g_ptr->info |= (CAVE_ROOM);
377+ if (light) g_ptr->info |= (CAVE_GLOW);
378378 }
379379 }
380380
@@ -383,10 +383,10 @@ bool build_type3(void)
383383 {
384384 for (x = x1b - 1; x <= x2b + 1; x++)
385385 {
386- c_ptr = &grid_array[y][x];
387- place_floor_grid(c_ptr);
388- c_ptr->info |= (CAVE_ROOM);
389- if (light) c_ptr->info |= (CAVE_GLOW);
386+ g_ptr = &grid_array[y][x];
387+ place_floor_grid(g_ptr);
388+ g_ptr->info |= (CAVE_ROOM);
389+ if (light) g_ptr->info |= (CAVE_GLOW);
390390 }
391391 }
392392
@@ -394,33 +394,33 @@ bool build_type3(void)
394394 /* Place the walls around room "a" */
395395 for (y = y1a - 1; y <= y2a + 1; y++)
396396 {
397- c_ptr = &grid_array[y][x1a - 1];
398- place_outer_grid(c_ptr);
399- c_ptr = &grid_array[y][x2a + 1];
400- place_outer_grid(c_ptr);
397+ g_ptr = &grid_array[y][x1a - 1];
398+ place_outer_grid(g_ptr);
399+ g_ptr = &grid_array[y][x2a + 1];
400+ place_outer_grid(g_ptr);
401401 }
402402 for (x = x1a - 1; x <= x2a + 1; x++)
403403 {
404- c_ptr = &grid_array[y1a - 1][x];
405- place_outer_grid(c_ptr);
406- c_ptr = &grid_array[y2a + 1][x];
407- place_outer_grid(c_ptr);
404+ g_ptr = &grid_array[y1a - 1][x];
405+ place_outer_grid(g_ptr);
406+ g_ptr = &grid_array[y2a + 1][x];
407+ place_outer_grid(g_ptr);
408408 }
409409
410410 /* Place the walls around room "b" */
411411 for (y = y1b - 1; y <= y2b + 1; y++)
412412 {
413- c_ptr = &grid_array[y][x1b - 1];
414- place_outer_grid(c_ptr);
415- c_ptr = &grid_array[y][x2b + 1];
416- place_outer_grid(c_ptr);
413+ g_ptr = &grid_array[y][x1b - 1];
414+ place_outer_grid(g_ptr);
415+ g_ptr = &grid_array[y][x2b + 1];
416+ place_outer_grid(g_ptr);
417417 }
418418 for (x = x1b - 1; x <= x2b + 1; x++)
419419 {
420- c_ptr = &grid_array[y1b - 1][x];
421- place_outer_grid(c_ptr);
422- c_ptr = &grid_array[y2b + 1][x];
423- place_outer_grid(c_ptr);
420+ g_ptr = &grid_array[y1b - 1][x];
421+ place_outer_grid(g_ptr);
422+ g_ptr = &grid_array[y2b + 1][x];
423+ place_outer_grid(g_ptr);
424424 }
425425
426426
@@ -429,8 +429,8 @@ bool build_type3(void)
429429 {
430430 for (x = x1a; x <= x2a; x++)
431431 {
432- c_ptr = &grid_array[y][x];
433- place_floor_grid(c_ptr);
432+ g_ptr = &grid_array[y][x];
433+ place_floor_grid(g_ptr);
434434 }
435435 }
436436
@@ -439,8 +439,8 @@ bool build_type3(void)
439439 {
440440 for (x = x1b; x <= x2b; x++)
441441 {
442- c_ptr = &grid_array[y][x];
443- place_floor_grid(c_ptr);
442+ g_ptr = &grid_array[y][x];
443+ place_floor_grid(g_ptr);
444444 }
445445 }
446446
@@ -456,8 +456,8 @@ bool build_type3(void)
456456 {
457457 for (x = x1a; x <= x2a; x++)
458458 {
459- c_ptr = &grid_array[y][x];
460- place_inner_grid(c_ptr);
459+ g_ptr = &grid_array[y][x];
460+ place_inner_grid(g_ptr);
461461 }
462462 }
463463 break;
@@ -469,17 +469,17 @@ bool build_type3(void)
469469 /* Build the vault */
470470 for (y = y1b; y <= y2b; y++)
471471 {
472- c_ptr = &grid_array[y][x1a];
473- place_inner_grid(c_ptr);
474- c_ptr = &grid_array[y][x2a];
475- place_inner_grid(c_ptr);
472+ g_ptr = &grid_array[y][x1a];
473+ place_inner_grid(g_ptr);
474+ g_ptr = &grid_array[y][x2a];
475+ place_inner_grid(g_ptr);
476476 }
477477 for (x = x1a; x <= x2a; x++)
478478 {
479- c_ptr = &grid_array[y1b][x];
480- place_inner_grid(c_ptr);
481- c_ptr = &grid_array[y2b][x];
482- place_inner_grid(c_ptr);
479+ g_ptr = &grid_array[y1b][x];
480+ place_inner_grid(g_ptr);
481+ g_ptr = &grid_array[y2b][x];
482+ place_inner_grid(g_ptr);
483483 }
484484
485485 /* Place a secret door on the inner room */
@@ -513,20 +513,20 @@ bool build_type3(void)
513513 for (y = y1b; y <= y2b; y++)
514514 {
515515 if (y == yval) continue;
516- c_ptr = &grid_array[y][x1a - 1];
517- place_inner_grid(c_ptr);
518- c_ptr = &grid_array[y][x2a + 1];
519- place_inner_grid(c_ptr);
516+ g_ptr = &grid_array[y][x1a - 1];
517+ place_inner_grid(g_ptr);
518+ g_ptr = &grid_array[y][x2a + 1];
519+ place_inner_grid(g_ptr);
520520 }
521521
522522 /* Pinch the north/south sides */
523523 for (x = x1a; x <= x2a; x++)
524524 {
525525 if (x == xval) continue;
526- c_ptr = &grid_array[y1b - 1][x];
527- place_inner_grid(c_ptr);
528- c_ptr = &grid_array[y2b + 1][x];
529- place_inner_grid(c_ptr);
526+ g_ptr = &grid_array[y1b - 1][x];
527+ place_inner_grid(g_ptr);
528+ g_ptr = &grid_array[y2b + 1][x];
529+ place_inner_grid(g_ptr);
530530 }
531531
532532 /* Sometimes shut using secret doors */
@@ -546,23 +546,23 @@ bool build_type3(void)
546546 /* Occasionally put a "plus" in the center */
547547 else if (one_in_(3))
548548 {
549- c_ptr = &grid_array[yval][xval];
550- place_inner_grid(c_ptr);
551- c_ptr = &grid_array[y1b][xval];
552- place_inner_grid(c_ptr);
553- c_ptr = &grid_array[y2b][xval];
554- place_inner_grid(c_ptr);
555- c_ptr = &grid_array[yval][x1a];
556- place_inner_grid(c_ptr);
557- c_ptr = &grid_array[yval][x2a];
558- place_inner_grid(c_ptr);
549+ g_ptr = &grid_array[yval][xval];
550+ place_inner_grid(g_ptr);
551+ g_ptr = &grid_array[y1b][xval];
552+ place_inner_grid(g_ptr);
553+ g_ptr = &grid_array[y2b][xval];
554+ place_inner_grid(g_ptr);
555+ g_ptr = &grid_array[yval][x1a];
556+ place_inner_grid(g_ptr);
557+ g_ptr = &grid_array[yval][x2a];
558+ place_inner_grid(g_ptr);
559559 }
560560
561561 /* Occasionally put a pillar in the center */
562562 else if (one_in_(3))
563563 {
564- c_ptr = &grid_array[yval][xval];
565- place_inner_grid(c_ptr);
564+ g_ptr = &grid_array[yval][xval];
565+ place_inner_grid(g_ptr);
566566 }
567567
568568 break;
@@ -588,7 +588,7 @@ bool build_type4(void)
588588 POSITION y, x, y1, x1;
589589 POSITION y2, x2, tmp, yval, xval;
590590 bool light;
591- grid_type *c_ptr;
591+ grid_type *g_ptr;
592592
593593
594594 /* Find and reserve some space in the dungeon. Get center of room. */
@@ -608,27 +608,27 @@ bool build_type4(void)
608608 {
609609 for (x = x1 - 1; x <= x2 + 1; x++)
610610 {
611- c_ptr = &grid_array[y][x];
612- place_floor_grid(c_ptr);
613- c_ptr->info |= (CAVE_ROOM);
614- if (light) c_ptr->info |= (CAVE_GLOW);
611+ g_ptr = &grid_array[y][x];
612+ place_floor_grid(g_ptr);
613+ g_ptr->info |= (CAVE_ROOM);
614+ if (light) g_ptr->info |= (CAVE_GLOW);
615615 }
616616 }
617617
618618 /* Outer Walls */
619619 for (y = y1 - 1; y <= y2 + 1; y++)
620620 {
621- c_ptr = &grid_array[y][x1 - 1];
622- place_outer_grid(c_ptr);
623- c_ptr = &grid_array[y][x2 + 1];
624- place_outer_grid(c_ptr);
621+ g_ptr = &grid_array[y][x1 - 1];
622+ place_outer_grid(g_ptr);
623+ g_ptr = &grid_array[y][x2 + 1];
624+ place_outer_grid(g_ptr);
625625 }
626626 for (x = x1 - 1; x <= x2 + 1; x++)
627627 {
628- c_ptr = &grid_array[y1 - 1][x];
629- place_outer_grid(c_ptr);
630- c_ptr = &grid_array[y2 + 1][x];
631- place_outer_grid(c_ptr);
628+ g_ptr = &grid_array[y1 - 1][x];
629+ place_outer_grid(g_ptr);
630+ g_ptr = &grid_array[y2 + 1][x];
631+ place_outer_grid(g_ptr);
632632 }
633633
634634
@@ -641,17 +641,17 @@ bool build_type4(void)
641641 /* The inner walls */
642642 for (y = y1 - 1; y <= y2 + 1; y++)
643643 {
644- c_ptr = &grid_array[y][x1 - 1];
645- place_inner_grid(c_ptr);
646- c_ptr = &grid_array[y][x2 + 1];
647- place_inner_grid(c_ptr);
644+ g_ptr = &grid_array[y][x1 - 1];
645+ place_inner_grid(g_ptr);
646+ g_ptr = &grid_array[y][x2 + 1];
647+ place_inner_grid(g_ptr);
648648 }
649649 for (x = x1 - 1; x <= x2 + 1; x++)
650650 {
651- c_ptr = &grid_array[y1 - 1][x];
652- place_inner_grid(c_ptr);
653- c_ptr = &grid_array[y2 + 1][x];
654- place_inner_grid(c_ptr);
651+ g_ptr = &grid_array[y1 - 1][x];
652+ place_inner_grid(g_ptr);
653+ g_ptr = &grid_array[y2 + 1][x];
654+ place_inner_grid(g_ptr);
655655 }
656656
657657
@@ -694,8 +694,8 @@ bool build_type4(void)
694694 for (x = xval - 1; x <= xval + 1; x++)
695695 {
696696 if ((x == xval) && (y == yval)) continue;
697- c_ptr = &grid_array[y][x];
698- place_inner_grid(c_ptr);
697+ g_ptr = &grid_array[y][x];
698+ place_inner_grid(g_ptr);
699699 }
700700 }
701701
@@ -746,8 +746,8 @@ bool build_type4(void)
746746 {
747747 for (x = xval - 1; x <= xval + 1; x++)
748748 {
749- c_ptr = &grid_array[y][x];
750- place_inner_grid(c_ptr);
749+ g_ptr = &grid_array[y][x];
750+ place_inner_grid(g_ptr);
751751 }
752752 }
753753
@@ -759,13 +759,13 @@ bool build_type4(void)
759759 {
760760 for (x = xval - 5 - tmp; x <= xval - 3 - tmp; x++)
761761 {
762- c_ptr = &grid_array[y][x];
763- place_inner_grid(c_ptr);
762+ g_ptr = &grid_array[y][x];
763+ place_inner_grid(g_ptr);
764764 }
765765 for (x = xval + 3 + tmp; x <= xval + 5 + tmp; x++)
766766 {
767- c_ptr = &grid_array[y][x];
768- place_inner_grid(c_ptr);
767+ g_ptr = &grid_array[y][x];
768+ place_inner_grid(g_ptr);
769769 }
770770 }
771771 }
@@ -780,17 +780,17 @@ bool build_type4(void)
780780 /* Long horizontal walls */
781781 for (x = xval - 5; x <= xval + 5; x++)
782782 {
783- c_ptr = &grid_array[yval - 1][x];
784- place_inner_grid(c_ptr);
785- c_ptr = &grid_array[yval + 1][x];
786- place_inner_grid(c_ptr);
783+ g_ptr = &grid_array[yval - 1][x];
784+ place_inner_grid(g_ptr);
785+ g_ptr = &grid_array[yval + 1][x];
786+ place_inner_grid(g_ptr);
787787 }
788788
789789 /* Close off the left/right edges */
790- c_ptr = &grid_array[yval][xval - 5];
791- place_inner_grid(c_ptr);
792- c_ptr = &grid_array[yval][xval + 5];
793- place_inner_grid(c_ptr);
790+ g_ptr = &grid_array[yval][xval - 5];
791+ place_inner_grid(g_ptr);
792+ g_ptr = &grid_array[yval][xval + 5];
793+ place_inner_grid(g_ptr);
794794
795795 /* Secret doors (random top/bottom) */
796796 place_secret_door(yval - 3 + (randint1(2) * 2), xval - 3, door_type);
@@ -827,8 +827,8 @@ bool build_type4(void)
827827 {
828828 if (0x1 & (x + y))
829829 {
830- c_ptr = &grid_array[y][x];
831- place_inner_grid(c_ptr);
830+ g_ptr = &grid_array[y][x];
831+ place_inner_grid(g_ptr);
832832 }
833833 }
834834 }
@@ -857,13 +857,13 @@ bool build_type4(void)
857857 /* Inner "cross" */
858858 for (y = y1; y <= y2; y++)
859859 {
860- c_ptr = &grid_array[y][xval];
861- place_inner_grid(c_ptr);
860+ g_ptr = &grid_array[y][xval];
861+ place_inner_grid(g_ptr);
862862 }
863863 for (x = x1; x <= x2; x++)
864864 {
865- c_ptr = &grid_array[yval][x];
866- place_inner_grid(c_ptr);
865+ g_ptr = &grid_array[yval][x];
866+ place_inner_grid(g_ptr);
867867 }
868868
869869 /* Doors into the rooms */
--- a/src/rooms-pitnest.c
+++ b/src/rooms-pitnest.c
@@ -284,7 +284,7 @@ bool build_type5(void)
284284
285285 monster_type align;
286286
287- grid_type *c_ptr;
287+ grid_type *g_ptr;
288288
289289 int cur_nest_type = pick_vault_type(nest_types, d_info[p_ptr->dungeon_idx].nest);
290290 vault_aux_type *n_ptr;
@@ -345,26 +345,26 @@ bool build_type5(void)
345345 {
346346 for (x = x1 - 1; x <= x2 + 1; x++)
347347 {
348- c_ptr = &grid_array[y][x];
349- place_floor_grid(c_ptr);
350- c_ptr->info |= (CAVE_ROOM);
348+ g_ptr = &grid_array[y][x];
349+ place_floor_grid(g_ptr);
350+ g_ptr->info |= (CAVE_ROOM);
351351 }
352352 }
353353
354354 /* Place the outer walls */
355355 for (y = y1 - 1; y <= y2 + 1; y++)
356356 {
357- c_ptr = &grid_array[y][x1 - 1];
358- place_outer_grid(c_ptr);
359- c_ptr = &grid_array[y][x2 + 1];
360- place_outer_grid(c_ptr);
357+ g_ptr = &grid_array[y][x1 - 1];
358+ place_outer_grid(g_ptr);
359+ g_ptr = &grid_array[y][x2 + 1];
360+ place_outer_grid(g_ptr);
361361 }
362362 for (x = x1 - 1; x <= x2 + 1; x++)
363363 {
364- c_ptr = &grid_array[y1 - 1][x];
365- place_outer_grid(c_ptr);
366- c_ptr = &grid_array[y2 + 1][x];
367- place_outer_grid(c_ptr);
364+ g_ptr = &grid_array[y1 - 1][x];
365+ place_outer_grid(g_ptr);
366+ g_ptr = &grid_array[y2 + 1][x];
367+ place_outer_grid(g_ptr);
368368 }
369369
370370
@@ -377,18 +377,18 @@ bool build_type5(void)
377377 /* The inner walls */
378378 for (y = y1 - 1; y <= y2 + 1; y++)
379379 {
380- c_ptr = &grid_array[y][x1 - 1];
381- place_inner_grid(c_ptr);
382- c_ptr = &grid_array[y][x2 + 1];
383- place_inner_grid(c_ptr);
380+ g_ptr = &grid_array[y][x1 - 1];
381+ place_inner_grid(g_ptr);
382+ g_ptr = &grid_array[y][x2 + 1];
383+ place_inner_grid(g_ptr);
384384 }
385385
386386 for (x = x1 - 1; x <= x2 + 1; x++)
387387 {
388- c_ptr = &grid_array[y1 - 1][x];
389- place_inner_grid(c_ptr);
390- c_ptr = &grid_array[y2 + 1][x];
391- place_inner_grid(c_ptr);
388+ g_ptr = &grid_array[y1 - 1][x];
389+ place_inner_grid(g_ptr);
390+ g_ptr = &grid_array[y2 + 1][x];
391+ place_inner_grid(g_ptr);
392392 }
393393 for (y = y1; y <= y2; y++)
394394 {
@@ -495,7 +495,7 @@ bool build_type6(void)
495495
496496 monster_type align;
497497
498- grid_type *c_ptr;
498+ grid_type *g_ptr;
499499
500500 int cur_pit_type = pick_vault_type(pit_types, d_info[p_ptr->dungeon_idx].pit);
501501 vault_aux_type *n_ptr;
@@ -555,26 +555,26 @@ bool build_type6(void)
555555 {
556556 for (x = x1 - 1; x <= x2 + 1; x++)
557557 {
558- c_ptr = &grid_array[y][x];
559- place_floor_grid(c_ptr);
560- c_ptr->info |= (CAVE_ROOM);
558+ g_ptr = &grid_array[y][x];
559+ place_floor_grid(g_ptr);
560+ g_ptr->info |= (CAVE_ROOM);
561561 }
562562 }
563563
564564 /* Place the outer walls */
565565 for (y = y1 - 1; y <= y2 + 1; y++)
566566 {
567- c_ptr = &grid_array[y][x1 - 1];
568- place_outer_grid(c_ptr);
569- c_ptr = &grid_array[y][x2 + 1];
570- place_outer_grid(c_ptr);
567+ g_ptr = &grid_array[y][x1 - 1];
568+ place_outer_grid(g_ptr);
569+ g_ptr = &grid_array[y][x2 + 1];
570+ place_outer_grid(g_ptr);
571571 }
572572 for (x = x1 - 1; x <= x2 + 1; x++)
573573 {
574- c_ptr = &grid_array[y1 - 1][x];
575- place_outer_grid(c_ptr);
576- c_ptr = &grid_array[y2 + 1][x];
577- place_outer_grid(c_ptr);
574+ g_ptr = &grid_array[y1 - 1][x];
575+ place_outer_grid(g_ptr);
576+ g_ptr = &grid_array[y2 + 1][x];
577+ place_outer_grid(g_ptr);
578578 }
579579
580580 /* Advance to the center room */
@@ -586,17 +586,17 @@ bool build_type6(void)
586586 /* The inner walls */
587587 for (y = y1 - 1; y <= y2 + 1; y++)
588588 {
589- c_ptr = &grid_array[y][x1 - 1];
590- place_inner_grid(c_ptr);
591- c_ptr = &grid_array[y][x2 + 1];
592- place_inner_grid(c_ptr);
589+ g_ptr = &grid_array[y][x1 - 1];
590+ place_inner_grid(g_ptr);
591+ g_ptr = &grid_array[y][x2 + 1];
592+ place_inner_grid(g_ptr);
593593 }
594594 for (x = x1 - 1; x <= x2 + 1; x++)
595595 {
596- c_ptr = &grid_array[y1 - 1][x];
597- place_inner_grid(c_ptr);
598- c_ptr = &grid_array[y2 + 1][x];
599- place_inner_grid(c_ptr);
596+ g_ptr = &grid_array[y1 - 1][x];
597+ place_inner_grid(g_ptr);
598+ g_ptr = &grid_array[y2 + 1][x];
599+ place_inner_grid(g_ptr);
600600 }
601601 for (y = y1; y <= y2; y++)
602602 {
@@ -800,7 +800,7 @@ bool build_type13(void)
800800
801801 monster_type align;
802802
803- grid_type *c_ptr;
803+ grid_type *g_ptr;
804804
805805 int cur_pit_type = pick_vault_type(pit_types, d_info[p_ptr->dungeon_idx].pit);
806806 vault_aux_type *n_ptr;
@@ -863,61 +863,61 @@ bool build_type13(void)
863863 {
864864 for (x = x1 - 1; x <= x2 + 1; x++)
865865 {
866- c_ptr = &grid_array[y][x];
867- place_inner_grid(c_ptr);
868- c_ptr->info |= (CAVE_ROOM);
866+ g_ptr = &grid_array[y][x];
867+ place_inner_grid(g_ptr);
868+ g_ptr->info |= (CAVE_ROOM);
869869 }
870870 }
871871
872872 /* Place the floor area 1 */
873873 for (x = x1 + 3; x <= x2 - 3; x++)
874874 {
875- c_ptr = &grid_array[yval - 2][x];
876- place_floor_grid(c_ptr);
875+ g_ptr = &grid_array[yval - 2][x];
876+ place_floor_grid(g_ptr);
877877 add_cave_info(yval - 2, x, CAVE_ICKY);
878878
879- c_ptr = &grid_array[yval + 2][x];
880- place_floor_grid(c_ptr);
879+ g_ptr = &grid_array[yval + 2][x];
880+ place_floor_grid(g_ptr);
881881 add_cave_info(yval + 2, x, CAVE_ICKY);
882882 }
883883
884884 /* Place the floor area 2 */
885885 for (x = x1 + 5; x <= x2 - 5; x++)
886886 {
887- c_ptr = &grid_array[yval - 3][x];
888- place_floor_grid(c_ptr);
887+ g_ptr = &grid_array[yval - 3][x];
888+ place_floor_grid(g_ptr);
889889 add_cave_info(yval - 3, x, CAVE_ICKY);
890890
891- c_ptr = &grid_array[yval + 3][x];
892- place_floor_grid(c_ptr);
891+ g_ptr = &grid_array[yval + 3][x];
892+ place_floor_grid(g_ptr);
893893 add_cave_info(yval + 3, x, CAVE_ICKY);
894894 }
895895
896896 /* Corridor */
897897 for (x = x1; x <= x2; x++)
898898 {
899- c_ptr = &grid_array[yval][x];
900- place_floor_grid(c_ptr);
901- c_ptr = &grid_array[y1][x];
902- place_floor_grid(c_ptr);
903- c_ptr = &grid_array[y2][x];
904- place_floor_grid(c_ptr);
899+ g_ptr = &grid_array[yval][x];
900+ place_floor_grid(g_ptr);
901+ g_ptr = &grid_array[y1][x];
902+ place_floor_grid(g_ptr);
903+ g_ptr = &grid_array[y2][x];
904+ place_floor_grid(g_ptr);
905905 }
906906
907907 /* Place the outer walls */
908908 for (y = y1 - 1; y <= y2 + 1; y++)
909909 {
910- c_ptr = &grid_array[y][x1 - 1];
911- place_outer_grid(c_ptr);
912- c_ptr = &grid_array[y][x2 + 1];
913- place_outer_grid(c_ptr);
910+ g_ptr = &grid_array[y][x1 - 1];
911+ place_outer_grid(g_ptr);
912+ g_ptr = &grid_array[y][x2 + 1];
913+ place_outer_grid(g_ptr);
914914 }
915915 for (x = x1 - 1; x <= x2 + 1; x++)
916916 {
917- c_ptr = &grid_array[y1 - 1][x];
918- place_outer_grid(c_ptr);
919- c_ptr = &grid_array[y2 + 1][x];
920- place_outer_grid(c_ptr);
917+ g_ptr = &grid_array[y1 - 1][x];
918+ place_outer_grid(g_ptr);
919+ g_ptr = &grid_array[y2 + 1][x];
920+ place_outer_grid(g_ptr);
921921 }
922922
923923 /* Random corridor */
--- a/src/rooms-special.c
+++ b/src/rooms-special.c
@@ -17,7 +17,7 @@ bool build_type15(void)
1717 POSITION y1, x1, xsize, ysize;
1818 bool light;
1919
20- grid_type *c_ptr;
20+ grid_type *g_ptr;
2121
2222 /* Pick a room size */
2323 xsize = rand_range(9, 13);
@@ -40,32 +40,32 @@ bool build_type15(void)
4040 {
4141 for (x = x1 - 1; x <= x2 + 1; x++)
4242 {
43- c_ptr = &grid_array[y][x];
44- place_floor_grid(c_ptr);
45- c_ptr->feat = feat_glass_floor;
46- c_ptr->info |= (CAVE_ROOM);
47- if (light) c_ptr->info |= (CAVE_GLOW);
43+ g_ptr = &grid_array[y][x];
44+ place_floor_grid(g_ptr);
45+ g_ptr->feat = feat_glass_floor;
46+ g_ptr->info |= (CAVE_ROOM);
47+ if (light) g_ptr->info |= (CAVE_GLOW);
4848 }
4949 }
5050
5151 /* Walls around the room */
5252 for (y = y1 - 1; y <= y2 + 1; y++)
5353 {
54- c_ptr = &grid_array[y][x1 - 1];
55- place_outer_grid(c_ptr);
56- c_ptr->feat = feat_glass_wall;
57- c_ptr = &grid_array[y][x2 + 1];
58- place_outer_grid(c_ptr);
59- c_ptr->feat = feat_glass_wall;
54+ g_ptr = &grid_array[y][x1 - 1];
55+ place_outer_grid(g_ptr);
56+ g_ptr->feat = feat_glass_wall;
57+ g_ptr = &grid_array[y][x2 + 1];
58+ place_outer_grid(g_ptr);
59+ g_ptr->feat = feat_glass_wall;
6060 }
6161 for (x = x1 - 1; x <= x2 + 1; x++)
6262 {
63- c_ptr = &grid_array[y1 - 1][x];
64- place_outer_grid(c_ptr);
65- c_ptr->feat = feat_glass_wall;
66- c_ptr = &grid_array[y2 + 1][x];
67- place_outer_grid(c_ptr);
68- c_ptr->feat = feat_glass_wall;
63+ g_ptr = &grid_array[y1 - 1][x];
64+ place_outer_grid(g_ptr);
65+ g_ptr->feat = feat_glass_wall;
66+ g_ptr = &grid_array[y2 + 1][x];
67+ place_outer_grid(g_ptr);
68+ g_ptr->feat = feat_glass_wall;
6969 }
7070
7171 switch (randint1(3))
@@ -87,9 +87,9 @@ bool build_type15(void)
8787 /* Walls around the breather */
8888 for (dir2 = 0; dir2 < 8; dir2++)
8989 {
90- c_ptr = &grid_array[y + ddy_ddd[dir2]][x + ddx_ddd[dir2]];
91- place_inner_grid(c_ptr);
92- c_ptr->feat = feat_glass_wall;
90+ g_ptr = &grid_array[y + ddy_ddd[dir2]][x + ddx_ddd[dir2]];
91+ place_inner_grid(g_ptr);
92+ g_ptr->feat = feat_glass_wall;
9393 }
9494 }
9595
@@ -98,9 +98,9 @@ bool build_type15(void)
9898 {
9999 y = yval + 2 * ddy_ddd[dir1];
100100 x = xval + 2 * ddx_ddd[dir1];
101- c_ptr = &grid_array[y][x];
102- place_inner_perm_grid(c_ptr);
103- c_ptr->feat = feat_permanent_glass_wall;
101+ g_ptr = &grid_array[y][x];
102+ place_inner_perm_grid(g_ptr);
103+ g_ptr->feat = feat_permanent_glass_wall;
104104 grid_array[yval + ddy_ddd[dir1]][xval + ddx_ddd[dir1]].info |= (CAVE_ICKY);
105105 }
106106
@@ -109,8 +109,8 @@ bool build_type15(void)
109109 y = yval + 2 * ddy_ddd[dir1];
110110 x = xval + 2 * ddx_ddd[dir1];
111111 place_secret_door(y, x, DOOR_GLASS_DOOR);
112- c_ptr = &grid_array[y][x];
113- if (is_closed_door(c_ptr->feat)) c_ptr->mimic = feat_glass_wall;
112+ g_ptr = &grid_array[y][x];
113+ if (is_closed_door(g_ptr->feat)) g_ptr->mimic = feat_glass_wall;
114114
115115 /* Place a potion */
116116 get_obj_num_hook = kind_is_potion;
@@ -125,21 +125,21 @@ bool build_type15(void)
125125 DIRECTION dir1;
126126
127127 /* Pillars */
128- c_ptr = &grid_array[y1 + 1][x1 + 1];
129- place_inner_grid(c_ptr);
130- c_ptr->feat = feat_glass_wall;
128+ g_ptr = &grid_array[y1 + 1][x1 + 1];
129+ place_inner_grid(g_ptr);
130+ g_ptr->feat = feat_glass_wall;
131131
132- c_ptr = &grid_array[y1 + 1][x2 - 1];
133- place_inner_grid(c_ptr);
134- c_ptr->feat = feat_glass_wall;
132+ g_ptr = &grid_array[y1 + 1][x2 - 1];
133+ place_inner_grid(g_ptr);
134+ g_ptr->feat = feat_glass_wall;
135135
136- c_ptr = &grid_array[y2 - 1][x1 + 1];
137- place_inner_grid(c_ptr);
138- c_ptr->feat = feat_glass_wall;
136+ g_ptr = &grid_array[y2 - 1][x1 + 1];
137+ place_inner_grid(g_ptr);
138+ g_ptr->feat = feat_glass_wall;
139139
140- c_ptr = &grid_array[y2 - 1][x2 - 1];
141- place_inner_grid(c_ptr);
142- c_ptr->feat = feat_glass_wall;
140+ g_ptr = &grid_array[y2 - 1][x2 - 1];
141+ place_inner_grid(g_ptr);
142+ g_ptr->feat = feat_glass_wall;
143143 get_mon_num_prep(vault_aux_lite, NULL);
144144
145145 r_idx = get_mon_num(dun_level);
@@ -148,9 +148,9 @@ bool build_type15(void)
148148 /* Walls around the breather */
149149 for (dir1 = 0; dir1 < 8; dir1++)
150150 {
151- c_ptr = &grid_array[yval + ddy_ddd[dir1]][xval + ddx_ddd[dir1]];
152- place_inner_grid(c_ptr);
153- c_ptr->feat = feat_glass_wall;
151+ g_ptr = &grid_array[yval + ddy_ddd[dir1]][xval + ddx_ddd[dir1]];
152+ place_inner_grid(g_ptr);
153+ g_ptr->feat = feat_glass_wall;
154154 }
155155
156156 /* Curtains around the breather */
@@ -178,27 +178,27 @@ bool build_type15(void)
178178 /* Walls around the potion */
179179 for (y = yval - 2; y <= yval + 2; y++)
180180 {
181- c_ptr = &grid_array[y][xval - 3];
182- place_inner_grid(c_ptr);
183- c_ptr->feat = feat_glass_wall;
184- c_ptr = &grid_array[y][xval + 3];
185- place_inner_grid(c_ptr);
186- c_ptr->feat = feat_glass_wall;
181+ g_ptr = &grid_array[y][xval - 3];
182+ place_inner_grid(g_ptr);
183+ g_ptr->feat = feat_glass_wall;
184+ g_ptr = &grid_array[y][xval + 3];
185+ place_inner_grid(g_ptr);
186+ g_ptr->feat = feat_glass_wall;
187187 }
188188 for (x = xval - 2; x <= xval + 2; x++)
189189 {
190- c_ptr = &grid_array[yval - 3][x];
191- place_inner_grid(c_ptr);
192- c_ptr->feat = feat_glass_wall;
193- c_ptr = &grid_array[yval + 3][x];
194- place_inner_grid(c_ptr);
195- c_ptr->feat = feat_glass_wall;
190+ g_ptr = &grid_array[yval - 3][x];
191+ place_inner_grid(g_ptr);
192+ g_ptr->feat = feat_glass_wall;
193+ g_ptr = &grid_array[yval + 3][x];
194+ place_inner_grid(g_ptr);
195+ g_ptr->feat = feat_glass_wall;
196196 }
197197 for (dir1 = 4; dir1 < 8; dir1++)
198198 {
199- c_ptr = &grid_array[yval + 2 * ddy_ddd[dir1]][xval + 2 * ddx_ddd[dir1]];
200- place_inner_grid(c_ptr);
201- c_ptr->feat = feat_glass_wall;
199+ g_ptr = &grid_array[yval + 2 * ddy_ddd[dir1]][xval + 2 * ddx_ddd[dir1]];
200+ place_inner_grid(g_ptr);
201+ g_ptr->feat = feat_glass_wall;
202202 }
203203 get_mon_num_prep(vault_aux_shards, NULL);
204204
--- a/src/rooms-trap.c
+++ b/src/rooms-trap.c
@@ -17,7 +17,7 @@ bool build_type14(void)
1717
1818 bool light;
1919
20- grid_type *c_ptr;
20+ grid_type *g_ptr;
2121 s16b trap;
2222
2323 /* Pick a room size */
@@ -48,27 +48,27 @@ bool build_type14(void)
4848 {
4949 for (x = x1 - 1; x <= x2 + 1; x++)
5050 {
51- c_ptr = &grid_array[y][x];
52- place_floor_grid(c_ptr);
53- c_ptr->info |= (CAVE_ROOM);
54- if (light) c_ptr->info |= (CAVE_GLOW);
51+ g_ptr = &grid_array[y][x];
52+ place_floor_grid(g_ptr);
53+ g_ptr->info |= (CAVE_ROOM);
54+ if (light) g_ptr->info |= (CAVE_GLOW);
5555 }
5656 }
5757
5858 /* Walls around the room */
5959 for (y = y1 - 1; y <= y2 + 1; y++)
6060 {
61- c_ptr = &grid_array[y][x1 - 1];
62- place_outer_grid(c_ptr);
63- c_ptr = &grid_array[y][x2 + 1];
64- place_outer_grid(c_ptr);
61+ g_ptr = &grid_array[y][x1 - 1];
62+ place_outer_grid(g_ptr);
63+ g_ptr = &grid_array[y][x2 + 1];
64+ place_outer_grid(g_ptr);
6565 }
6666 for (x = x1 - 1; x <= x2 + 1; x++)
6767 {
68- c_ptr = &grid_array[y1 - 1][x];
69- place_outer_grid(c_ptr);
70- c_ptr = &grid_array[y2 + 1][x];
71- place_outer_grid(c_ptr);
68+ g_ptr = &grid_array[y1 - 1][x];
69+ place_outer_grid(g_ptr);
70+ g_ptr = &grid_array[y2 + 1][x];
71+ place_outer_grid(g_ptr);
7272 }
7373
7474 if (dun_level < 30 + randint1(30))
@@ -77,9 +77,9 @@ bool build_type14(void)
7777 trap = feat_trap_armageddon;
7878
7979 /* Place a special trap */
80- c_ptr = &grid_array[rand_spread(yval, ysize / 4)][rand_spread(xval, xsize / 4)];
81- c_ptr->mimic = c_ptr->feat;
82- c_ptr->feat = trap;
80+ g_ptr = &grid_array[rand_spread(yval, ysize / 4)][rand_spread(xval, xsize / 4)];
81+ g_ptr->mimic = g_ptr->feat;
82+ g_ptr->feat = trap;
8383
8484 msg_format_wizard(CHEAT_DUNGEON, _("%sの部屋が生成されました。", "Room of %s was generated."), f_name + f_info[trap].name);
8585
--- 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
309309 {
310310 POSITION dx, dy, x, y, i, j;
311311 concptr t;
312- grid_type *c_ptr;
312+ grid_type *g_ptr;
313313
314314 /* Place dungeon features and objects */
315315 for (t = data, dy = 0; dy < ymax; dy++)
@@ -339,45 +339,45 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
339339
340340 /* Hack -- skip "non-grids" */
341341 if (*t == ' ') continue;
342- c_ptr = &grid_array[y][x];
342+ g_ptr = &grid_array[y][x];
343343
344344 /* Lay down a floor */
345- place_floor_grid(c_ptr);
345+ place_floor_grid(g_ptr);
346346
347347 /* Remove any mimic */
348- c_ptr->mimic = 0;
348+ g_ptr->mimic = 0;
349349
350350 /* Part of a vault */
351- c_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
351+ g_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
352352
353353 /* Analyze the grid */
354354 switch (*t)
355355 {
356356 /* Granite wall (outer) */
357357 case '%':
358- place_outer_noperm_grid(c_ptr);
358+ place_outer_noperm_grid(g_ptr);
359359 break;
360360
361361 /* Granite wall (inner) */
362362 case '#':
363- place_inner_grid(c_ptr);
363+ place_inner_grid(g_ptr);
364364 break;
365365
366366 /* Glass wall (inner) */
367367 case '$':
368- place_inner_grid(c_ptr);
369- c_ptr->feat = feat_glass_wall;
368+ place_inner_grid(g_ptr);
369+ g_ptr->feat = feat_glass_wall;
370370 break;
371371
372372 /* Permanent wall (inner) */
373373 case 'X':
374- place_inner_perm_grid(c_ptr);
374+ place_inner_perm_grid(g_ptr);
375375 break;
376376
377377 /* Permanent glass wall (inner) */
378378 case 'Y':
379- place_inner_perm_grid(c_ptr);
380- c_ptr->feat = feat_permanent_glass_wall;
379+ place_inner_perm_grid(g_ptr);
380+ g_ptr->feat = feat_permanent_glass_wall;
381381 break;
382382
383383 /* Treasure/trap */
@@ -399,7 +399,7 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
399399
400400 /* Tree */
401401 case ':':
402- c_ptr->feat = feat_tree;
402+ g_ptr->feat = feat_tree;
403403 break;
404404
405405 /* Secret doors */
@@ -410,7 +410,7 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
410410 /* Secret glass doors */
411411 case '-':
412412 place_secret_door(y, x, DOOR_GLASS_DOOR);
413- if (is_closed_door(c_ptr->feat)) c_ptr->mimic = feat_glass_wall;
413+ if (is_closed_door(g_ptr->feat)) g_ptr->mimic = feat_glass_wall;
414414 break;
415415
416416 /* Curtains */
@@ -1066,12 +1066,12 @@ static void build_mini_c_vault(POSITION x0, POSITION y0, POSITION xsize, POSITIO
10661066 {
10671067 for (x = x1 - 1; x <= x2 + 1; x++)
10681068 {
1069- grid_type *c_ptr = &grid_array[y][x];
1069+ grid_type *g_ptr = &grid_array[y][x];
10701070
1071- c_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
1071+ g_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
10721072
10731073 /* Permanent walls */
1074- place_inner_perm_grid(c_ptr);
1074+ place_inner_perm_grid(g_ptr);
10751075 }
10761076 }
10771077
--- a/src/rooms.c
+++ b/src/rooms.c
@@ -1692,7 +1692,7 @@ void build_maze_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize,
16921692 POSITION y1, x1, y2, x2;
16931693 int m, n, num_vertices, *visited;
16941694 bool light;
1695- grid_type *c_ptr;
1695+ grid_type *g_ptr;
16961696
16971697 msg_print_wizard(CHEAT_DUNGEON, _("迷路ランダムVaultを生成しました。", "Maze Vault."));
16981698
@@ -1713,22 +1713,22 @@ void build_maze_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize,
17131713 {
17141714 for (x = x1 - 1; x <= x2 + 1; x++)
17151715 {
1716- c_ptr = &grid_array[y][x];
1717- c_ptr->info |= CAVE_ROOM;
1718- if (is_vault) c_ptr->info |= CAVE_ICKY;
1716+ g_ptr = &grid_array[y][x];
1717+ g_ptr->info |= CAVE_ROOM;
1718+ if (is_vault) g_ptr->info |= CAVE_ICKY;
17191719 if ((x == x1 - 1) || (x == x2 + 1) || (y == y1 - 1) || (y == y2 + 1))
17201720 {
1721- place_outer_grid(c_ptr);
1721+ place_outer_grid(g_ptr);
17221722 }
17231723 else if (!is_vault)
17241724 {
1725- place_extra_grid(c_ptr);
1725+ place_extra_grid(g_ptr);
17261726 }
17271727 else
17281728 {
1729- place_inner_grid(c_ptr);
1729+ place_inner_grid(g_ptr);
17301730 }
1731- if (light) c_ptr->info |= (CAVE_GLOW);
1731+ if (light) g_ptr->info |= (CAVE_GLOW);
17321732 }
17331733 }
17341734
@@ -1963,22 +1963,22 @@ void build_recursive_room(POSITION x1, POSITION y1, POSITION x2, POSITION y2, in
19631963 */
19641964 void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
19651965 {
1966- grid_type *c_ptr;
1966+ grid_type *g_ptr;
19671967 feature_type *f_ptr;
19681968 int i, j;
19691969
19701970 if (!in_bounds(y, x)) return;
19711971
1972- c_ptr = &grid_array[y][x];
1972+ g_ptr = &grid_array[y][x];
19731973
19741974 /* hack- check to see if square has been visited before
19751975 * if so, then exit (use room flag to do this) */
1976- if (c_ptr->info & CAVE_ROOM) return;
1976+ if (g_ptr->info & CAVE_ROOM) return;
19771977
19781978 /* set room flag */
1979- c_ptr->info |= CAVE_ROOM;
1979+ g_ptr->info |= CAVE_ROOM;
19801980
1981- f_ptr = &f_info[c_ptr->feat];
1981+ f_ptr = &f_info[g_ptr->feat];
19821982
19831983 if (is_floor_bold(y, x))
19841984 {
@@ -1990,7 +1990,7 @@ void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1,
19901990 (y + j >= y1) && (y + j <= y2))
19911991 {
19921992 add_outer_wall(x + i, y + j, light, x1, y1, x2, y2);
1993- if (light) c_ptr->info |= CAVE_GLOW;
1993+ if (light) g_ptr->info |= CAVE_GLOW;
19941994 }
19951995 }
19961996 }
@@ -1999,12 +1999,12 @@ void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1,
19991999 {
20002000 /* Set bounding walls */
20012001 place_outer_bold(y, x);
2002- if (light) c_ptr->info |= CAVE_GLOW;
2002+ if (light) g_ptr->info |= CAVE_GLOW;
20032003 }
20042004 else if (permanent_wall(f_ptr))
20052005 {
20062006 /* Set bounding walls */
2007- if (light) c_ptr->info |= CAVE_GLOW;
2007+ if (light) g_ptr->info |= CAVE_GLOW;
20082008 }
20092009 }
20102010
@@ -2042,17 +2042,17 @@ void generate_room_floor(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int
20422042 {
20432043 POSITION y, x;
20442044
2045- grid_type *c_ptr;
2045+ grid_type *g_ptr;
20462046
20472047 for (y = y1; y <= y2; y++)
20482048 {
20492049 for (x = x1; x <= x2; x++)
20502050 {
20512051 /* Point to grid */
2052- c_ptr = &grid_array[y][x];
2053- place_floor_grid(c_ptr);
2054- c_ptr->info |= (CAVE_ROOM);
2055- if (light) c_ptr->info |= (CAVE_GLOW);
2052+ g_ptr = &grid_array[y][x];
2053+ place_floor_grid(g_ptr);
2054+ g_ptr->info |= (CAVE_ROOM);
2055+ if (light) g_ptr->info |= (CAVE_GLOW);
20562056 }
20572057 }
20582058 }
--- a/src/save.c
+++ b/src/save.c
@@ -973,14 +973,14 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
973973 {
974974 for (x = 0; x < cur_wid; x++)
975975 {
976- grid_type *c_ptr = &grid_array[y][x];
976+ grid_type *g_ptr = &grid_array[y][x];
977977
978978 for (i = 0; i < num_temp; i++)
979979 {
980- if (templates[i].info == c_ptr->info &&
981- templates[i].feat == c_ptr->feat &&
982- templates[i].mimic == c_ptr->mimic &&
983- templates[i].special == c_ptr->special)
980+ if (templates[i].info == g_ptr->info &&
981+ templates[i].feat == g_ptr->feat &&
982+ templates[i].mimic == g_ptr->mimic &&
983+ templates[i].special == g_ptr->special)
984984 {
985985 /* Same terrain is exist */
986986 templates[i].occurrence++;
@@ -1004,10 +1004,10 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
10041004 }
10051005
10061006 /* Add new template */
1007- templates[num_temp].info = c_ptr->info;
1008- templates[num_temp].feat = c_ptr->feat;
1009- templates[num_temp].mimic = c_ptr->mimic;
1010- templates[num_temp].special = c_ptr->special;
1007+ templates[num_temp].info = g_ptr->info;
1008+ templates[num_temp].feat = g_ptr->feat;
1009+ templates[num_temp].mimic = g_ptr->mimic;
1010+ templates[num_temp].special = g_ptr->special;
10111011 templates[num_temp].occurrence = 1;
10121012
10131013 /* Increase number of template */
@@ -1053,14 +1053,14 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
10531053 {
10541054 for (x = 0; x < cur_wid; x++)
10551055 {
1056- grid_type *c_ptr = &grid_array[y][x];
1056+ grid_type *g_ptr = &grid_array[y][x];
10571057
10581058 for (i = 0; i < num_temp; i++)
10591059 {
1060- if (templates[i].info == c_ptr->info &&
1061- templates[i].feat == c_ptr->feat &&
1062- templates[i].mimic == c_ptr->mimic &&
1063- templates[i].special == c_ptr->special)
1060+ if (templates[i].info == g_ptr->info &&
1061+ templates[i].feat == g_ptr->feat &&
1062+ templates[i].mimic == g_ptr->mimic &&
1063+ templates[i].special == g_ptr->special)
10641064 break;
10651065 }
10661066
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -506,7 +506,7 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
506506 /* Travel until stopped */
507507 for (cur_dis = 0; cur_dis <= tdis; )
508508 {
509- grid_type *c_ptr;
509+ grid_type *g_ptr;
510510
511511 /* Hack -- Stop at the target */
512512 if ((y == ty) && (x == tx)) break;
@@ -519,13 +519,13 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
519519 /* Shatter Arrow */
520520 if (snipe_type == SP_KILL_WALL)
521521 {
522- c_ptr = &grid_array[ny][nx];
522+ g_ptr = &grid_array[ny][nx];
523523
524- if (cave_have_flag_grid(c_ptr, FF_HURT_ROCK) && !c_ptr->m_idx)
524+ if (cave_have_flag_grid(g_ptr, FF_HURT_ROCK) && !g_ptr->m_idx)
525525 {
526- if (c_ptr->info & (CAVE_MARK)) msg_print(_("岩が砕け散った。", "Wall rocks were shattered."));
526+ if (g_ptr->info & (CAVE_MARK)) msg_print(_("岩が砕け散った。", "Wall rocks were shattered."));
527527 /* Forget the wall */
528- c_ptr->info &= ~(CAVE_MARK);
528+ g_ptr->info &= ~(CAVE_MARK);
529529 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
530530
531531 /* Destroy the wall */
--- a/src/spells-object.c
+++ b/src/spells-object.c
@@ -107,19 +107,19 @@ bool create_ammo(void)
107107 {
108108 POSITION x, y;
109109 DIRECTION dir;
110- grid_type *c_ptr;
110+ grid_type *g_ptr;
111111
112112 if (!get_rep_dir(&dir, FALSE)) return FALSE;
113113 y = p_ptr->y + ddy[dir];
114114 x = p_ptr->x + ddx[dir];
115- c_ptr = &grid_array[y][x];
115+ g_ptr = &grid_array[y][x];
116116
117- if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_CAN_DIG))
117+ if (!have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_CAN_DIG))
118118 {
119119 msg_print(_("そこには岩石がない。", "You need pile of rubble."));
120120 return FALSE;
121121 }
122- else if (!cave_have_flag_grid(c_ptr, FF_CAN_DIG) || !cave_have_flag_grid(c_ptr, FF_HURT_ROCK))
122+ else if (!cave_have_flag_grid(g_ptr, FF_CAN_DIG) || !cave_have_flag_grid(g_ptr, FF_HURT_ROCK))
123123 {
124124 msg_print(_("硬すぎて崩せなかった。", "You failed to make ammo."));
125125 }
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -304,8 +304,8 @@ static POSITION monster_target_y; /*!< モンスターの攻撃目標Y座標 */
304304 */
305305 static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
306306 {
307- grid_type *c_ptr = &grid_array[y][x];
308- feature_type *f_ptr = &f_info[c_ptr->feat];
307+ grid_type *g_ptr = &grid_array[y][x];
308+ feature_type *f_ptr = &f_info[g_ptr->feat];
309309
310310 bool obvious = FALSE;
311311 bool known = player_has_los_bold(y, x);
@@ -358,7 +358,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
358358 cave_set_feat(y, x, one_in_(3) ? feat_brake : feat_grass);
359359
360360 /* Observe */
361- if (c_ptr->info & (CAVE_MARK)) obvious = TRUE;
361+ if (g_ptr->info & (CAVE_MARK)) obvious = TRUE;
362362 }
363363 }
364364
@@ -404,7 +404,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
404404 case GF_KILL_TRAP:
405405 {
406406 /* Reveal secret doors */
407- if (is_hidden_door(c_ptr))
407+ if (is_hidden_door(g_ptr))
408408 {
409409 /* Pick a door */
410410 disclose_grid(y, x);
@@ -417,7 +417,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
417417 }
418418
419419 /* Destroy traps */
420- if (is_trap(c_ptr->feat))
420+ if (is_trap(g_ptr->feat))
421421 {
422422 /* Check line of sight */
423423 if (known)
@@ -431,15 +431,15 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
431431 }
432432
433433 /* Locked doors are unlocked */
434- if (is_closed_door(c_ptr->feat) && f_ptr->power && have_flag(f_ptr->flags, FF_OPEN))
434+ if (is_closed_door(g_ptr->feat) && f_ptr->power && have_flag(f_ptr->flags, FF_OPEN))
435435 {
436- s16b old_feat = c_ptr->feat;
436+ s16b old_feat = g_ptr->feat;
437437
438438 /* Unlock the door */
439439 cave_alter_feat(y, x, FF_DISARM);
440440
441441 /* Check line of sound */
442- if (known && (old_feat != c_ptr->feat))
442+ if (known && (old_feat != g_ptr->feat))
443443 {
444444 msg_print(_("カチッと音がした!", "Click!"));
445445 obvious = TRUE;
@@ -449,7 +449,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
449449 /* Remove "unsafe" flag if player is not blind */
450450 if (!p_ptr->blind && player_has_los_bold(y, x))
451451 {
452- c_ptr->info &= ~(CAVE_UNSAFE);
452+ g_ptr->info &= ~(CAVE_UNSAFE);
453453 lite_spot(y, x);
454454 obvious = TRUE;
455455 }
@@ -461,7 +461,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
461461 case GF_KILL_DOOR:
462462 {
463463 /* Destroy all doors and traps */
464- if (is_trap(c_ptr->feat) || have_flag(f_ptr->flags, FF_DOOR))
464+ if (is_trap(g_ptr->feat) || have_flag(f_ptr->flags, FF_DOOR))
465465 {
466466 /* Check line of sight */
467467 if (known)
@@ -477,7 +477,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
477477 /* Remove "unsafe" flag if player is not blind */
478478 if (!p_ptr->blind && player_has_los_bold(y, x))
479479 {
480- c_ptr->info &= ~(CAVE_UNSAFE);
480+ g_ptr->info &= ~(CAVE_UNSAFE);
481481 lite_spot(y, x);
482482 obvious = TRUE;
483483 }
@@ -489,11 +489,11 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
489489 {
490490 if (have_flag(f_ptr->flags, FF_SPIKE))
491491 {
492- s16b old_mimic = c_ptr->mimic;
493- feature_type *mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
492+ s16b old_mimic = g_ptr->mimic;
493+ feature_type *mimic_f_ptr = &f_info[get_feat_mimic(g_ptr)];
494494
495495 cave_alter_feat(y, x, FF_SPIKE);
496- c_ptr->mimic = old_mimic;
496+ g_ptr->mimic = old_mimic;
497497
498498 note_spot(y, x);
499499 lite_spot(y, x);
@@ -513,9 +513,9 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
513513 {
514514 if (have_flag(f_ptr->flags, FF_HURT_ROCK))
515515 {
516- if (known && (c_ptr->info & (CAVE_MARK)))
516+ if (known && (g_ptr->info & (CAVE_MARK)))
517517 {
518- msg_format(_("%sが溶けて泥になった!", "The %s turns into mud!"), f_name + f_info[get_feat_mimic(c_ptr)].name);
518+ msg_format(_("%sが溶けて泥になった!", "The %s turns into mud!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
519519 obvious = TRUE;
520520 }
521521
@@ -534,7 +534,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
534534 if (!cave_naked_bold(y, x)) break;
535535 if (player_bold(y, x)) break;
536536 cave_set_feat(y, x, feat_door[DOOR_DOOR].closed);
537- if (c_ptr->info & (CAVE_MARK)) obvious = TRUE;
537+ if (g_ptr->info & (CAVE_MARK)) obvious = TRUE;
538538 break;
539539 }
540540
@@ -549,15 +549,15 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
549549 if (!cave_naked_bold(y, x)) break;
550550 if (player_bold(y, x)) break;
551551 cave_set_feat(y, x, feat_tree);
552- if (c_ptr->info & (CAVE_MARK)) obvious = TRUE;
552+ if (g_ptr->info & (CAVE_MARK)) obvious = TRUE;
553553 break;
554554 }
555555
556556 case GF_MAKE_GLYPH:
557557 {
558558 if (!cave_naked_bold(y, x)) break;
559- c_ptr->info |= CAVE_OBJECT;
560- c_ptr->mimic = feat_glyph;
559+ g_ptr->info |= CAVE_OBJECT;
560+ g_ptr->mimic = feat_glyph;
561561 note_spot(y, x);
562562 lite_spot(y, x);
563563 break;
@@ -608,7 +608,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
608608 /* Turn on the light */
609609 if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
610610 {
611- c_ptr->info |= (CAVE_GLOW);
611+ g_ptr->info |= (CAVE_GLOW);
612612 note_spot(y, x);
613613 lite_spot(y, x);
614614 update_local_illumination(y, x);
@@ -618,7 +618,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
618618
619619 /* Mega-Hack -- Update the monster in the affected grid */
620620 /* This allows "spear of light" (etc) to work "correctly" */
621- if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
621+ if (g_ptr->m_idx) update_monster(g_ptr->m_idx, FALSE);
622622
623623 if (p_ptr->special_defense & NINJA_S_STEALTH)
624624 {
@@ -633,7 +633,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
633633 case GF_DARK_WEAK:
634634 case GF_DARK:
635635 {
636- bool do_dark = !p_ptr->inside_battle && !is_mirror_grid(c_ptr);
636+ bool do_dark = !p_ptr->inside_battle && !is_mirror_grid(g_ptr);
637637 int j;
638638
639639 /* Turn off the light. */
@@ -661,13 +661,13 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
661661 if (!do_dark) break;
662662 }
663663
664- c_ptr->info &= ~(CAVE_GLOW);
664+ g_ptr->info &= ~(CAVE_GLOW);
665665
666666 /* Hack -- Forget "boring" grids */
667667 if (!have_flag(f_ptr->flags, FF_REMEMBER))
668668 {
669669 /* Forget */
670- c_ptr->info &= ~(CAVE_MARK);
670+ g_ptr->info &= ~(CAVE_MARK);
671671
672672 note_spot(y, x);
673673 }
@@ -680,7 +680,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
680680
681681 /* Mega-Hack -- Update the monster in the affected grid */
682682 /* This allows "spear of light" (etc) to work "correctly" */
683- if (c_ptr->m_idx) update_monster(c_ptr->m_idx, FALSE);
683+ if (g_ptr->m_idx) update_monster(g_ptr->m_idx, FALSE);
684684 }
685685
686686 /* All done */
@@ -690,7 +690,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
690690 case GF_SHARDS:
691691 case GF_ROCKET:
692692 {
693- if (is_mirror_grid(c_ptr))
693+ if (is_mirror_grid(g_ptr))
694694 {
695695 msg_print(_("鏡が割れた!", "The mirror was crashed!"));
696696 sound(SOUND_GLASS);
@@ -700,9 +700,9 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
700700
701701 if (have_flag(f_ptr->flags, FF_GLASS) && !have_flag(f_ptr->flags, FF_PERMANENT) && (dam >= 50))
702702 {
703- if (known && (c_ptr->info & CAVE_MARK))
703+ if (known && (g_ptr->info & CAVE_MARK))
704704 {
705- msg_format(_("%sが割れた!", "The %s was crashed!"), f_name + f_info[get_feat_mimic(c_ptr)].name);
705+ msg_format(_("%sが割れた!", "The %s was crashed!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
706706 sound(SOUND_GLASS);
707707 }
708708
@@ -717,7 +717,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
717717
718718 case GF_SOUND:
719719 {
720- if (is_mirror_grid(c_ptr) && p_ptr->lev < 40)
720+ if (is_mirror_grid(g_ptr) && p_ptr->lev < 40)
721721 {
722722 msg_print(_("鏡が割れた!", "The mirror was crashed!"));
723723 sound(SOUND_GLASS);
@@ -727,9 +727,9 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
727727
728728 if (have_flag(f_ptr->flags, FF_GLASS) && !have_flag(f_ptr->flags, FF_PERMANENT) && (dam >= 200))
729729 {
730- if (known && (c_ptr->info & CAVE_MARK))
730+ if (known && (g_ptr->info & CAVE_MARK))
731731 {
732- msg_format(_("%sが割れた!", "The %s was crashed!"), f_name + f_info[get_feat_mimic(c_ptr)].name);
732+ msg_format(_("%sが割れた!", "The %s was crashed!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
733733 sound(SOUND_GLASS);
734734 }
735735
@@ -745,7 +745,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
745745 case GF_DISINTEGRATE:
746746 {
747747 /* Destroy mirror/glyph */
748- if (is_mirror_grid(c_ptr) || is_glyph_grid(c_ptr) || is_explosive_rune_grid(c_ptr))
748+ if (is_mirror_grid(g_ptr) || is_glyph_grid(g_ptr) || is_explosive_rune_grid(g_ptr))
749749 remove_mirror(y, x);
750750
751751 /* Permanent features don't get effect */
@@ -797,7 +797,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
797797 */
798798 static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
799799 {
800- grid_type *c_ptr = &grid_array[y][x];
800+ grid_type *g_ptr = &grid_array[y][x];
801801
802802 OBJECT_IDX this_o_idx, next_o_idx = 0;
803803
@@ -819,7 +819,7 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
819819
820820
821821 /* Scan all objects in the grid */
822- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
822+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
823823 {
824824 object_type *o_ptr = &o_list[this_o_idx];
825825
@@ -1177,9 +1177,9 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
11771177 {
11781178 int tmp;
11791179
1180- grid_type *c_ptr = &grid_array[y][x];
1180+ grid_type *g_ptr = &grid_array[y][x];
11811181
1182- monster_type *m_ptr = &m_list[c_ptr->m_idx];
1182+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
11831183 monster_type *caster_ptr = (who > 0) ? &m_list[who] : NULL;
11841184
11851185 monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -1245,11 +1245,11 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
12451245 DEPTH caster_lev = (who > 0) ? r_info[caster_ptr->r_idx].level : (p_ptr->lev * 2);
12461246
12471247 /* Nobody here */
1248- if (!c_ptr->m_idx) return (FALSE);
1248+ if (!g_ptr->m_idx) return (FALSE);
12491249
12501250 /* Never affect projector */
1251- if (who && (c_ptr->m_idx == who)) return (FALSE);
1252- if ((c_ptr->m_idx == p_ptr->riding) && !who && !(typ == GF_OLD_HEAL) && !(typ == GF_OLD_SPEED) && !(typ == GF_STAR_HEAL)) return (FALSE);
1251+ if (who && (g_ptr->m_idx == who)) return (FALSE);
1252+ if ((g_ptr->m_idx == p_ptr->riding) && !who && !(typ == GF_OLD_HEAL) && !(typ == GF_OLD_SPEED) && !(typ == GF_STAR_HEAL)) return (FALSE);
12531253 if (sukekaku && ((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) return FALSE;
12541254
12551255 /* Don't affect already death monsters */
@@ -1266,7 +1266,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
12661266 /* Get the monster possessive ("his"/"her"/"its") */
12671267 monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
12681268
1269- if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
1269+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
12701270
12711271 /* Analyze the damage type */
12721272 switch (typ)
@@ -1791,7 +1791,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
17911791 /* Normal monsters slow down */
17921792 else
17931793 {
1794- if (set_monster_slow(c_ptr->m_idx, MON_SLOW(m_ptr) + 50))
1794+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
17951795 {
17961796 note = _("の動きが遅くなった。", " starts moving slower.");
17971797 }
@@ -1854,7 +1854,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
18541854
18551855 if (!resist_tele) do_dist = 10;
18561856 else do_dist = 0;
1857- if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) do_dist = 0;
1857+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_dist = 0;
18581858
18591859 if (r_ptr->flagsr & RFR_RES_GRAV)
18601860 {
@@ -1875,7 +1875,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
18751875 /* Normal monsters slow down */
18761876 else
18771877 {
1878- if (set_monster_slow(c_ptr->m_idx, MON_SLOW(m_ptr) + 50))
1878+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
18791879 {
18801880 note = _("の動きが遅くなった。", " starts moving slower.");
18811881 }
@@ -2136,7 +2136,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
21362136 }
21372137 if (one_in_(4))
21382138 {
2139- if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) do_dist = 0;
2139+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_dist = 0;
21402140 else do_dist = 7;
21412141 }
21422142
@@ -2430,7 +2430,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
24302430 m_ptr->hp = m_ptr->maxhp;
24312431
24322432 /* Attempt to clone. */
2433- if (multiply_monster(c_ptr->m_idx, TRUE, 0L))
2433+ if (multiply_monster(g_ptr->m_idx, TRUE, 0L))
24342434 {
24352435 note = _("が分裂した!", " spawns!");
24362436 }
@@ -2449,7 +2449,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
24492449 if (seen) obvious = TRUE;
24502450
24512451 /* Wake up */
2452- (void)set_monster_csleep(c_ptr->m_idx, 0);
2452+ (void)set_monster_csleep(g_ptr->m_idx, 0);
24532453
24542454 if (m_ptr->maxhp < m_ptr->max_maxhp)
24552455 {
@@ -2460,8 +2460,8 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
24602460 if (!dam)
24612461 {
24622462 /* Redraw (later) if needed */
2463- if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
2464- if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
2463+ if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
2464+ if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
24652465 break;
24662466 }
24672467
@@ -2472,21 +2472,21 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
24722472 if (seen) obvious = TRUE;
24732473
24742474 /* Wake up */
2475- (void)set_monster_csleep(c_ptr->m_idx, 0);
2475+ (void)set_monster_csleep(g_ptr->m_idx, 0);
24762476 if (MON_STUNNED(m_ptr))
24772477 {
24782478 if (seen_msg) msg_format(_("%^sは朦朧状態から立ち直った。", "%^s is no longer stunned."), m_name);
2479- (void)set_monster_stunned(c_ptr->m_idx, 0);
2479+ (void)set_monster_stunned(g_ptr->m_idx, 0);
24802480 }
24812481 if (MON_CONFUSED(m_ptr))
24822482 {
24832483 if (seen_msg) msg_format(_("%^sは混乱から立ち直った。", "%^s is no longer confused."), m_name);
2484- (void)set_monster_confused(c_ptr->m_idx, 0);
2484+ (void)set_monster_confused(g_ptr->m_idx, 0);
24852485 }
24862486 if (MON_MONFEAR(m_ptr))
24872487 {
24882488 if (seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name);
2489- (void)set_monster_monfear(c_ptr->m_idx, 0);
2489+ (void)set_monster_monfear(g_ptr->m_idx, 0);
24902490 }
24912491
24922492 /* Heal */
@@ -2523,8 +2523,8 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
25232523 }
25242524
25252525 /* Redraw (later) if needed */
2526- if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
2527- if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
2526+ if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
2527+ if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
25282528
25292529 note = _("は体力を回復したようだ。", " looks healthier.");
25302530
@@ -2540,7 +2540,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
25402540 if (seen) obvious = TRUE;
25412541
25422542 /* Speed up */
2543- if (set_monster_fast(c_ptr->m_idx, MON_FAST(m_ptr) + 100))
2543+ if (set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100))
25442544 {
25452545 note = _("の動きが速くなった。", " starts moving faster.");
25462546 }
@@ -2582,7 +2582,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
25822582 /* Normal monsters slow down */
25832583 else
25842584 {
2585- if (set_monster_slow(c_ptr->m_idx, MON_SLOW(m_ptr) + 50))
2585+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
25862586 {
25872587 note = _("の動きが遅くなった。", " starts moving slower.");
25882588 }
@@ -3698,7 +3698,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
36983698 do_conf = randint0(8) + 8;
36993699 do_stun = randint0(8) + 8;
37003700 }
3701- (void)set_monster_slow(c_ptr->m_idx, MON_SLOW(m_ptr) + 10);
3701+ (void)set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 10);
37023702 }
37033703 break;
37043704 }
@@ -3858,14 +3858,14 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
38583858 }
38593859 else if (m_ptr->hp < randint0(nokori_hp))
38603860 {
3861- if (m_ptr->mflag2 & MFLAG2_CHAMELEON) choose_new_monster(c_ptr->m_idx, FALSE, MON_CHAMELEON);
3861+ if (m_ptr->mflag2 & MFLAG2_CHAMELEON) choose_new_monster(g_ptr->m_idx, FALSE, MON_CHAMELEON);
38623862 msg_format(_("%sを捕えた!", "You capture %^s!"), m_name);
38633863 cap_mon = m_ptr->r_idx;
38643864 cap_mspeed = m_ptr->mspeed;
38653865 cap_hp = m_ptr->hp;
38663866 cap_maxhp = m_ptr->max_maxhp;
38673867 cap_nickname = m_ptr->nickname; /* Quark transfer */
3868- if (c_ptr->m_idx == p_ptr->riding)
3868+ if (g_ptr->m_idx == p_ptr->riding)
38693869 {
38703870 if (rakuba(-1, FALSE))
38713871 {
@@ -3873,7 +3873,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
38733873 }
38743874 }
38753875
3876- delete_monster_idx(c_ptr->m_idx);
3876+ delete_monster_idx(g_ptr->m_idx);
38773877
38783878 return (TRUE);
38793879 }
@@ -3941,7 +3941,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
39413941 /* Normal monsters slow down */
39423942 else
39433943 {
3944- if (set_monster_slow(c_ptr->m_idx, MON_SLOW(m_ptr) + 50))
3944+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
39453945 {
39463946 note = _("の動きが遅くなった。", " starts moving slower.");
39473947 }
@@ -4013,7 +4013,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
40134013 break;
40144014 }
40154015
4016- if (genocide_aux(c_ptr->m_idx, dam, !who, (r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
4016+ if (genocide_aux(g_ptr->m_idx, dam, !who, (r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
40174017 {
40184018 if (seen_msg) msg_format(_("%sは消滅した!", "%^s disappered!"), m_name);
40194019 chg_virtue(V_VITALITY, -1);
@@ -4083,7 +4083,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
40834083 if (is_pet(m_ptr))
40844084 {
40854085 note = _("の動きが速くなった。", " starts moving faster.");
4086- (void)set_monster_fast(c_ptr->m_idx, MON_FAST(m_ptr) + 100);
4086+ (void)set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100);
40874087 success = TRUE;
40884088 }
40894089
@@ -4101,7 +4101,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
41014101 {
41024102 note = _("を支配した。", " is tamed!");
41034103 set_pet(m_ptr);
4104- (void)set_monster_fast(c_ptr->m_idx, MON_FAST(m_ptr) + 100);
4104+ (void)set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100);
41054105
41064106 /* Learn about type */
41074107 if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
@@ -4167,7 +4167,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
41674167 /* Quest monsters cannot be polymorphed */
41684168 if (r_ptr->flags1 & RF1_QUESTOR) do_poly = FALSE;
41694169
4170- if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
4170+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
41714171
41724172 /* "Unique" and "quest" monsters can only be "killed" by the player. */
41734173 if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
@@ -4214,7 +4214,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
42144214 }
42154215
42164216 /* Apply stun */
4217- (void)set_monster_stunned(c_ptr->m_idx, tmp);
4217+ (void)set_monster_stunned(g_ptr->m_idx, tmp);
42184218
42194219 /* Get angry */
42204220 get_angry = TRUE;
@@ -4242,7 +4242,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
42424242 }
42434243
42444244 /* Apply confusion */
4245- (void)set_monster_confused(c_ptr->m_idx, tmp);
4245+ (void)set_monster_confused(g_ptr->m_idx, tmp);
42464246
42474247 /* Get angry */
42484248 get_angry = TRUE;
@@ -4283,7 +4283,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
42834283 }
42844284
42854285 /* Hack -- Get new monster */
4286- m_ptr = &m_list[c_ptr->m_idx];
4286+ m_ptr = &m_list[g_ptr->m_idx];
42874287
42884288 /* Hack -- Get new race */
42894289 r_ptr = &r_info[m_ptr->r_idx];
@@ -4299,7 +4299,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
42994299 if (!who) chg_virtue(V_VALOUR, -1);
43004300
43014301 /* Teleport */
4302- teleport_away(c_ptr->m_idx, do_dist,
4302+ teleport_away(g_ptr->m_idx, do_dist,
43034303 (!who ? TELEPORT_DEC_VALOUR : 0L) | TELEPORT_PASSIVE);
43044304
43054305 /* Hack -- get new location */
@@ -4307,14 +4307,14 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
43074307 x = m_ptr->fx;
43084308
43094309 /* Hack -- get new grid */
4310- c_ptr = &grid_array[y][x];
4310+ g_ptr = &grid_array[y][x];
43114311 }
43124312
43134313 /* Fear */
43144314 if (do_fear)
43154315 {
43164316 /* Set fear */
4317- (void)set_monster_monfear(c_ptr->m_idx, MON_MONFEAR(m_ptr) + do_fear);
4317+ (void)set_monster_monfear(g_ptr->m_idx, MON_MONFEAR(m_ptr) + do_fear);
43184318
43194319 /* Get angry */
43204320 get_angry = TRUE;
@@ -4330,11 +4330,11 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
43304330 else if (who)
43314331 {
43324332 /* Redraw (later) if needed */
4333- if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
4334- if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
4333+ if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
4334+ if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
43354335
43364336 /* Wake the monster up */
4337- (void)set_monster_csleep(c_ptr->m_idx, 0);
4337+ (void)set_monster_csleep(g_ptr->m_idx, 0);
43384338
43394339 /* Hurt the monster */
43404340 m_ptr->hp -= dam;
@@ -4364,10 +4364,10 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
43644364 if (who > 0) monster_gain_exp(who, m_ptr->r_idx);
43654365
43664366 /* Generate treasure, etc */
4367- monster_death(c_ptr->m_idx, FALSE);
4367+ monster_death(g_ptr->m_idx, FALSE);
43684368
43694369
4370- delete_monster_idx(c_ptr->m_idx);
4370+ delete_monster_idx(g_ptr->m_idx);
43714371
43724372 if (sad)
43734373 {
@@ -4384,7 +4384,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
43844384 /* Hack -- Pain message */
43854385 else if (see_s_msg)
43864386 {
4387- message_pain(c_ptr->m_idx, dam);
4387+ message_pain(g_ptr->m_idx, dam);
43884388 }
43894389 else
43904390 {
@@ -4392,7 +4392,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
43924392 }
43934393
43944394 /* Hack -- handle sleep */
4395- if (do_sleep) (void)set_monster_csleep(c_ptr->m_idx, do_sleep);
4395+ if (do_sleep) (void)set_monster_csleep(g_ptr->m_idx, do_sleep);
43964396 }
43974397 }
43984398
@@ -4408,7 +4408,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
44084408 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
44094409 }
44104410
4411- delete_monster_idx(c_ptr->m_idx);
4411+ delete_monster_idx(g_ptr->m_idx);
44124412 }
44134413
44144414 /* If the player did it, give him experience, check fear */
@@ -4417,7 +4417,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
44174417 bool fear = FALSE;
44184418
44194419 /* Hurt the monster, check for fear and death */
4420- if (mon_take_hit(c_ptr->m_idx, dam, &fear, note_dies))
4420+ if (mon_take_hit(g_ptr->m_idx, dam, &fear, note_dies))
44214421 {
44224422 /* Dead monster */
44234423 }
@@ -4435,7 +4435,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
44354435 /* Hack -- Pain message */
44364436 else if (known && (dam || !do_fear))
44374437 {
4438- message_pain(c_ptr->m_idx, dam);
4438+ message_pain(g_ptr->m_idx, dam);
44394439 }
44404440
44414441 /* Anger monsters */
@@ -4449,7 +4449,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
44494449 }
44504450
44514451 /* Hack -- handle sleep */
4452- if (do_sleep) (void)set_monster_csleep(c_ptr->m_idx, do_sleep);
4452+ if (do_sleep) (void)set_monster_csleep(g_ptr->m_idx, do_sleep);
44534453 }
44544454 }
44554455
@@ -4482,7 +4482,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
44824482 {
44834483 msg_print(_("空間が歪んだ!", "Space warps about you!"));
44844484
4485- if (m_ptr->r_idx) teleport_away(c_ptr->m_idx, damroll(10, 10), TELEPORT_PASSIVE);
4485+ if (m_ptr->r_idx) teleport_away(g_ptr->m_idx, damroll(10, 10), TELEPORT_PASSIVE);
44864486 if (one_in_(13)) count += activate_hi_summon(ty, tx, TRUE);
44874487 if (!one_in_(6)) break;
44884488 }
@@ -4543,13 +4543,13 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
45434543
45444544 if (p_ptr->inside_battle)
45454545 {
4546- p_ptr->health_who = c_ptr->m_idx;
4546+ p_ptr->health_who = g_ptr->m_idx;
45474547 p_ptr->redraw |= (PR_HEALTH);
45484548 handle_stuff();
45494549 }
45504550
45514551 /* Verify this code */
4552- if (m_ptr->r_idx) update_monster(c_ptr->m_idx, FALSE);
4552+ if (m_ptr->r_idx) update_monster(g_ptr->m_idx, FALSE);
45534553
45544554 /* Redraw the monster grid */
45554555 lite_spot(y, x);
@@ -4576,7 +4576,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
45764576 }
45774577 }
45784578
4579- if (p_ptr->riding && (p_ptr->riding == c_ptr->m_idx) && (dam > 0))
4579+ if (p_ptr->riding && (p_ptr->riding == g_ptr->m_idx) && (dam > 0))
45804580 {
45814581 if (m_ptr->hp > m_ptr->maxhp/3) dam = (dam + 1) / 2;
45824582 rakubadam_m = (dam > 200) ? 200 : dam;
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -38,7 +38,7 @@ static bool detect_feat_flag(POSITION range, int flag, bool known)
3838 {
3939 POSITION x, y;
4040 bool detect = FALSE;
41- grid_type *c_ptr;
41+ grid_type *g_ptr;
4242
4343 if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
4444
@@ -49,7 +49,7 @@ static bool detect_feat_flag(POSITION range, int flag, bool known)
4949 {
5050 int dist = distance(p_ptr->y, p_ptr->x, y, x);
5151 if (dist > range) continue;
52- c_ptr = &grid_array[y][x];
52+ g_ptr = &grid_array[y][x];
5353
5454 /* Hack -- Safe */
5555 if (flag == FF_TRAP)
@@ -57,22 +57,22 @@ static bool detect_feat_flag(POSITION range, int flag, bool known)
5757 /* Mark as detected */
5858 if (dist <= range && known)
5959 {
60- if (dist <= range - 1) c_ptr->info |= (CAVE_IN_DETECT);
60+ if (dist <= range - 1) g_ptr->info |= (CAVE_IN_DETECT);
6161
62- c_ptr->info &= ~(CAVE_UNSAFE);
62+ g_ptr->info &= ~(CAVE_UNSAFE);
6363
6464 lite_spot(y, x);
6565 }
6666 }
6767
6868 /* Detect flags */
69- if (cave_have_flag_grid(c_ptr, flag))
69+ if (cave_have_flag_grid(g_ptr, flag))
7070 {
7171 /* Detect secrets */
7272 disclose_grid(y, x);
7373
7474 /* Hack -- Memorize */
75- c_ptr->info |= (CAVE_MARK);
75+ g_ptr->info |= (CAVE_MARK);
7676
7777 lite_spot(y, x);
7878
@@ -1394,7 +1394,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
13941394 {
13951395 POSITION y, x;
13961396 int k, t;
1397- grid_type *c_ptr;
1397+ grid_type *g_ptr;
13981398 bool flag = FALSE;
13991399
14001400 /* Prevent destruction of quest levels and town */
@@ -1419,18 +1419,18 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
14191419
14201420 /* Stay in the circle of death */
14211421 if (k > r) continue;
1422- c_ptr = &grid_array[y][x];
1422+ g_ptr = &grid_array[y][x];
14231423
14241424 /* Lose room and vault */
1425- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
1425+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14261426
14271427 /* Lose light and knowledge */
1428- c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW | CAVE_KNOWN);
1428+ g_ptr->info &= ~(CAVE_MARK | CAVE_GLOW | CAVE_KNOWN);
14291429
14301430 if (!in_generate) /* Normal */
14311431 {
14321432 /* Lose unsafety */
1433- c_ptr->info &= ~(CAVE_UNSAFE);
1433+ g_ptr->info &= ~(CAVE_UNSAFE);
14341434
14351435 /* Hack -- Notice player affect */
14361436 if (player_bold(y, x))
@@ -1446,9 +1446,9 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
14461446 /* Hack -- Skip the epicenter */
14471447 if ((y == y1) && (x == x1)) continue;
14481448
1449- if (c_ptr->m_idx)
1449+ if (g_ptr->m_idx)
14501450 {
1451- monster_type *m_ptr = &m_list[c_ptr->m_idx];
1451+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
14521452 monster_race *r_ptr = &r_info[m_ptr->r_idx];
14531453
14541454 if (in_generate) /* In generation */
@@ -1462,7 +1462,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
14621462 m_ptr->hp = m_ptr->maxhp;
14631463
14641464 /* Try to teleport away quest monsters */
1465- if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
1465+ if (!teleport_away(g_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
14661466 }
14671467 else
14681468 {
@@ -1485,7 +1485,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
14851485 OBJECT_IDX this_o_idx, next_o_idx = 0;
14861486
14871487 /* Scan all objects in the grid */
1488- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
1488+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
14891489 {
14901490 object_type *o_ptr;
14911491 o_ptr = &o_list[this_o_idx];
@@ -1517,7 +1517,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
15171517 delete_object(y, x);
15181518
15191519 /* Destroy "non-permanent" grids */
1520- if (!cave_perma_grid(c_ptr))
1520+ if (!cave_perma_grid(g_ptr))
15211521 {
15221522 /* Wall (or floor) type */
15231523 t = randint0(200);
@@ -1550,26 +1550,26 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
15501550 if (t < 20)
15511551 {
15521552 /* Create granite wall */
1553- place_extra_grid(c_ptr);
1553+ place_extra_grid(g_ptr);
15541554 }
15551555 else if (t < 70)
15561556 {
15571557 /* Create quartz vein */
1558- c_ptr->feat = feat_quartz_vein;
1558+ g_ptr->feat = feat_quartz_vein;
15591559 }
15601560 else if (t < 100)
15611561 {
15621562 /* Create magma vein */
1563- c_ptr->feat = feat_magma_vein;
1563+ g_ptr->feat = feat_magma_vein;
15641564 }
15651565 else
15661566 {
15671567 /* Create floor */
1568- place_floor_grid(c_ptr);
1568+ place_floor_grid(g_ptr);
15691569 }
15701570
15711571 /* Clear garbage of hidden trap or door */
1572- c_ptr->mimic = 0;
1572+ g_ptr->mimic = 0;
15731573 }
15741574 }
15751575 }
@@ -1590,9 +1590,9 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
15901590
15911591 /* Stay in the circle of death */
15921592 if (k > r) continue;
1593- c_ptr = &grid_array[y][x];
1593+ g_ptr = &grid_array[y][x];
15941594
1595- if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
1595+ if (is_mirror_grid(g_ptr)) g_ptr->info |= CAVE_GLOW;
15961596 else if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
15971597 {
15981598 DIRECTION i;
@@ -1607,7 +1607,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
16071607 cc_ptr = &grid_array[yy][xx];
16081608 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
16091609 {
1610- c_ptr->info |= CAVE_GLOW;
1610+ g_ptr->info |= CAVE_GLOW;
16111611 break;
16121612 }
16131613 }
@@ -1682,7 +1682,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
16821682 int sn = 0;
16831683 POSITION sy = 0, sx = 0;
16841684 bool hurt = FALSE;
1685- grid_type *c_ptr;
1685+ grid_type *g_ptr;
16861686 bool map[32][32];
16871687
16881688 /* Prevent destruction of quest levels and town */
@@ -1717,11 +1717,11 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
17171717
17181718 /* Skip distant grids */
17191719 if (distance(cy, cx, yy, xx) > r) continue;
1720- c_ptr = &grid_array[yy][xx];
1720+ g_ptr = &grid_array[yy][xx];
17211721
17221722 /* Lose room and vault / Lose light and knowledge */
1723- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_UNSAFE);
1724- c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK | CAVE_KNOWN);
1723+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_UNSAFE);
1724+ g_ptr->info &= ~(CAVE_GLOW | CAVE_MARK | CAVE_KNOWN);
17251725
17261726 /* Skip the epicenter */
17271727 if (!dx && !dy) continue;
@@ -1862,14 +1862,14 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
18621862
18631863 /* Skip unaffected grids */
18641864 if (!map[16+yy-cy][16+xx-cx]) continue;
1865- c_ptr = &grid_array[yy][xx];
1865+ g_ptr = &grid_array[yy][xx];
18661866
1867- if (c_ptr->m_idx == p_ptr->riding) continue;
1867+ if (g_ptr->m_idx == p_ptr->riding) continue;
18681868
18691869 /* Process monsters */
1870- if (c_ptr->m_idx)
1870+ if (g_ptr->m_idx)
18711871 {
1872- monster_type *m_ptr = &m_list[c_ptr->m_idx];
1872+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
18731873 monster_race *r_ptr = &r_info[m_ptr->r_idx];
18741874
18751875 /* Quest monsters */
@@ -1935,7 +1935,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
19351935 damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
19361936
19371937 /* Monster is certainly awake */
1938- (void)set_monster_csleep(c_ptr->m_idx, 0);
1938+ (void)set_monster_csleep(g_ptr->m_idx, 0);
19391939
19401940 /* Apply damage directly */
19411941 m_ptr->hp -= damage;
@@ -1946,9 +1946,9 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
19461946 if (!ignore_unview || is_seen(m_ptr))
19471947 msg_format(_("%^sは岩石に埋もれてしまった!", "%^s is embedded in the rock!"), m_name);
19481948
1949- if (c_ptr->m_idx)
1949+ if (g_ptr->m_idx)
19501950 {
1951- if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
1951+ if (record_named_pet && is_pet(&m_list[g_ptr->m_idx]) && m_list[g_ptr->m_idx].nickname)
19521952 {
19531953 char m2_name[MAX_NLEN];
19541954
@@ -2002,7 +2002,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
20022002 /* Skip unaffected grids */
20032003 if (!map[16+yy-cy][16+xx-cx]) continue;
20042004
2005- c_ptr = &grid_array[yy][xx];
2005+ g_ptr = &grid_array[yy][xx];
20062006
20072007 /* Paranoia -- never affect player */
20082008 /* if (player_bold(yy, xx)) continue; */
@@ -2060,9 +2060,9 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
20602060
20612061 /* Skip distant grids */
20622062 if (distance(cy, cx, yy, xx) > r) continue;
2063- c_ptr = &grid_array[yy][xx];
2063+ g_ptr = &grid_array[yy][xx];
20642064
2065- if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
2065+ if (is_mirror_grid(g_ptr)) g_ptr->info |= CAVE_GLOW;
20662066 else if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
20672067 {
20682068 DIRECTION ii;
@@ -2077,7 +2077,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
20772077 cc_ptr = &grid_array[yyy][xxx];
20782078 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
20792079 {
2080- c_ptr->info |= CAVE_GLOW;
2080+ g_ptr->info |= CAVE_GLOW;
20812081 break;
20822082 }
20832083 }
@@ -2196,24 +2196,24 @@ static void cave_temp_room_lite(void)
21962196 POSITION y = temp_y[i];
21972197 POSITION x = temp_x[i];
21982198
2199- grid_type *c_ptr = &grid_array[y][x];
2199+ grid_type *g_ptr = &grid_array[y][x];
22002200
22012201 /* No longer in the array */
2202- c_ptr->info &= ~(CAVE_TEMP);
2202+ g_ptr->info &= ~(CAVE_TEMP);
22032203
22042204 /* Update only non-CAVE_GLOW grids */
2205- /* if (c_ptr->info & (CAVE_GLOW)) continue; */
2205+ /* if (g_ptr->info & (CAVE_GLOW)) continue; */
22062206
22072207 /* Perma-Lite */
2208- c_ptr->info |= (CAVE_GLOW);
2208+ g_ptr->info |= (CAVE_GLOW);
22092209
22102210 /* Process affected monsters */
2211- if (c_ptr->m_idx)
2211+ if (g_ptr->m_idx)
22122212 {
22132213 int chance = 25;
2214- monster_type *m_ptr = &m_list[c_ptr->m_idx];
2214+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
22152215 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2216- update_monster(c_ptr->m_idx, FALSE);
2216+ update_monster(g_ptr->m_idx, FALSE);
22172217
22182218 /* Stupid monsters rarely wake up */
22192219 if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
@@ -2225,7 +2225,7 @@ static void cave_temp_room_lite(void)
22252225 if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
22262226 {
22272227 /* Wake up! */
2228- (void)set_monster_csleep(c_ptr->m_idx, 0);
2228+ (void)set_monster_csleep(g_ptr->m_idx, 0);
22292229
22302230 /* Notice the "waking up" */
22312231 if (m_ptr->ml)
@@ -2271,11 +2271,11 @@ static void cave_temp_room_unlite(void)
22712271 POSITION x = temp_x[i];
22722272 int j;
22732273
2274- grid_type *c_ptr = &grid_array[y][x];
2275- bool do_dark = !is_mirror_grid(c_ptr);
2274+ grid_type *g_ptr = &grid_array[y][x];
2275+ bool do_dark = !is_mirror_grid(g_ptr);
22762276
22772277 /* No longer in the array */
2278- c_ptr->info &= ~(CAVE_TEMP);
2278+ g_ptr->info &= ~(CAVE_TEMP);
22792279
22802280 /* Darken the grid */
22812281 if (do_dark)
@@ -2302,20 +2302,20 @@ static void cave_temp_room_unlite(void)
23022302 if (!do_dark) continue;
23032303 }
23042304
2305- c_ptr->info &= ~(CAVE_GLOW);
2305+ g_ptr->info &= ~(CAVE_GLOW);
23062306
23072307 /* Hack -- Forget "boring" grids */
2308- if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_REMEMBER))
2308+ if (!have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_REMEMBER))
23092309 {
23102310 /* Forget the grid */
2311- if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
2311+ if (!view_torch_grids) g_ptr->info &= ~(CAVE_MARK);
23122312 note_spot(y, x);
23132313 }
23142314
23152315 /* Process affected monsters */
2316- if (c_ptr->m_idx)
2316+ if (g_ptr->m_idx)
23172317 {
2318- update_monster(c_ptr->m_idx, FALSE);
2318+ update_monster(g_ptr->m_idx, FALSE);
23192319 }
23202320
23212321 lite_spot(y, x);
@@ -2402,16 +2402,16 @@ static int next_to_walls_adj(POSITION cy, POSITION cx, bool (*pass_bold)(POSITIO
24022402 */
24032403 static void cave_temp_room_aux(POSITION y, POSITION x, bool only_room, bool (*pass_bold)(POSITION, POSITION))
24042404 {
2405- grid_type *c_ptr;
2405+ grid_type *g_ptr;
24062406
24072407 /* Get the grid */
2408- c_ptr = &grid_array[y][x];
2408+ g_ptr = &grid_array[y][x];
24092409
24102410 /* Avoid infinite recursion */
2411- if (c_ptr->info & (CAVE_TEMP)) return;
2411+ if (g_ptr->info & (CAVE_TEMP)) return;
24122412
24132413 /* Do not "leave" the current room */
2414- if (!(c_ptr->info & (CAVE_ROOM)))
2414+ if (!(g_ptr->info & (CAVE_ROOM)))
24152415 {
24162416 if (only_room) return;
24172417
@@ -2438,7 +2438,7 @@ static void cave_temp_room_aux(POSITION y, POSITION x, bool only_room, bool (*pa
24382438 if (temp_n == TEMP_MAX) return;
24392439
24402440 /* Mark the grid as "seen" */
2441- c_ptr->info |= (CAVE_TEMP);
2441+ g_ptr->info |= (CAVE_TEMP);
24422442
24432443 /* Add it to the "seen" set */
24442444 temp_y[temp_n] = y;
@@ -2891,7 +2891,7 @@ bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int n
28912891 bool teleport_swap(DIRECTION dir)
28922892 {
28932893 POSITION tx, ty;
2894- grid_type* c_ptr;
2894+ grid_type* g_ptr;
28952895 monster_type* m_ptr;
28962896 monster_race* r_ptr;
28972897
@@ -2905,7 +2905,7 @@ bool teleport_swap(DIRECTION dir)
29052905 tx = p_ptr->x + ddx[dir];
29062906 ty = p_ptr->y + ddy[dir];
29072907 }
2908- c_ptr = &grid_array[ty][tx];
2908+ g_ptr = &grid_array[ty][tx];
29092909
29102910 if (p_ptr->anti_tele)
29112911 {
@@ -2913,22 +2913,22 @@ bool teleport_swap(DIRECTION dir)
29132913 return FALSE;
29142914 }
29152915
2916- if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
2916+ if (!g_ptr->m_idx || (g_ptr->m_idx == p_ptr->riding))
29172917 {
29182918 msg_print(_("それとは場所を交換できません。", "You can't trade places with that!"));
29192919 return FALSE;
29202920 }
29212921
2922- if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, p_ptr->y, p_ptr->x) > p_ptr->lev * 3 / 2 + 10))
2922+ if ((g_ptr->info & CAVE_ICKY) || (distance(ty, tx, p_ptr->y, p_ptr->x) > p_ptr->lev * 3 / 2 + 10))
29232923 {
29242924 msg_print(_("失敗した。", "Failed to swap."));
29252925 return FALSE;
29262926 }
29272927
2928- m_ptr = &m_list[c_ptr->m_idx];
2928+ m_ptr = &m_list[g_ptr->m_idx];
29292929 r_ptr = &r_info[m_ptr->r_idx];
29302930
2931- (void)set_monster_csleep(c_ptr->m_idx, 0);
2931+ (void)set_monster_csleep(g_ptr->m_idx, 0);
29322932
29332933 if (r_ptr->flagsr & RFR_RES_TELE)
29342934 {
@@ -4607,7 +4607,7 @@ bool_hack vampirism(void)
46074607 DIRECTION dir;
46084608 POSITION x, y;
46094609 int dummy;
4610- grid_type *c_ptr;
4610+ grid_type *g_ptr;
46114611
46124612 if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
46134613 {
@@ -4619,11 +4619,11 @@ bool_hack vampirism(void)
46194619 if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
46204620 y = p_ptr->y + ddy[dir];
46214621 x = p_ptr->x + ddx[dir];
4622- c_ptr = &grid_array[y][x];
4622+ g_ptr = &grid_array[y][x];
46234623
46244624 stop_mouth();
46254625
4626- if (!(c_ptr->m_idx))
4626+ if (!(g_ptr->m_idx))
46274627 {
46284628 msg_print(_("何もない場所に噛みついた!", "You bite into thin air!"));
46294629 return FALSE;
@@ -4969,8 +4969,8 @@ void hayagake(player_type *creature_ptr)
49694969 }
49704970 else
49714971 {
4972- grid_type *c_ptr = &grid_array[creature_ptr->y][creature_ptr->x];
4973- feature_type *f_ptr = &f_info[c_ptr->feat];
4972+ grid_type *g_ptr = &grid_array[creature_ptr->y][creature_ptr->x];
4973+ feature_type *f_ptr = &f_info[g_ptr->feat];
49744974
49754975 if (!have_flag(f_ptr->flags, FF_PROJECT) ||
49764976 (!creature_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP)))
@@ -5098,17 +5098,17 @@ bool sword_dancing(player_type *creature_ptr)
50985098 DIRECTION dir;
50995099 POSITION y = 0, x = 0;
51005100 int i;
5101- grid_type *c_ptr;
5101+ grid_type *g_ptr;
51025102
51035103 for (i = 0; i < 6; i++)
51045104 {
51055105 dir = randint0(8);
51065106 y = creature_ptr->y + ddy_ddd[dir];
51075107 x = creature_ptr->x + ddx_ddd[dir];
5108- c_ptr = &grid_array[y][x];
5108+ g_ptr = &grid_array[y][x];
51095109
51105110 /* Hack -- attack monsters */
5111- if (c_ptr->m_idx)
5111+ if (g_ptr->m_idx)
51125112 py_attack(y, x, 0);
51135113 else
51145114 {
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -1377,7 +1377,7 @@ void brand_weapon(int brand_type)
13771377 static bool vanish_dungeon(void)
13781378 {
13791379 POSITION y, x;
1380- grid_type *c_ptr;
1380+ grid_type *g_ptr;
13811381 feature_type *f_ptr;
13821382 monster_type *m_ptr;
13831383 GAME_TEXT m_name[MAX_NLEN];
@@ -1393,21 +1393,21 @@ static bool vanish_dungeon(void)
13931393 {
13941394 for (x = 1; x < cur_wid - 1; x++)
13951395 {
1396- c_ptr = &grid_array[y][x];
1396+ g_ptr = &grid_array[y][x];
13971397
13981398 /* Seeing true feature code (ignore mimic) */
1399- f_ptr = &f_info[c_ptr->feat];
1399+ f_ptr = &f_info[g_ptr->feat];
14001400
14011401 /* Lose room and vault */
1402- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
1402+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14031403
1404- m_ptr = &m_list[c_ptr->m_idx];
1404+ m_ptr = &m_list[g_ptr->m_idx];
14051405
14061406 /* Awake monster */
1407- if (c_ptr->m_idx && MON_CSLEEP(m_ptr))
1407+ if (g_ptr->m_idx && MON_CSLEEP(m_ptr))
14081408 {
14091409 /* Reset sleep counter */
1410- (void)set_monster_csleep(c_ptr->m_idx, 0);
1410+ (void)set_monster_csleep(g_ptr->m_idx, 0);
14111411
14121412 /* Notice the "waking up" */
14131413 if (m_ptr->ml)
@@ -1425,68 +1425,68 @@ static bool vanish_dungeon(void)
14251425 /* Special boundary walls -- Top and bottom */
14261426 for (x = 0; x < cur_wid; x++)
14271427 {
1428- c_ptr = &grid_array[0][x];
1429- f_ptr = &f_info[c_ptr->mimic];
1428+ g_ptr = &grid_array[0][x];
1429+ f_ptr = &f_info[g_ptr->mimic];
14301430
14311431 /* Lose room and vault */
1432- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
1432+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14331433
14341434 /* Set boundary mimic if needed */
1435- if (c_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
1435+ if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
14361436 {
1437- c_ptr->mimic = feat_state(c_ptr->mimic, FF_HURT_DISI);
1437+ g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
14381438
14391439 /* Check for change to boring grid */
1440- if (!have_flag(f_info[c_ptr->mimic].flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
1440+ if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
14411441 }
14421442
1443- c_ptr = &grid_array[cur_hgt - 1][x];
1444- f_ptr = &f_info[c_ptr->mimic];
1443+ g_ptr = &grid_array[cur_hgt - 1][x];
1444+ f_ptr = &f_info[g_ptr->mimic];
14451445
14461446 /* Lose room and vault */
1447- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
1447+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14481448
14491449 /* Set boundary mimic if needed */
1450- if (c_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
1450+ if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
14511451 {
1452- c_ptr->mimic = feat_state(c_ptr->mimic, FF_HURT_DISI);
1452+ g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
14531453
14541454 /* Check for change to boring grid */
1455- if (!have_flag(f_info[c_ptr->mimic].flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
1455+ if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
14561456 }
14571457 }
14581458
14591459 /* Special boundary walls -- Left and right */
14601460 for (y = 1; y < (cur_hgt - 1); y++)
14611461 {
1462- c_ptr = &grid_array[y][0];
1463- f_ptr = &f_info[c_ptr->mimic];
1462+ g_ptr = &grid_array[y][0];
1463+ f_ptr = &f_info[g_ptr->mimic];
14641464
14651465 /* Lose room and vault */
1466- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
1466+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14671467
14681468 /* Set boundary mimic if needed */
1469- if (c_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
1469+ if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
14701470 {
1471- c_ptr->mimic = feat_state(c_ptr->mimic, FF_HURT_DISI);
1471+ g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
14721472
14731473 /* Check for change to boring grid */
1474- if (!have_flag(f_info[c_ptr->mimic].flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
1474+ if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
14751475 }
14761476
1477- c_ptr = &grid_array[y][cur_wid - 1];
1478- f_ptr = &f_info[c_ptr->mimic];
1477+ g_ptr = &grid_array[y][cur_wid - 1];
1478+ f_ptr = &f_info[g_ptr->mimic];
14791479
14801480 /* Lose room and vault */
1481- c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
1481+ g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
14821482
14831483 /* Set boundary mimic if needed */
1484- if (c_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
1484+ if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
14851485 {
1486- c_ptr->mimic = feat_state(c_ptr->mimic, FF_HURT_DISI);
1486+ g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
14871487
14881488 /* Check for change to boring grid */
1489- if (!have_flag(f_info[c_ptr->mimic].flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
1489+ if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
14901490 }
14911491 }
14921492
@@ -1505,17 +1505,17 @@ static bool vanish_dungeon(void)
15051505 void call_the_(void)
15061506 {
15071507 int i;
1508- grid_type *c_ptr;
1508+ grid_type *g_ptr;
15091509 bool do_call = TRUE;
15101510
15111511 for (i = 0; i < 9; i++)
15121512 {
1513- c_ptr = &grid_array[p_ptr->y + ddy_ddd[i]][p_ptr->x + ddx_ddd[i]];
1513+ g_ptr = &grid_array[p_ptr->y + ddy_ddd[i]][p_ptr->x + ddx_ddd[i]];
15141514
1515- if (!cave_have_flag_grid(c_ptr, FF_PROJECT))
1515+ if (!cave_have_flag_grid(g_ptr, FF_PROJECT))
15161516 {
1517- if (!c_ptr->mimic || !have_flag(f_info[c_ptr->mimic].flags, FF_PROJECT) ||
1518- !permanent_wall(&f_info[c_ptr->feat]))
1517+ if (!g_ptr->mimic || !have_flag(f_info[g_ptr->mimic].flags, FF_PROJECT) ||
1518+ !permanent_wall(&f_info[g_ptr->feat]))
15191519 {
15201520 do_call = FALSE;
15211521 break;
@@ -1588,7 +1588,7 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
15881588 {
15891589 POSITION ty, tx;
15901590 OBJECT_IDX i;
1591- grid_type *c_ptr;
1591+ grid_type *g_ptr;
15921592 object_type *o_ptr;
15931593 GAME_TEXT o_name[MAX_NLEN];
15941594
@@ -1611,17 +1611,17 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
16111611 return;
16121612 }
16131613
1614- c_ptr = &grid_array[ty][tx];
1614+ g_ptr = &grid_array[ty][tx];
16151615
16161616 /* We need an item to fetch */
1617- if (!c_ptr->o_idx)
1617+ if (!g_ptr->o_idx)
16181618 {
16191619 msg_print(_("そこには何もありません。", "There is no object at this place."));
16201620 return;
16211621 }
16221622
16231623 /* No fetching from vault */
1624- if (c_ptr->info & CAVE_ICKY)
1624+ if (g_ptr->info & CAVE_ICKY)
16251625 {
16261626 msg_print(_("アイテムがコントロールを外れて落ちた。", "The item slips from your control."));
16271627 return;
@@ -1650,15 +1650,15 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
16501650 {
16511651 ty += ddy[dir];
16521652 tx += ddx[dir];
1653- c_ptr = &grid_array[ty][tx];
1653+ g_ptr = &grid_array[ty][tx];
16541654
16551655 if ((distance(p_ptr->y, p_ptr->x, ty, tx) > MAX_RANGE) ||
16561656 !cave_have_flag_bold(ty, tx, FF_PROJECT)) return;
16571657 }
1658- while (!c_ptr->o_idx);
1658+ while (!g_ptr->o_idx);
16591659 }
16601660
1661- o_ptr = &o_list[c_ptr->o_idx];
1661+ o_ptr = &o_list[g_ptr->o_idx];
16621662
16631663 if (o_ptr->weight > wgt)
16641664 {
@@ -1667,8 +1667,8 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
16671667 return;
16681668 }
16691669
1670- i = c_ptr->o_idx;
1671- c_ptr->o_idx = o_ptr->next_o_idx;
1670+ i = g_ptr->o_idx;
1671+ g_ptr->o_idx = o_ptr->next_o_idx;
16721672 grid_array[p_ptr->y][p_ptr->x].o_idx = i; /* 'move' it */
16731673
16741674 o_ptr->next_o_idx = 0;
@@ -4141,18 +4141,18 @@ static MONRACE_IDX poly_r_idx(MONRACE_IDX r_idx)
41414141 */
41424142 bool polymorph_monster(POSITION y, POSITION x)
41434143 {
4144- grid_type *c_ptr = &grid_array[y][x];
4145- monster_type *m_ptr = &m_list[c_ptr->m_idx];
4144+ grid_type *g_ptr = &grid_array[y][x];
4145+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
41464146 bool polymorphed = FALSE;
41474147 MONRACE_IDX new_r_idx;
41484148 MONRACE_IDX old_r_idx = m_ptr->r_idx;
4149- bool targeted = (target_who == c_ptr->m_idx) ? TRUE : FALSE;
4150- bool health_tracked = (p_ptr->health_who == c_ptr->m_idx) ? TRUE : FALSE;
4149+ bool targeted = (target_who == g_ptr->m_idx) ? TRUE : FALSE;
4150+ bool health_tracked = (p_ptr->health_who == g_ptr->m_idx) ? TRUE : FALSE;
41514151 monster_type back_m;
41524152
41534153 if (p_ptr->inside_arena || p_ptr->inside_battle) return (FALSE);
41544154
4155- if ((p_ptr->riding == c_ptr->m_idx) || (m_ptr->mflag2 & MFLAG2_KAGE)) return (FALSE);
4155+ if ((p_ptr->riding == g_ptr->m_idx) || (m_ptr->mflag2 & MFLAG2_KAGE)) return (FALSE);
41564156
41574157 /* Memorize the monster before polymorphing */
41584158 back_m = *m_ptr;
@@ -4176,7 +4176,7 @@ bool polymorph_monster(POSITION y, POSITION x)
41764176 m_ptr->hold_o_idx = 0;
41774177
41784178 /* "Kill" the "old" monster */
4179- delete_monster_idx(c_ptr->m_idx);
4179+ delete_monster_idx(g_ptr->m_idx);
41804180
41814181 /* Create a new monster (no groups) */
41824182 if (place_monster_aux(0, y, x, new_r_idx, mode))
@@ -4579,7 +4579,7 @@ bool eat_magic(int power)
45794579 void massacre(void)
45804580 {
45814581 POSITION x, y;
4582- grid_type *c_ptr;
4582+ grid_type *g_ptr;
45834583 monster_type *m_ptr;
45844584 DIRECTION dir;
45854585
@@ -4587,11 +4587,11 @@ void massacre(void)
45874587 {
45884588 y = p_ptr->y + ddy_ddd[dir];
45894589 x = p_ptr->x + ddx_ddd[dir];
4590- c_ptr = &grid_array[y][x];
4591- m_ptr = &m_list[c_ptr->m_idx];
4590+ g_ptr = &grid_array[y][x];
4591+ m_ptr = &m_list[g_ptr->m_idx];
45924592
45934593 /* Hack -- attack monsters */
4594- if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
4594+ if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
45954595 py_attack(y, x, 0);
45964596 }
45974597 }
@@ -4599,16 +4599,16 @@ void massacre(void)
45994599 bool eat_lock(void)
46004600 {
46014601 POSITION x, y;
4602- grid_type *c_ptr;
4602+ grid_type *g_ptr;
46034603 feature_type *f_ptr, *mimic_f_ptr;
46044604 DIRECTION dir;
46054605
46064606 if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
46074607 y = p_ptr->y + ddy[dir];
46084608 x = p_ptr->x + ddx[dir];
4609- c_ptr = &grid_array[y][x];
4610- f_ptr = &f_info[c_ptr->feat];
4611- mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
4609+ g_ptr = &grid_array[y][x];
4610+ f_ptr = &f_info[g_ptr->feat];
4611+ mimic_f_ptr = &f_info[get_feat_mimic(g_ptr)];
46124612
46134613 stop_mouth();
46144614
@@ -4620,9 +4620,9 @@ bool eat_lock(void)
46204620 {
46214621 msg_format(_("いてっ!この%sはあなたの歯より硬い!", "Ouch! This %s is harder than your teeth!"), f_name + mimic_f_ptr->name);
46224622 }
4623- else if (c_ptr->m_idx)
4623+ else if (g_ptr->m_idx)
46244624 {
4625- monster_type *m_ptr = &m_list[c_ptr->m_idx];
4625+ monster_type *m_ptr = &m_list[g_ptr->m_idx];
46264626 msg_print(_("何かが邪魔しています!", "There's something in the way!"));
46274627
46284628 if (!m_ptr->ml || !is_pet(m_ptr)) py_attack(y, x, 0);
--- a/src/store.c
+++ b/src/store.c
@@ -5749,7 +5749,7 @@ void do_cmd_store(void)
57495749 int which;
57505750 int maintain_num;
57515751 int i;
5752- grid_type *c_ptr;
5752+ grid_type *g_ptr;
57535753 bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
57545754 TERM_LEN w, h;
57555755
@@ -5761,17 +5761,17 @@ void do_cmd_store(void)
57615761 store_bottom = MIN_STOCK + xtra_stock;
57625762
57635763 /* Access the player grid */
5764- c_ptr = &grid_array[p_ptr->y][p_ptr->x];
5764+ g_ptr = &grid_array[p_ptr->y][p_ptr->x];
57655765
57665766 /* Verify a store */
5767- if (!cave_have_flag_grid(c_ptr, FF_STORE))
5767+ if (!cave_have_flag_grid(g_ptr, FF_STORE))
57685768 {
57695769 msg_print(_("ここには店がありません。", "You see no store here."));
57705770 return;
57715771 }
57725772
57735773 /* Extract the store code */
5774- which = f_info[c_ptr->feat].subtype;
5774+ which = f_info[g_ptr->feat].subtype;
57755775
57765776 old_town_num = p_ptr->town_num;
57775777 if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
@@ -5821,7 +5821,7 @@ void do_cmd_store(void)
58215821 cur_store_num = which;
58225822
58235823 /* Hack -- save the store feature */
5824- cur_store_feat = c_ptr->feat;
5824+ cur_store_feat = g_ptr->feat;
58255825
58265826 /* Save the store and owner pointers */
58275827 st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
--- a/src/trap.c
+++ b/src/trap.c
@@ -82,17 +82,17 @@ FEAT_IDX choose_random_trap(void)
8282 */
8383 void disclose_grid(POSITION y, POSITION x)
8484 {
85- grid_type *c_ptr = &grid_array[y][x];
85+ grid_type *g_ptr = &grid_array[y][x];
8686
87- if (cave_have_flag_grid(c_ptr, FF_SECRET))
87+ if (cave_have_flag_grid(g_ptr, FF_SECRET))
8888 {
8989 /* No longer hidden */
9090 cave_alter_feat(y, x, FF_SECRET);
9191 }
92- else if (c_ptr->mimic)
92+ else if (g_ptr->mimic)
9393 {
9494 /* No longer hidden */
95- c_ptr->mimic = 0;
95+ g_ptr->mimic = 0;
9696
9797 note_spot(y, x);
9898 lite_spot(y, x);
@@ -111,7 +111,7 @@ void disclose_grid(POSITION y, POSITION x)
111111 */
112112 void place_trap(POSITION y, POSITION x)
113113 {
114- grid_type *c_ptr = &grid_array[y][x];
114+ grid_type *g_ptr = &grid_array[y][x];
115115
116116 /* Paranoia -- verify location */
117117 if (!in_bounds(y, x)) return;
@@ -120,8 +120,8 @@ void place_trap(POSITION y, POSITION x)
120120 if (!cave_clean_bold(y, x)) return;
121121
122122 /* Place an invisible trap */
123- c_ptr->mimic = c_ptr->feat;
124- c_ptr->feat = choose_random_trap();
123+ g_ptr->mimic = g_ptr->feat;
124+ g_ptr->feat = choose_random_trap();
125125 }
126126
127127
@@ -303,8 +303,8 @@ void hit_trap(bool break_trap)
303303 POSITION x = p_ptr->x, y = p_ptr->y;
304304
305305 /* Get the grid */
306- grid_type *c_ptr = &grid_array[y][x];
307- feature_type *f_ptr = &f_info[c_ptr->feat];
306+ grid_type *g_ptr = &grid_array[y][x];
307+ feature_type *f_ptr = &f_info[g_ptr->feat];
308308 int trap_feat_type = have_flag(f_ptr->flags, FF_TRAP) ? f_ptr->subtype : NOT_TRAP;
309309 concptr name = _("トラップ", "a trap");
310310
@@ -565,7 +565,7 @@ void hit_trap(bool break_trap)
565565 }
566566 }
567567
568- if (break_trap && is_trap(c_ptr->feat))
568+ if (break_trap && is_trap(g_ptr->feat))
569569 {
570570 cave_alter_feat(y, x, FF_DISARM);
571571 msg_print(_("トラップを粉砕した。", "You destroyed the trap."));
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -1695,9 +1695,9 @@ void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
16951695 int i;
16961696
16971697 for(i=0;i<temp_n;i++){
1698- grid_type* c_ptr = &grid_array[temp_y[i]][temp_x[i]];
1699- if(!c_ptr->m_idx || !m_list[c_ptr->m_idx].ml)continue;//no mons or cannot look
1700- m_ptr = &m_list[c_ptr->m_idx];
1698+ grid_type* g_ptr = &grid_array[temp_y[i]][temp_x[i]];
1699+ if(!g_ptr->m_idx || !m_list[g_ptr->m_idx].ml)continue;//no mons or cannot look
1700+ m_ptr = &m_list[g_ptr->m_idx];
17011701 if(is_pet(m_ptr))continue;//pet
17021702 if(!m_ptr->r_idx)continue;//dead?
17031703 {
--- a/src/wild.c
+++ b/src/wild.c
@@ -449,7 +449,7 @@ static border_type border;
449449 void wilderness_gen(void)
450450 {
451451 int i, y, x, lim;
452- grid_type *c_ptr;
452+ grid_type *g_ptr;
453453 feature_type *f_ptr;
454454
455455 /* Big town */
@@ -567,41 +567,41 @@ void wilderness_gen(void)
567567 for (x = 0; x < cur_wid; x++)
568568 {
569569 /* Get the grid */
570- c_ptr = &grid_array[y][x];
570+ g_ptr = &grid_array[y][x];
571571
572572 if (is_daytime())
573573 {
574574 /* Assume lit */
575- c_ptr->info |= (CAVE_GLOW);
575+ g_ptr->info |= (CAVE_GLOW);
576576
577577 /* Hack -- Memorize lit grids if allowed */
578- if (view_perma_grids) c_ptr->info |= (CAVE_MARK);
578+ if (view_perma_grids) g_ptr->info |= (CAVE_MARK);
579579 }
580580 else
581581 {
582582 /* Feature code (applying "mimic" field) */
583- f_ptr = &f_info[get_feat_mimic(c_ptr)];
583+ f_ptr = &f_info[get_feat_mimic(g_ptr)];
584584
585- if (!is_mirror_grid(c_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
585+ if (!is_mirror_grid(g_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
586586 !have_flag(f_ptr->flags, FF_ENTRANCE))
587587 {
588588 /* Assume dark */
589- c_ptr->info &= ~(CAVE_GLOW);
589+ g_ptr->info &= ~(CAVE_GLOW);
590590
591591 /* Darken "boring" features */
592592 if (!have_flag(f_ptr->flags, FF_REMEMBER))
593593 {
594594 /* Forget the grid */
595- c_ptr->info &= ~(CAVE_MARK);
595+ g_ptr->info &= ~(CAVE_MARK);
596596 }
597597 }
598598 else if (have_flag(f_ptr->flags, FF_ENTRANCE))
599599 {
600600 /* Assume lit */
601- c_ptr->info |= (CAVE_GLOW);
601+ g_ptr->info |= (CAVE_GLOW);
602602
603603 /* Hack -- Memorize lit grids if allowed */
604- if (view_perma_grids) c_ptr->info |= (CAVE_MARK);
604+ if (view_perma_grids) g_ptr->info |= (CAVE_MARK);
605605 }
606606 }
607607 }
@@ -614,16 +614,16 @@ void wilderness_gen(void)
614614 for (x = 0; x < cur_wid; x++)
615615 {
616616 /* Get the grid */
617- c_ptr = &grid_array[y][x];
617+ g_ptr = &grid_array[y][x];
618618
619619 /* Seeing true feature code (ignore mimic) */
620- f_ptr = &f_info[c_ptr->feat];
620+ f_ptr = &f_info[g_ptr->feat];
621621
622622 if (have_flag(f_ptr->flags, FF_BLDG))
623623 {
624624 if ((f_ptr->subtype == 4) || ((p_ptr->town_num == 1) && (f_ptr->subtype == 0)))
625625 {
626- if (c_ptr->m_idx) delete_monster_idx(c_ptr->m_idx);
626+ if (g_ptr->m_idx) delete_monster_idx(g_ptr->m_idx);
627627 p_ptr->oldpy = (s16b)y;
628628 p_ptr->oldpx = (s16b)x;
629629 }
@@ -640,11 +640,11 @@ void wilderness_gen(void)
640640 for (x = 0; x < cur_wid; x++)
641641 {
642642 /* Get the grid */
643- c_ptr = &grid_array[y][x];
643+ g_ptr = &grid_array[y][x];
644644
645- if (cave_have_flag_grid(c_ptr, FF_ENTRANCE))
645+ if (cave_have_flag_grid(g_ptr, FF_ENTRANCE))
646646 {
647- if (c_ptr->m_idx) delete_monster_idx(c_ptr->m_idx);
647+ if (g_ptr->m_idx) delete_monster_idx(g_ptr->m_idx);
648648 p_ptr->oldpy = (s16b)y;
649649 p_ptr->oldpx = (s16b)x;
650650 }
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -1573,7 +1573,7 @@ static void do_cmd_wiz_create_feature(void)
15731573 {
15741574 static int prev_feat = 0;
15751575 static int prev_mimic = 0;
1576- grid_type *c_ptr;
1576+ grid_type *g_ptr;
15771577 feature_type *f_ptr;
15781578 char tmp_val[160];
15791579 IDX tmp_feat, tmp_mimic;
@@ -1581,7 +1581,7 @@ static void do_cmd_wiz_create_feature(void)
15811581
15821582 if (!tgt_pt(&x, &y)) return;
15831583
1584- c_ptr = &grid_array[y][x];
1584+ g_ptr = &grid_array[y][x];
15851585
15861586 /* Default */
15871587 sprintf(tmp_val, "%d", prev_feat);
@@ -1606,15 +1606,15 @@ static void do_cmd_wiz_create_feature(void)
16061606 else if (tmp_mimic >= max_f_idx) tmp_mimic = max_f_idx - 1;
16071607
16081608 cave_set_feat(y, x, tmp_feat);
1609- c_ptr->mimic = (s16b)tmp_mimic;
1609+ g_ptr->mimic = (s16b)tmp_mimic;
16101610
1611- f_ptr = &f_info[get_feat_mimic(c_ptr)];
1611+ f_ptr = &f_info[get_feat_mimic(g_ptr)];
16121612
16131613 if (have_flag(f_ptr->flags, FF_GLYPH) ||
16141614 have_flag(f_ptr->flags, FF_MINOR_GLYPH))
1615- c_ptr->info |= (CAVE_OBJECT);
1615+ g_ptr->info |= (CAVE_OBJECT);
16161616 else if (have_flag(f_ptr->flags, FF_MIRROR))
1617- c_ptr->info |= (CAVE_GLOW | CAVE_OBJECT);