OSDN Git Service

[Refactor] #38993 cur_wid/hgt を floor_type に取り込み width/heightに改名。 / Move cur_wid...
[hengband/hengband.git] / src / save.c
index 36db872..7719d33 100644 (file)
@@ -851,8 +851,8 @@ static void wr_extra(void)
 
 
 /*!
- * @brief フロア保存時のcurrent_floor->grid_array情報テンプレートをソートするための比較処理
- * @param u current_floor->grid_arrayテンプレートの参照ポインタ
+ * @brief フロア保存時のcurrent_floor_ptr->grid_array情報テンプレートをソートするための比較処理
+ * @param u current_floor_ptr->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 フロア保存時のcurrent_floor->grid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
- * @param u current_floor->grid_arrayテンプレートの参照ポインタ
+ * @brief フロア保存時のcurrent_floor_ptr->grid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u current_floor_ptr->grid_arrayテンプレートの参照ポインタ
  * @param v 未使用
  * @param a スワップするモンスター種族のID1
  * @param b スワップするモンスター種族のID2
@@ -924,7 +924,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        {
                /*** Not a saved floor ***/
 
-               wr_s16b((s16b)dun_level);
+               wr_s16b((s16b)current_floor_ptr->dun_level);
        }
        else
        {
@@ -939,12 +939,12 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
                wr_s16b(sf_ptr->lower_floor_id);
        }
 
-       wr_u16b((u16b)current_floor->base_level);
+       wr_u16b((u16b)current_floor_ptr->base_level);
        wr_u16b((s16b)num_repro);
        wr_u16b((u16b)p_ptr->y);
        wr_u16b((u16b)p_ptr->x);
-       wr_u16b((u16b)cur_hgt);
-       wr_u16b((u16b)cur_wid);
+       wr_u16b((u16b)current_floor_ptr->height);
+       wr_u16b((u16b)current_floor_ptr->width);
        wr_byte(p_ptr->feeling);
 
 
@@ -969,11 +969,11 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        C_MAKE(templates, max_num_temp, cave_template_type);
 
        /* Extract template array */
-       for (y = 0; y < cur_hgt; y++)
+       for (y = 0; y < current_floor_ptr->height; y++)
        {
-               for (x = 0; x < cur_wid; x++)
+               for (x = 0; x < current_floor_ptr->width; x++)
                {
-                       grid_type *g_ptr = &current_floor->grid_array[y][x];
+                       grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
 
                        for (i = 0; i < num_temp; i++)
                        {
@@ -1042,18 +1042,18 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
 
 
-       /*** "Run-Length-Encoding" of current_floor->grid_array ***/
+       /*** "Run-Length-Encoding" of current_floor_ptr->grid_array ***/
 
        /* Note that this will induce two wasted bytes */
        count = 0;
        prev_u16b = 0;
 
-       /* Dump the current_floor->grid_array */
-       for (y = 0; y < cur_hgt; y++)
+       /* Dump the current_floor_ptr->grid_array */
+       for (y = 0; y < current_floor_ptr->height; y++)
        {
-               for (x = 0; x < cur_wid; x++)
+               for (x = 0; x < current_floor_ptr->width; x++)
                {
-                       grid_type *g_ptr = &current_floor->grid_array[y][x];
+                       grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
 
                        for (i = 0; i < num_temp; i++)
                        {