*/
#include "angband.h"
+#include "floor.h"
#include "generate.h"
#include "grid.h"
+#include "monster.h"
+#include "quest.h"
-static s16b new_floor_id; /*!<次のフロアのID / floor_id of the destination */
+static FLOOR_IDX new_floor_id; /*!<次のフロアのID / floor_id of the destination */
static u32b change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
static u32b latest_visit_mark; /*!<フロアを渡った回数?(確認中) / Max number of visit_mark */
* @details
* If number of saved floors are already MAX_SAVED_FLOORS, kill the oldest one.
*/
-s16b get_new_floor_id(void)
+FLOOR_IDX get_new_floor_id(void)
{
saved_floor_type *sf_ptr = NULL;
- s16b i;
+ FLOOR_IDX i;
/* Look for empty space */
for (i = 0; i < MAX_SAVED_FLOORS; i++)
p_ptr->floor_id = get_new_floor_id();
}
-
/* Search the quest monster index */
for (i = 0; i < max_q_idx; i++)
{
if (change_floor_mode & (CFM_DOWN | CFM_UP))
{
/* Reset to floor */
- c_ptr->feat = floor_type[randint0(100)];
+ c_ptr->feat = feat_ground_type[randint0(100)];
}
c_ptr->special = 0;
/* Maintain monsters and artifacts */
if (loaded)
{
- IDX i;
- s32b tmp_last_visit = sf_ptr->last_visit;
- s32b absence_ticks;
+ MONSTER_IDX i;
+ GAME_TURN tmp_last_visit = sf_ptr->last_visit;
+ GAME_TURN absence_ticks;
int alloc_chance = d_info[dungeon_type].max_m_alloc_chance;
- int alloc_times;
+ GAME_TURN alloc_times;
while (tmp_last_visit > turn) tmp_last_visit -= TURNS_PER_TICK * TOWN_DAWN;
absence_ticks = (turn - tmp_last_visit) / TURNS_PER_TICK;
}
/* You see stairs blocked */
- else if ((change_floor_mode & CFM_NO_RETURN) &&
- (change_floor_mode & (CFM_DOWN | CFM_UP)))
+ else if ((change_floor_mode & CFM_NO_RETURN) && (change_floor_mode & (CFM_DOWN | CFM_UP)))
{
if (!p_ptr->blind)
{
bool up = TRUE;
bool down = TRUE;
- s16b dest_floor_id = 0;
+ FLOOR_IDX dest_floor_id = 0;
/* Forbid up staircases on Ironman mode */
/* Remove old stairs */
c_ptr->special = 0;
- cave_set_feat(y, x, floor_type[randint0(100)]);
+ cave_set_feat(y, x, feat_ground_type[randint0(100)]);
}
}
}