OSDN Git Service

[Refactor] #919 Moved grid_cost() and grid_dist() from grid.cpp/h to grid-type-defini...
[hengbandforosx/hengbandosx.git] / src / grid / grid.h
1 #pragma once
2
3 /*!
4  * @file grid.h
5  * @brief ダンジョンの生成処理の基幹部分ヘッダーファイル
6  * @date 2014/08/15
7  * @details
8  * Purpose: header file for grid.c, used only in dungeon generation
9  * files (generate.c, rooms.c)
10  * @author
11  * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
12  * This software may be copied and distributed for educational, research, and
13  * not for profit purposes provided that this copyright and statement are
14  * included in all such copies.
15  */
16
17 #include "system/angband.h"
18 #include "object/object-index-list.h"
19 #include "spell/spells-util.h"
20
21 /*  A structure type for terrain template of saving dungeon floor */
22 struct grid_template_type {
23     BIT_FLAGS info;
24     FEAT_IDX feat;
25     FEAT_IDX mimic;
26     s16b special;
27     u16b occurrence;
28 };
29
30 enum grid_bold_type {
31     GB_FLOOR,
32     GB_EXTRA,
33     GB_EXTRA_PERM,
34     GB_INNER,
35     GB_INNER_PERM,
36     GB_OUTER,
37     GB_OUTER_NOPERM,
38     GB_SOLID,
39     GB_SOLID_PERM,
40     GB_SOLID_NOPERM
41 };
42
43 struct floor_type;
44 struct grid_type;
45 struct player_type;
46 struct monster_race;
47 bool new_player_spot(player_type *creature_ptr);
48 bool is_hidden_door(player_type *player_ptr, grid_type *g_ptr);
49 bool player_can_enter(player_type *creature_ptr, FEAT_IDX feature, BIT_FLAGS16 mode);
50 bool feat_uses_special(FEAT_IDX f_idx);
51 void update_local_illumination(player_type *creature_ptr, POSITION y, POSITION x);
52 bool no_lite(player_type *creature_ptr);
53 void print_rel(player_type *subject_ptr, SYMBOL_CODE c, TERM_COLOR a, POSITION y, POSITION x);
54 void note_spot(player_type *player_ptr, POSITION y, POSITION x);
55 void lite_spot(player_type *player_ptr, POSITION y, POSITION x);
56 void update_flow(player_type *subject_ptr);
57 FEAT_IDX feat_state(floor_type *floor_ptr, FEAT_IDX feat, int action);
58 void cave_alter_feat(player_type *player_ptr, POSITION y, POSITION x, int action);
59 void remove_mirror(player_type *caster_ptr, POSITION y, POSITION x);
60 bool is_open(player_type *player_ptr, FEAT_IDX feat);
61 bool check_local_illumination(player_type *creature_ptr, POSITION y, POSITION x);
62 bool cave_monster_teleportable_bold(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode);
63 bool cave_player_teleportable_bold(player_type *player_ptr, POSITION y, POSITION x, teleport_flags mode);
64 void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);
65 bool darkened_grid(player_type *player_ptr, grid_type *g_ptr);
66 void delete_monster(player_type *player_ptr, POSITION y, POSITION x);
67 void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
68 void set_cave_feat(floor_type *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx);
69 void add_cave_info(floor_type *floor_ptr, POSITION y, POSITION x, int cave_mask);
70 FEAT_IDX get_feat_mimic(grid_type *g_ptr);
71 int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(player_type *, FEAT_IDX), bool under);
72 void cave_lite_hack(floor_type *floor_ptr, POSITION y, POSITION x);
73 void cave_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
74 void cave_note_and_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
75 void cave_view_hack(floor_type *floor_ptr, POSITION y, POSITION x);