* included in all such copies.
*/
+#include "spell/spells-util.h"
/*
* A single "grid" in a Cave
* Note the special fields for the "MONSTER_FLOW" code.
*/
-typedef struct player_type player_type; // TODO: Delete Finally.
-
typedef struct grid_type grid_type;
struct grid_type
extern void place_bound_perm_wall(player_type *player_ptr, grid_type *g_ptr);
-extern bool is_known_trap(grid_type *g_ptr);
-extern bool is_hidden_door(grid_type *g_ptr);
+extern bool is_known_trap(player_type *player_ptr, grid_type *g_ptr);
+extern bool is_hidden_door(player_type *player_ptr, grid_type *g_ptr);
extern bool is_mirror_grid(grid_type *g_ptr);
extern bool is_glyph_grid(grid_type *g_ptr);
extern bool is_explosive_rune_grid(grid_type *g_ptr);
*/
#define feat_uses_special(F) (have_flag(f_info[(F)].flags, FF_SPECIAL))
-/* grids.c */
+/*!
+ * grids.c
+ * ここにfloor_type を引数として加えるとコンパイルエラー
+ */
extern POSITION distance(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern void update_local_illumination(player_type *creature_ptr, POSITION y, POSITION x);
extern bool no_lite(player_type *creature_ptr);
extern void note_spot(player_type *player_ptr, POSITION y, POSITION x);
extern void lite_spot(player_type *player_ptr, POSITION y, POSITION x);
extern void update_flow(player_type *subject_ptr);
-extern FEAT_IDX feat_state(FEAT_IDX feat, int action);
+extern FEAT_IDX feat_state(player_type *player_ptr, FEAT_IDX feat, int action);
extern void cave_alter_feat(player_type *player_ptr, POSITION y, POSITION x, int action);
extern void remove_mirror(player_type *caster_ptr, POSITION y, POSITION x);
-extern bool is_open(FEAT_IDX feat);
+extern bool is_open(player_type *player_ptr, FEAT_IDX feat);
extern bool check_local_illumination(player_type *creature_ptr, POSITION y, POSITION x);
-extern bool cave_monster_teleportable_bold(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
-extern bool cave_player_teleportable_bold(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
+extern bool cave_monster_teleportable_bold(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode);
+extern bool cave_player_teleportable_bold(player_type *player_ptr, POSITION y, POSITION x, teleport_flags mode);
-typedef enum grid_bold_type
+typedef enum
{
- floor,
- extra,
- extra_perm,
- inner,
- inner_perm,
- outer,
- outer_noperm,
- solid,
- solid_perm,
- solid_noperm
+ GB_FLOOR,
+ GB_EXTRA,
+ GB_EXTRA_PERM,
+ GB_INNER,
+ GB_INNER_PERM,
+ GB_OUTER,
+ GB_OUTER_NOPERM,
+ GB_SOLID,
+ GB_SOLID_PERM,
+ GB_SOLID_NOPERM
} grid_bold_type;
extern void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);