OSDN Git Service

[Refactor] #39076 "grid_array" の 置換処理で誤ったコメントを修正/削除. / Fix and delete wrong replaced...
authordeskull <deskull@users.sourceforge.jp>
Mon, 23 Dec 2019 10:47:52 +0000 (19:47 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 23 Dec 2019 10:49:33 +0000 (19:49 +0900)
21 files changed:
src/core.c
src/dungeon-file.c
src/floor-generate.c
src/floor-save.c
src/floor.h
src/geometry.h
src/grid.h
src/init.c
src/load.c
src/monster-process.c
src/monster2.c
src/player-inventory.c
src/rooms-city.c
src/rooms-fractal.c
src/rooms-vault.c
src/rooms.c
src/rooms.h
src/save.c
src/sort.c
src/spells3.c
src/view-mainwindow.c

index 6222510..9800117 100644 (file)
@@ -5624,7 +5624,6 @@ void play_game(bool new_game)
                /* Handle "quit and save" */
                if (!p_ptr->playing && !p_ptr->is_dead) break;
 
-               /* Erase the old p_ptr->current_floor_ptr->grid_array */
                wipe_o_list(p_ptr->current_floor_ptr);
                if (!p_ptr->is_dead) wipe_m_list();
 
index ba121a8..9bfb8db 100644 (file)
@@ -3926,7 +3926,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
                return parse_line_feature(buf);
        }
 
-       /* Process "D:<dungeon>" -- info for the p_ptr->current_floor_ptr->grid_array grids */
+       /* Process "D:<dungeon>" -- info for the floor grids */
        else if (buf[0] == 'D')
        {
                object_type object_type_body;
index d57612f..979342d 100644 (file)
@@ -1310,7 +1310,7 @@ static bool level_gen(floor_type *floor_ptr, concptr *why)
 }
 
 /*!
- * @brief フロアに存在する全マスの記憶状態を初期化する / Wipe all unnecessary flags after p_ptr->current_floor_ptr->grid_array generation
+ * @brief フロアに存在する全マスの記憶状態を初期化する / Wipe all unnecessary flags after grid_array generation
  * @return なし
  */
 void wipe_generate_random_floor_flags(floor_type *floor_ptr)
@@ -1340,7 +1340,7 @@ void wipe_generate_random_floor_flags(floor_type *floor_ptr)
 }
 
 /*!
- * @brief フロアの全情報を初期化する / Clear and empty the p_ptr->current_floor_ptr->grid_array
+ * @brief フロアの全情報を初期化する / Clear and empty floor.
  * @return なし
  */
 void clear_cave(floor_type *floor_ptr)
index 06e3c4d..4b07ad2 100644 (file)
@@ -1096,7 +1096,7 @@ void leave_floor(player_type *creature_ptr)
  * @return なし
  * @details
  * If the floor is an old saved floor, it will be\n
- * restored from the temporal file.  If the floor is new one, new p_ptr->current_floor_ptr->grid_array\n
+ * restored from the temporal file.  If the floor is new one, new floor\n
  * will be generated.\n
  */
 void change_floor(player_type *creature_ptr)
