OSDN Git Service

[Refactor] #37353 汎用的なポインタ命名 c_ptr を g_ptr に改名。 / Rename c_ptr, common pointer naming...
[hengband/hengband.git] / src / save.c
index 5a14299..d7b1e86 100644 (file)
@@ -851,8 +851,8 @@ static void wr_extra(void)
 
 
 /*!
- * @brief フロア保存時のcave情報テンプレートをソートするための比較処理
- * @param u caveテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid_array情報テンプレートをソートするための比較処理
+ * @param u grid_arrayテンプレートの参照ポインタ
  * @param v 未使用
  * @param a スワップするモンスター種族のID1
  * @param b スワップするモンスター種族のID2
@@ -873,8 +873,8 @@ static bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b)
 
 
 /*!
- * @brief フロア保存時のcave情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
- * @param u caveテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u grid_arrayテンプレートの参照ポインタ
  * @param v 未使用
  * @param a スワップするモンスター種族のID1
  * @param b スワップするモンスター種族のID2
@@ -973,14 +973,14 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        {
                for (x = 0; x < cur_wid; x++)
                {
-                       grid_type *c_ptr = &cave[y][x];
+                       grid_type *g_ptr = &grid_array[y][x];
 
                        for (i = 0; i < num_temp; i++)
                        {
-                               if (templates[i].info == c_ptr->info &&
-                                   templates[i].feat == c_ptr->feat &&
-                                   templates[i].mimic == c_ptr->mimic &&
-                                   templates[i].special == c_ptr->special)
+                               if (templates[i].info == g_ptr->info &&
+                                   templates[i].feat == g_ptr->feat &&
+                                   templates[i].mimic == g_ptr->mimic &&
+                                   templates[i].special == g_ptr->special)
                                {
                                        /* Same terrain is exist */
                                        templates[i].occurrence++;
@@ -1004,10 +1004,10 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
                        }
 
                        /* Add new template */
-                       templates[num_temp].info = c_ptr->info;
-                       templates[num_temp].feat = c_ptr->feat;
-                       templates[num_temp].mimic = c_ptr->mimic;
-                       templates[num_temp].special = c_ptr->special;
+                       templates[num_temp].info = g_ptr->info;
+                       templates[num_temp].feat = g_ptr->feat;
+                       templates[num_temp].mimic = g_ptr->mimic;
+                       templates[num_temp].special = g_ptr->special;
                        templates[num_temp].occurrence = 1;
 
                        /* Increase number of template */
@@ -1042,25 +1042,25 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
 
 
-       /*** "Run-Length-Encoding" of cave ***/
+       /*** "Run-Length-Encoding" of grid_array ***/
 
        /* Note that this will induce two wasted bytes */
        count = 0;
        prev_u16b = 0;
 
-       /* Dump the cave */
+       /* Dump the grid_array */
        for (y = 0; y < cur_hgt; y++)
        {
                for (x = 0; x < cur_wid; x++)
                {
-                       grid_type *c_ptr = &cave[y][x];
+                       grid_type *g_ptr = &grid_array[y][x];
 
                        for (i = 0; i < num_temp; i++)
                        {
-                               if (templates[i].info == c_ptr->info &&
-                                   templates[i].feat == c_ptr->feat &&
-                                   templates[i].mimic == c_ptr->mimic &&
-                                   templates[i].special == c_ptr->special)
+                               if (templates[i].info == g_ptr->info &&
+                                   templates[i].feat == g_ptr->feat &&
+                                   templates[i].mimic == g_ptr->mimic &&
+                                   templates[i].special == g_ptr->special)
                                        break;
                        }