OSDN Git Service

[Refactor] #39077 IDX の *_IDX への移行。
[hengband/hengband.git] / src / floor-generate.c
index 6462f6c..be76c6c 100644 (file)
 #include "grid.h"
 #include "rooms.h"
 #include "floor-streams.h"
+#include "floor-generate.h"
 #include "trap.h"
 #include "monster.h"
 #include "quest.h"
 #include "player-status.h"
 #include "wild.h"
+#include "monster-status.h"
 
 int dun_tun_rnd; 
 int dun_tun_chg;
@@ -170,7 +172,7 @@ static bool alloc_stairs_aux(POSITION y, POSITION x, int walls)
  * @param walls 最低減隣接させたい外壁の数
  * @return 規定数通りに生成に成功したらTRUEを返す。
  */
-static bool alloc_stairs(IDX feat, int num, int walls)
+static bool alloc_stairs(FEAT_IDX feat, int num, int walls)
 {
        int i;
        int shaft_num = 0;
@@ -205,8 +207,6 @@ static bool alloc_stairs(IDX feat, int num, int walls)
                if ((current_floor_ptr->dun_level < d_info[p_ptr->dungeon_idx].maxdepth-1) && !quest_number(current_floor_ptr->dun_level+1))
                        shaft_num = (randint1(num)+1)/2;
        }
-
-       /* Paranoia */
        else return FALSE;
 
 
@@ -1175,7 +1175,7 @@ static void generate_gambling_arena(void)
        {
                monster_type *m_ptr = &current_floor_ptr->m_list[i];
 
-               if (!m_ptr->r_idx) continue;
+               if (!monster_is_valid(m_ptr)) continue;
 
                m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
                update_monster(i, FALSE);
@@ -1590,8 +1590,6 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
                        tmp_col = col1 + col_dir;
                }
 
-
-               /* Access the location */
                g_ptr = &current_floor_ptr->grid_array[tmp_row][tmp_col];
 
                /* Avoid "solid" walls */