Hengband  2.2.1
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(bool pickup);
28 #ifdef TRAVEL
29 extern void do_cmd_travel(player_type *creature_ptr);
30 extern void travel_step(void);
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 
s16b OBJECT_IDX
ゲーム中のアイテムID型を定義
Definition: h-type.h:140
travel_type travel
Definition: player-move.c:179
void do_cmd_travel(player_type *creature_ptr)
トラベル処理のメインルーチン
Definition: player-move.c:2215
DIRECTION dir
Definition: player-move.h:55
void run_step(DIRECTION dir)
継続的なダッシュ処理 / Take one step along the current "run" path
Definition: player-move.c:1840
void carry(bool pickup)
プレイヤーがオブジェクト上に乗った際の表示処理
Definition: player-move.c:357
void travel_step(void)
トラベル機能の実装 / Travel command
Definition: player-move.c:2000
bool move_player_effect(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
移動に伴うプレイヤーのステータス変化処理
Definition: player-move.c:604
void move_player(player_type *creature_ptr, DIRECTION dir, bool do_pickup, bool break_trap)
該当地形のトラップがプレイヤーにとって無効かどうかを判定して返す / Move player in the given direction, with the given "pickup" flag.
Definition: player-move.c:880
bool pattern_seq(player_type *creature_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x)
パターンによる移動制限処理
Definition: player-move.c:478
u32b BIT_FLAGS
32ビットのフラグ配列の型定義
Definition: h-type.h:225
s32b POSITION
ゲーム中の座標型を定義
Definition: h-type.h:146
#define MAX_WID
表示上のダンジョンの最大水平サイズ(SCREEN_WIDの3倍が望ましい) Maximum dungeon width in grids, must be a multiple of SCREEN_WI...
Definition: floor.h:52
#define MAX_HGT
表示上のダンジョンの最大垂直サイズ(SCREEN_HGTの3倍が望ましい) Maximum dungeon height in grids, must be a multiple of SCREEN_H...
Definition: floor.h:46
int run
Definition: player-move.h:51
void search(player_type *creature_ptr)
プレイヤーの探索処理判定
Definition: player-move.c:232
int DIRECTION
ゲーム中の方角の型定義
Definition: h-type.h:198
POSITION x
Definition: player-move.h:53
void py_pickup_aux(OBJECT_IDX o_idx)
プレイヤーがオブジェクトを拾った際のメッセージ表示処理 / Helper routine for py_pickup() and py_pickup_floor().
Definition: player-move.c:270
Definition: player-status.h:86
Definition: player-move.h:50
POSITION y
Definition: player-move.h:54
void disturb(player_type *creature_ptr, bool stop_search, bool flush_output)
Definition: player-move.c:2276
bool trap_can_be_ignored(player_type *creature_ptr, FEAT_IDX feat)
該当地形のトラップがプレイヤーにとって無効かどうかを判定して返す
Definition: player-move.c:815
s16b FEAT_IDX
ゲーム中の地形ID型を定義
Definition: h-type.h:115