OSDN Git Service

[Refactor] ブレスのコピペを低減
[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 "object/object-index-list.h"
18 #include "spell/spells-util.h"
19 #include "system/angband.h"
20
21 enum class AttributeType;
22
23 /*  A structure type for terrain template of saving dungeon floor */
24 struct grid_template_type {
25     BIT_FLAGS info;
26     FEAT_IDX feat;
27     FEAT_IDX mimic;
28     int16_t special;
29     uint16_t occurrence;
30 };
31
32 enum grid_bold_type {
33     GB_FLOOR,
34     GB_EXTRA,
35     GB_EXTRA_PERM,
36     GB_INNER,
37     GB_INNER_PERM,
38     GB_OUTER,
39     GB_OUTER_NOPERM,
40     GB_SOLID,
41     GB_SOLID_PERM,
42     GB_SOLID_NOPERM
43 };
44
45 struct floor_type;
46 struct grid_type;
47 class PlayerType;
48 struct monster_race;
49 enum class FloorFeatureType;
50 bool new_player_spot(PlayerType *player_ptr);
51 bool is_hidden_door(PlayerType *player_ptr, grid_type *g_ptr);
52 bool player_can_enter(PlayerType *player_ptr, FEAT_IDX feature, BIT_FLAGS16 mode);
53 bool feat_uses_special(FEAT_IDX f_idx);
54 void update_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x);
55 bool no_lite(PlayerType *player_ptr);
56 void print_rel(PlayerType *player_ptr, char c, TERM_COLOR a, POSITION y, POSITION x);
57 void print_bolt_pict(PlayerType *player_ptr, POSITION y, POSITION x, POSITION ny, POSITION nx, AttributeType typ);
58 void note_spot(PlayerType *player_ptr, POSITION y, POSITION x);
59 void lite_spot(PlayerType *player_ptr, POSITION y, POSITION x);
60 void update_flow(PlayerType *player_ptr);
61 FEAT_IDX feat_state(floor_type *floor_ptr, FEAT_IDX feat, FloorFeatureType action);
62 void cave_alter_feat(PlayerType *player_ptr, POSITION y, POSITION x, FloorFeatureType action);
63 bool is_open(PlayerType *player_ptr, FEAT_IDX feat);
64 bool check_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x);
65 bool cave_monster_teleportable_bold(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode);
66 bool cave_player_teleportable_bold(PlayerType *player_ptr, POSITION y, POSITION x, teleport_flags mode);
67 void place_grid(PlayerType *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);
68 bool darkened_grid(PlayerType *player_ptr, grid_type *g_ptr);
69 void delete_monster(PlayerType *player_ptr, POSITION y, POSITION x);
70 void place_bold(PlayerType *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
71 void set_cave_feat(floor_type *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx);
72 int count_dt(PlayerType *player_ptr, POSITION *y, POSITION *x, bool (*test)(PlayerType *, FEAT_IDX), bool under);
73 void cave_lite_hack(floor_type *floor_ptr, POSITION y, POSITION x);
74 void cave_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
75 void cave_note_and_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
76 void cave_view_hack(floor_type *floor_ptr, POSITION y, POSITION x);