#define REDRAW_MAX 2298
-typedef struct {
+typedef struct floor_type {
DUNGEON_IDX dungeon_idx;
grid_type *grid_array[MAX_HGT];
DEPTH dun_level; /*!< 現在の実ダンジョン階層 base_level の参照元となる / Current dungeon level */
(have_flag(f_info[(F)].flags, FF_LOS))
-/*
- * Determine if a "legal" grid supports "los"
- */
-#define cave_los_bold(F,Y,X) \
- (feat_supports_los((F)->grid_array[(Y)][(X)].feat))
-
#define cave_los_grid(C) \
(feat_supports_los((C)->feat))
/*
- * Determine if a "legal" grid is an "empty" floor grid
- * Determine if monsters are allowed to move into a grid
- *
- * Line 1 -- forbid non-placement grids
- * Line 2 -- forbid normal monsters
- * Line 3 -- forbid the player
- */
-#define cave_empty_bold(F,Y,X) \
- (cave_have_flag_bold((F), (Y), (X), FF_PLACE) && \
- !((F)->grid_array[Y][X].m_idx) && \
- !player_bold(p_ptr, Y,X))
-
-
-/*
- * Determine if a "legal" grid is an "empty" floor grid
- * Determine if monster generation is allowed in a grid
- *
- * Line 1 -- forbid non-empty grids
- * Line 2 -- forbid trees while dungeon generation
- */
-#define cave_empty_bold2(F,Y,X) \
- (cave_empty_bold(F,Y,X) && \
- (current_world_ptr->character_dungeon || !cave_have_flag_bold((F), (Y), (X), FF_TREE)))
-
-
-/*
* Determine if a "legal" grid is an "naked" floor grid
*
* Line 1 -- forbid non-clean gird
/*
- * Grid based version of "cave_empty_bold()"
- */
-#define cave_empty_grid(C) \
- (cave_have_flag_grid((C), FF_PLACE) && \
- !((C)->m_idx) && !player_grid(p_ptr, C))
-
-
-/*
* Grid based version of "cave_perma_bold()"
*/
#define cave_perma_grid(C) \
(cave_have_flag_grid((C), FF_PERMANENT))
-#define pattern_tile(Y,X) \
- (cave_have_flag_bold(p_ptr->current_floor_ptr, (Y), (X), FF_PATTERN))
-
/*
* Does the grid stop disintegration?
*/
#define GRID_X(G) \
((int)((G) % 256U))
+extern bool pattern_tile(floor_type *floor_ptr, POSITION y, POSITION x);
+extern bool is_cave_empty_bold(player_type *player_ptr, POSITION x, POSITION y);
+extern bool is_cave_empty_bold2(player_type *player_ptr, POSITION x, POSITION y);
extern void update_smell(floor_type *floor_ptr, player_type *subject_ptr);
extern void add_door(player_type *player_ptr, POSITION x, POSITION y);
#define PROJECT_LOS 0x8000 /*!< 遠隔攻撃特性: / */
extern sint project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
-extern void set_floor(floor_type *floor_ptr, POSITION x, POSITION y);
+extern void set_floor(player_type *player_ptr, POSITION x, POSITION y);
extern void place_object(player_type *owner_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
-extern void place_gold(floor_type *floor_ptr, POSITION y, POSITION x);
-extern void delete_monster(floor_type *floor_ptr, POSITION y, POSITION x);
+extern void place_gold(player_type *player_ptr, POSITION y, POSITION x);
+extern void delete_monster(player_type *player_ptr, POSITION y, POSITION x);
extern void compact_objects(player_type *owner_ptr, int size);
extern void vault_traps(player_type *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
extern void scatter(player_type *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
+
+extern bool cave_los_bold(floor_type *floor_ptr, POSITION y, POSITION x);