index e41bab1..de90330 100644 (file)
 #define MON_LITE_MAX 1536
 
 /*!
- * @brief 視界処理配列サイズ / Maximum size of the "view" array (see "p_ptr->current_floor_ptr->grid_array.c")
+ * @brief 視界処理配列サイズ / Maximum size of the "view" array
  * @details Note that the "view radius" will NEVER exceed 20, and even if the "view"
  * was octagonal, we would never require more than 1520 entries in the array.
  */
 #define VIEW_MAX 1536
 
 /*!
- * @brief 再描画処理用配列サイズ / Maximum size of the "redraw" array (see "p_ptr->current_floor_ptr->grid_array.c")
+ * @brief 再描画処理用配列サイズ / Maximum size of the "redraw" array
  * @details We must be large for proper functioning of delayed redrawing.
  * We must also be as large as two times of the largest view area.
  * Note that maximum view grids are 1149 entries.
index 2a594d0..f213f2d 100644 (file)
@@ -43,7 +43,7 @@ extern bool player_can_see_bold(POSITION y, POSITION x);
 extern bool no_lite(void);
 
 /*!
- * @brief 視界及び光源の過渡処理配列サイズ / Maximum size of the "temp" array (see "p_ptr->current_floor_ptr->grid_array.c")
+ * @brief 視界及び光源の過渡処理配列サイズ / Maximum size of the "temp" array
  * @details We must be as large as "VIEW_MAX" and "LITE_MAX" for proper functioning
  * of "update_view()" and "update_lite()".  We must also be as large as the
  * largest illuminatable room, but no room is larger than 800 grids.  We
index 829a08f..f5ddb22 100644 (file)
@@ -18,7 +18,7 @@
  /*
   * A single "grid" in a Cave
   *
-  * Note that several aspects of the code restrict the actual p_ptr->current_floor_ptr->grid_array
+  * Note that several aspects of the code restrict the actual grid
   * to a max size of 256 by 256.  In partcular, locations are often
   * saved as bytes, limiting each coordinate to the 0-255 range.
   *
@@ -47,13 +47,13 @@ typedef struct grid_type grid_type;
 
 struct grid_type
 {
-       BIT_FLAGS info;         /* Hack -- p_ptr->current_floor_ptr->grid_array flags */
+       BIT_FLAGS info;         /* Hack -- grid flags */
 
        FEAT_IDX feat;          /* Hack -- feature type */
        OBJECT_IDX o_idx;               /* Object in this grid */
        MONSTER_IDX m_idx;              /* Monster in this grid */
 
-       /*! 地形の特別な情報を保存する / Special p_ptr->current_floor_ptr->grid_array info
+       /*! 地形の特別な情報を保存する / Special grid info
         * 具体的な使用一覧はクエスト行き階段の移行先クエストID、
         * 各ダンジョン入口の移行先ダンジョンID、
         *
@@ -79,9 +79,6 @@ typedef struct
        u16b occurrence;
 } grid_template_type;
 
-/* This should not be used */
-/*#define set_cave_info(Y,X,I)    (p_ptr->current_floor_ptr->grid_array[(Y)][(X)].info = (I)) */
-
 #define feat_locked_door_random(DOOR_TYPE) \
        (feat_door[(DOOR_TYPE)].num_locked ? \
         feat_door[(DOOR_TYPE)].locked[randint0(feat_door[(DOOR_TYPE)].num_locked)] : feat_none)
@@ -332,7 +329,7 @@ typedef struct
 #define CAVE_MNLT       0x0100    /*!< モンスターの光源によって照らされている / Illuminated by monster */
 #define CAVE_MNDK       0x8000    /*!< モンスターの暗源によって暗闇になっている / Darken by monster */
 
- /* Used only while p_ptr->current_floor_ptr->grid_array generation */
+ /* Used only while floor generation */
 #define CAVE_FLOOR      0x0200 /*!< フロア属性のあるマス */
 #define CAVE_EXTRA      0x0400
 #define CAVE_INNER      0x0800
@@ -341,7 +338,7 @@ typedef struct
 #define CAVE_VAULT      0x4000
 #define CAVE_MASK (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID | CAVE_VAULT)
 
-/* Used only after p_ptr->current_floor_ptr->grid_array generation */
+/* Used only after floor generation */
 #define CAVE_KNOWN      0x0200    /* Directly viewed or map detected flag */
 #define CAVE_NOTE       0x0400    /* Flag for delayed visual update (needs note_spot()) */
 #define CAVE_REDRAW     0x0800    /* Flag for delayed visual update (needs lite_spot()) */
index b6c7481..73550b7 100644 (file)
@@ -1239,10 +1239,8 @@ static errr init_other(void)
        /* Allocate and Wipe the max dungeon level */
        C_MAKE(max_dlv, current_world_ptr->max_d_idx, DEPTH);
 
