OSDN Git Service

[Refactor] #38993 m_cnt, m_max を floor_type 構造体に取り込み.
[hengband/hengband.git] / src / floor-generate.c
index 976020a..3b27579 100644 (file)
@@ -1183,7 +1183,7 @@ static void generate_gambling_arena(void)
                place_monster_aux(0, p_ptr->y + 8 + (i/2)*4, p_ptr->x - 2 + (i%2)*4, battle_mon[i], (PM_NO_KAGE | PM_NO_PET));
                set_friendly(&current_floor_ptr->m_list[current_floor_ptr->grid_array[p_ptr->y+8+(i/2)*4][p_ptr->x-2+(i%2)*4].m_idx]);
        }
-       for(i = 1; i < m_max; i++)
+       for(i = 1; i < current_floor_ptr->m_max; i++)
        {
                monster_type *m_ptr = &current_floor_ptr->m_list[i];
 
@@ -1337,9 +1337,9 @@ void clear_cave(void)
        /* Very simplified version of wipe_m_list() */
        for (i = 1; i < max_r_idx; i++)
                r_info[i].cur_num = 0;
-       (void)C_WIPE(current_floor_ptr->m_list, m_max, monster_type);
-       m_max = 1;
-       m_cnt = 0;
+       (void)C_WIPE(current_floor_ptr->m_list, current_floor_ptr->m_max, monster_type);
+       current_floor_ptr->m_max = 1;
+       current_floor_ptr->m_cnt = 0;
        for (i = 0; i < MAX_MTIMED; i++) current_floor_ptr->mproc_max[i] = 0;
 
        /* Pre-calc cur_num of pets in party_mon[] */
@@ -1441,7 +1441,7 @@ void generate_random_floor(void)
                        okay = FALSE;
                }
                /* Prevent monster over-flow */
-               else if (m_max >= current_floor_ptr->max_m_idx)
+               else if (current_floor_ptr->m_max >= current_floor_ptr->max_m_idx)
                {
                        why = _("モンスターが多すぎる", "too many monsters");
                        okay = FALSE;