*/
#include "angband.h"
-#include "generate.h"
+#include "util.h"
+#include "bldg.h"
+
+#include "cmd-dump.h"
#include "grid.h"
#include "rooms.h"
+#include "dungeon.h"
+#include "floor.h"
+#include "floor-save.h"
#include "floor-streams.h"
+#include "floor-generate.h"
+#include "floor-events.h"
+#include "floor-generate.h"
+#include "feature.h"
#include "trap.h"
#include "monster.h"
#include "quest.h"
#include "player-status.h"
#include "wild.h"
+#include "monster-status.h"
+#include "dungeon-file.h"
+#include "init.h"
+#include "feature.h"
+#include "spells.h"
int dun_tun_rnd;
int dun_tun_chg;
* @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;
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;
POSITION y, x;
dun_data dun_body;
+ current_floor_ptr->lite_n = 0;
+ current_floor_ptr->mon_lite_n = 0;
+ current_floor_ptr->redraw_n = 0;
+ current_floor_ptr->view_n = 0;
+
/* Global data */
dun = &dun_body;
int tunnel_fail_count = 0;
/*
- * Build each type of room in turn until we cannot build any more.
+ * Build each type of room in current_world_ptr->game_turn until we cannot build any more.
*/
if (!generate_rooms()) return FALSE;
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(¤t_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 = ¤t_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);
int i;
/* Very simplified version of wipe_o_list() */
- (void)C_WIPE(current_floor_ptr->o_list, o_max, object_type);
- o_max = 1;
- o_cnt = 0;
+ (void)C_WIPE(current_floor_ptr->o_list, current_floor_ptr->o_max, object_type);
+ current_floor_ptr->o_max = 1;
+ current_floor_ptr->o_cnt = 0;
/* 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[] */
/* Prevent object over-flow */
- if (o_max >= current_floor_ptr->max_o_idx)
+ if (current_floor_ptr->o_max >= current_floor_ptr->max_o_idx)
{
why = _("アイテムが多すぎる", "too many objects");
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;
tmp_col = col1 + col_dir;
}
-
- /* Access the location */
g_ptr = ¤t_floor_ptr->grid_array[tmp_row][tmp_col];
/* Avoid "solid" walls */