OSDN Git Service

Merge remote-tracking branch 'remotes/origin/feature/Refactoring-Hourier' into For2...
[hengband/hengband.git] / src / player-move.h
1 #pragma once
2 #include "floor.h"
3
4 /*
5  * For travel command (auto run)
6  */
7 #define TRAVEL
8
9 extern void disturb(player_type *creature_ptr, bool stop_search, bool flush_output);
10 extern void move_player(player_type *creature_ptr, DIRECTION dir, bool do_pickup, bool break_trap);
11 extern void run_step(DIRECTION dir);
12
13 #define MPE_STAYING       0x00000001
14 #define MPE_FORGET_FLOW   0x00000002
15 #define MPE_HANDLE_STUFF  0x00000004
16 #define MPE_ENERGY_USE    0x00000008
17 #define MPE_DONT_PICKUP   0x00000010
18 #define MPE_DO_PICKUP     0x00000020
19 #define MPE_BREAK_TRAP    0x00000040
20 #define MPE_DONT_SWAP_MON 0x00000080
21 extern bool move_player_effect(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode);
22
23 extern void py_pickup_aux(OBJECT_IDX o_idx);
24 extern bool pattern_seq(player_type *creature_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x);
25 extern bool trap_can_be_ignored(player_type *creature_ptr, FEAT_IDX feat);
26 extern void search(player_type *creature_ptr);
27 extern void carry(player_type *creature_ptr, bool pickup);
28 #ifdef TRAVEL
29 extern void do_cmd_travel(player_type *creature_ptr);
30 extern void travel_step(player_type *creature_ptr);
31 #endif
32
33 /* Types of pattern tiles */
34 #define NOT_PATTERN_TILE      -1
35 #define PATTERN_TILE_START    0
36 #define PATTERN_TILE_1        1
37 #define PATTERN_TILE_2        2
38 #define PATTERN_TILE_3        3
39 #define PATTERN_TILE_4        4
40 #define PATTERN_TILE_END      5
41 #define PATTERN_TILE_OLD      6
42 #define PATTERN_TILE_TELEPORT 7
43 #define PATTERN_TILE_WRECKED  8
44
45
46 #ifdef TRAVEL
47  /*
48   *  A structure type for travel command
49   */
50 typedef struct {
51         int run; /* Remaining grid number */
52         int cost[MAX_HGT][MAX_WID];
53         POSITION x; /* Target X */
54         POSITION y; /* Target Y */
55         DIRECTION dir; /* Running direction */
56 } travel_type;
57
58 /* for travel */
59 extern travel_type travel;
60 #endif
61