OSDN Git Service

Merge pull request #716 from sikabane-works/release/3.0.0Alpha16
[hengbandforosx/hengbandosx.git] / src / monster / monster-processor-util.h
1 /*!
2  * @brief monster-processのための構造体群
3  * @date 2020/03/07
4  * @author Hourier
5  */
6
7 #pragma once
8
9 #include "system/angband.h"
10 #include "system/monster-type-definition.h"
11
12 typedef struct {
13         bool see_m;
14         bool aware;
15         bool is_riding_mon;
16         bool do_turn;
17         bool do_move;
18         bool do_view;
19         bool do_take;
20         bool must_alter_to_move;
21
22         bool did_open_door;
23         bool did_bash_door;
24         bool did_take_item;
25         bool did_kill_item;
26         bool did_move_body;
27         bool did_pass_wall;
28         bool did_kill_wall;
29 } turn_flags;
30
31 typedef struct {
32         BIT_FLAGS old_r_flags1;
33         BIT_FLAGS old_r_flags2;
34         BIT_FLAGS old_r_flags3;
35         BIT_FLAGS old_r_flags4;
36         BIT_FLAGS old_r_flags5;
37         BIT_FLAGS old_r_flags6;
38         BIT_FLAGS old_r_flagsr;
39
40         byte old_r_blows0;
41         byte old_r_blows1;
42         byte old_r_blows2;
43         byte old_r_blows3;
44
45         byte old_r_cast_spell;
46 } old_race_flags;
47
48 typedef struct {
49         POSITION gy;
50         POSITION gx;
51         POSITION gdis;
52 } coordinate_candidate;
53
54 turn_flags *init_turn_flags(MONSTER_IDX riding_idx, MONSTER_IDX m_idx, turn_flags *turn_flags_ptr);
55 old_race_flags *init_old_race_flags(old_race_flags *old_race_flags_ptr);
56 coordinate_candidate init_coordinate_candidate(void);
57
58 void store_enemy_approch_direction(int *mm, POSITION y, POSITION x);
59 void store_moves_val(int *mm, int y, int x);
60 void save_old_race_flags(MONRACE_IDX monster_race_idx, old_race_flags *old_race_flags_ptr);
61 SPEED decide_monster_speed(monster_type *m_ptr);