OSDN Git Service

[Refactor] #3733 optional 型の値取得処理 value() を撤廃した その1
[hengbandforosx/hengbandosx.git] / src / floor / geometry.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 /*!
6  * @brief 視界及び光源の過渡処理配列サイズ / Maximum size of the "temp" array
7  * @details We must be as large as "VIEW_MAX" and "LITE_MAX" for proper functioning
8  * of "update_view()" and "update_lite()".  We must also be as large as the
9  * largest illuminatable room, but no room is larger than 800 grids.  We
10  * must also be large enough to allow "good enough" use as a circular queue,
11  * to calculate monster flow, but note that the flow code is "paranoid".
12  */
13 #define TEMP_MAX 2298
14
15 //!< 対象グリッドの一覧をまとめる構造体
16 struct pos_list {
17     POSITION_IDX n; //!< Array of grids for use by various functions (see grid.c")
18     POSITION y[TEMP_MAX];
19     POSITION x[TEMP_MAX];
20 };
21
22 extern const POSITION ddd[9];
23 extern const POSITION ddx[10];
24 extern const POSITION ddy[10];
25 extern const POSITION ddx_ddd[9];
26 extern const POSITION ddy_ddd[9];
27 extern const POSITION cdd[8];
28 extern const POSITION ddx_cdd[8];
29 extern const POSITION ddy_cdd[8];
30
31 class PlayerType;
32 DIRECTION coords_to_dir(PlayerType *player_ptr, POSITION y, POSITION x);
33 POSITION distance(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
34 void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
35 bool player_can_see_bold(PlayerType *player_ptr, POSITION y, POSITION x);
36
37 class MonsterEntity;
38 bool is_seen(PlayerType *player_ptr, MonsterEntity *m_ptr);