-       /* Allocate and wipe each line of the p_ptr->current_floor_ptr->grid_array */
        for (i = 0; i < MAX_HGT; i++)
        {
-               /* Allocate one row of the p_ptr->current_floor_ptr->grid_array */
                C_MAKE(p_ptr->current_floor_ptr->grid_array[i], MAX_WID, grid_type);
        }
 
index 745bd76..f66476e 100644 (file)
@@ -2644,7 +2644,6 @@ static errr rd_dungeon_old(void)
                /* Apply the RLE info */
                for (i = count; i > 0; i--)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        /* Extract "info" */
@@ -2675,7 +2674,6 @@ static errr rd_dungeon_old(void)
                /* Apply the RLE info */
                for (i = count; i > 0; i--)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        /* Extract "feat" */
@@ -2705,7 +2703,6 @@ static errr rd_dungeon_old(void)
                /* Apply the RLE info */
                for (i = count; i > 0; i--)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        /* Extract "mimic" */
@@ -2735,7 +2732,6 @@ static errr rd_dungeon_old(void)
                /* Apply the RLE info */
                for (i = count; i > 0; i--)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        /* Extract "feat" */
@@ -2753,7 +2749,6 @@ static errr rd_dungeon_old(void)
                }
        }
 
-       /* Convert p_ptr->current_floor_ptr->grid_array data */
        if (z_older_than(11, 0, 99))
        {
                for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
@@ -2767,7 +2762,6 @@ static errr rd_dungeon_old(void)
        {
                for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        /* Very old */
@@ -2790,7 +2784,6 @@ static errr rd_dungeon_old(void)
        {
                for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        /* Old CAVE_IN_MIRROR flag */
@@ -2830,7 +2823,6 @@ static errr rd_dungeon_old(void)
        {
                for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        if ((g_ptr->special == OLD_QUEST_WATER_CAVE) && !p_ptr->current_floor_ptr->dun_level)
@@ -3120,10 +3112,7 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
                /* Apply the RLE info */
                for (i = count; i > 0; i--)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
-
-                       /* Extract p_ptr->current_floor_ptr->grid_array data */
                        g_ptr->info = templates[id].info;
                        g_ptr->feat = templates[id].feat;
                        g_ptr->mimic = templates[id].mimic;
@@ -3146,7 +3135,6 @@ static errr rd_saved_floor(saved_floor_type *sf_ptr)
        {
                for (y = 0; y < ymax; y++) for (x = 0; x < xmax; x++)
                {
-                       /* Access the p_ptr->current_floor_ptr->grid_array */
                        grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
                        if ((g_ptr->special == OLD_QUEST_WATER_CAVE) && !p_ptr->current_floor_ptr->dun_level)
index 8af0a28..74e7e2f 100644 (file)
@@ -544,9 +544,6 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
                /* Ignore locations off of edge */
                if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) continue;
 
-               /* Don't move toward player */
-               /* if (p_ptr->current_floor_ptr->grid_array[y][x].dist < 3) continue; */ /* Hmm.. Need it? */
-
                /* Calculate distance of this grid from our destination */
                dis = distance(y, x, y1, x1);
 
index 399514c..c0cde20 100644 (file)
@@ -220,7 +220,6 @@ static void compact_monsters_aux(MONSTER_IDX i1, MONSTER_IDX i2)
        /* Cave grid */
        g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
-       /* Update the p_ptr->current_floor_ptr->grid_array */
        g_ptr->m_idx = i2;
 
        /* Repair objects being carried by monster */
index 0fee20b..542a50b 100644 (file)
@@ -1644,7 +1644,7 @@ object_type *choose_object(player_type *creature_ptr, OBJECT_IDX *idx, concptr q
  * @param mode オプションフラグ
  * @return 対象のマスに落ちているアイテム数
  * @details
- * Return a list of o_list[] indexes of items at the given p_ptr->current_floor_ptr->grid_array
+ * Return a list of o_list[] indexes of items at the given floor
  * location. Valid flags are:
  *
  *             mode & 0x01 -- Item tester
index 9514db7..920a18f 100644 (file)
@@ -184,7 +184,7 @@ static void build_stores(POSITION ltcy, POSITION ltcx, int stores[], int n)
 * Town logic flow for generation of new town\n
 * Originally from Vanilla 3.0.3\n
 *\n
-* We start with a fully wiped p_ptr->current_floor_ptr->grid_array of normal floors.\n
+* We start with a fully wiped grids of normal floors.\n
 *\n
 * Note that town_gen_hack() plays games with the R.N.G.\n
 *\n
index f414ae0..dc443f7 100644 (file)
@@ -7,7 +7,7 @@
 #include "dungeon.h"
 
 /*!
-* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal p_ptr->current_floor_ptr->grid_array system
+* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal grid
 * @return なし
 */
 bool build_type9(floor_type *floor_ptr)
index 9537e91..5a1523c 100644 (file)
@@ -217,7 +217,7 @@ static void build_room_vault(floor_type *floor_ptr, POSITION x0, POSITION y0, PO
 }
 
 
-/* Create a random vault out of a fractal p_ptr->current_floor_ptr->grid_array */
+/* Create a random vault out of a fractal grid */
 static void build_cave_vault(floor_type *floor_ptr, POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
 {
        int grd, roug, cutoff;
index 7bb2fad..bea505e 100644 (file)
@@ -570,7 +570,7 @@ static void store_height(floor_type *floor_ptr, POSITION x, POSITION y, FEAT_IDX
 *
 * How fractal caves are made:
 *
-* When the map is complete, a cut-off value is used to create a p_ptr->current_floor_ptr->grid_array.
+* When the map is complete, a cut-off value is used to create a floor.
 * Heights below this value are "floor", and heights above are "wall".
 * This also can be used to create lakes, by adding more height levels
 * representing shallow and deep water/ lava etc.
@@ -578,7 +578,7 @@ static void store_height(floor_type *floor_ptr, POSITION x, POSITION y, FEAT_IDX
 * The grd variable affects the width of passages.
 * The roug variable affects the roughness of those passages
 *
-* The tricky part is making sure the created p_ptr->current_floor_ptr->grid_array is connected.  This
+* The tricky part is making sure the created floor is connected.  This
 * is done by 'filling' from the inside and only keeping the 'filled'
 * floor.  Walls bounding the 'filled' floor are also kept.  Everything
 * else is converted to the normal _extra_.
@@ -586,7 +586,7 @@ static void store_height(floor_type *floor_ptr, POSITION x, POSITION y, FEAT_IDX
 
 
 /*
- *  Note that this uses the p_ptr->current_floor_ptr->grid_array.feat array in a very hackish way
+ *  Note that this uses the floor array in a very hackish way
  *  the values are first set to zero, and then each array location
  *  is used as a "heightmap"
  *  The heightmap then needs to be converted back into the "feat" format.
@@ -594,7 +594,7 @@ static void store_height(floor_type *floor_ptr, POSITION x, POSITION y, FEAT_IDX
  *  grd=level at which fractal turns on.  smaller gives more mazelike caves
  *  roug=roughness level.  16=normal.  higher values make things more convoluted
  *    small values are good for smooth walls.
- *  size=length of the side of the square p_ptr->current_floor_ptr->grid_array system.
+ *  size=length of the side of the square grid system.
  */
 void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff)
 {
@@ -1323,7 +1323,7 @@ bool generate_lake(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsi
 
 
 /*
- * makes a lake/collapsed p_ptr->current_floor_ptr->grid_array system in the center of the dungeon
+ * makes a lake/collapsed floor in the center of the dungeon
  */
 void build_lake(floor_type *floor_ptr, int type)
 {
index 846b9bc..0439b71 100644 (file)
@@ -36,7 +36,7 @@
 #define ROOM_T_PIT            5         /*!<部屋型ID:モンスターPIT / Monster pit (33x11) */
 #define ROOM_T_LESSER_VAULT   6         /*!<部屋型ID:小型VAULT / Lesser vault (33x22) */
 #define ROOM_T_GREATER_VAULT  7         /*!<部屋型ID:大型VAULT / Greater vault (66x44) */
-#define ROOM_T_FRACAVE        8         /*!<部屋型ID:フラクタル地形 / Fractal p_ptr->current_floor_ptr->grid_array (42x24) */
+#define ROOM_T_FRACAVE        8         /*!<部屋型ID:フラクタル地形 / Fractal room (42x24) */
 #define ROOM_T_RANDOM_VAULT   9         /*!<部屋型ID:ランダムVAULT / Random vault (44x22) */
 #define ROOM_T_OVAL          10         /*!<部屋型ID:円形部屋 / Circular rooms (22x22) */
 #define ROOM_T_CRYPT         11         /*!<部屋型ID:聖堂 / Crypts (22x22) */
index 6c9a524..367f300 100644 (file)
@@ -1006,13 +1006,12 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
 
 
-       /*** "Run-Length-Encoding" of p_ptr->current_floor_ptr->grid_array ***/
+       /*** "Run-Length-Encoding" of floor ***/
 
        /* Note that this will induce two wasted bytes */
        count = 0;
        prev_u16b = 0;
 
-       /* Dump the p_ptr->current_floor_ptr->grid_array */
        for (y = 0; y < p_ptr->current_floor_ptr->height; y++)
        {
                for (x = 0; x < p_ptr->current_floor_ptr->width; x++)
index 386e521..5de9fe9 100644 (file)
@@ -521,8 +521,8 @@ bool ang_sort_comp_pet_dismiss(vptr u, vptr v, int a, int b)
 
 
 /*!
- * @brief フロア保存時のp_ptr->current_floor_ptr->grid_array情報テンプレートをソートするための比較処理
- * @param u p_ptr->current_floor_ptr->grid_arrayテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid情報テンプレートをソートするための比較処理
+ * @param u gridテンプレートの参照ポインタ
  * @param v 未使用
  * @param a スワップするモンスター種族のID1
  * @param b スワップするモンスター種族のID2
@@ -543,8 +543,8 @@ bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b)
 
 
 /*!
- * @brief フロア保存時のp_ptr->current_floor_ptr->grid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
- * @param u p_ptr->current_floor_ptr->grid_arrayテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u gridテンプレートの参照ポインタ
  * @param v 未使用
  * @param a スワップするモンスター種族のID1
  * @param b スワップするモンスター種族のID2
index 315d61c..2bc58d5 100644 (file)
@@ -224,9 +224,6 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power,
 
                        if (!cave_monster_teleportable_bold(m_idx, ny, nx, mode)) continue;
 
-                       /* No teleporting into vaults and such */
-                       /* if (p_ptr->current_floor_ptr->grid_array[ny][nx].info & (CAVE_ICKY)) continue; */
-
                        /* This grid looks good */
                        look = FALSE;
 
index 0e4d665..d9cdac9 100644 (file)
@@ -2781,7 +2781,7 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
  * not any.  If there were, they would have to set "shimmer_objects"\n
  * when they were created, and then new "shimmer" code in "dungeon.c"\n
  * would have to be created handle the "shimmer" effect, and the code\n
- * in "p_ptr->current_floor_ptr->grid_array.c" would have to be updated to create the shimmer effect.\n
+ * in floor would have to be updated to create the shimmer effect.\n
  *\n
  * Note the effects of hallucination.  Objects always appear as random\n
  * "objects", monsters as random "monsters", and normal grids occasionally\n
@@ -2870,7 +2870,6 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
  */
 void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
 {
-       /* Get the p_ptr->current_floor_ptr->grid_array */
        grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
        OBJECT_IDX this_o_idx, next_o_idx = 0;