Angband
game-input.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_GAME_INPUT_H
20 #define INCLUDED_GAME_INPUT_H
21 
22 #include "cmd-core.h"
23 
27 #define USE_EQUIP 0x0001 /* Allow equip items */
28 #define USE_INVEN 0x0002 /* Allow inven items */
29 #define USE_FLOOR 0x0004 /* Allow quiver items */
30 #define USE_QUIVER 0x0008 /* Allow floor items */
31 #define IS_HARMLESS 0x0010 /* Ignore generic warning inscriptions */
32 #define SHOW_PRICES 0x0020 /* Show item prices in item lists */
33 #define SHOW_FAIL 0x0040 /* Show device failure in item lists */
34 #define SHOW_QUIVER 0x0080 /* Show quiver summary when in inventory */
35 #define SHOW_EMPTY 0x0100 /* Show empty slots in equipment display */
36 #define QUIVER_TAGS 0x0200 /* 0-9 are quiver slots when selecting */
37 
38 
39 bool (*get_string_hook)(const char *prompt, char *buf, size_t len);
40 int (*get_quantity_hook)(const char *prompt, int max);
41 bool (*get_check_hook)(const char *prompt);
42 bool (*get_com_hook)(const char *prompt, char *command);
43 bool (*get_rep_dir_hook)(int *dir, bool allow_none);
44 bool (*get_aim_dir_hook)(int *dir);
45 int (*get_spell_from_book_hook)(const char *verb, struct object *book,
46  const char *error,
47  bool (*spell_filter)(int spell));
48 int (*get_spell_hook)(const char *verb, item_tester book_filter, cmd_code cmd,
49  const char *error, bool (*spell_filter)(int spell));
50 bool (*get_item_hook)(struct object **choice, const char *pmt, const char *str,
51  cmd_code cmd, item_tester tester, int mode);
52 void (*get_panel_hook)(int *min_y, int *min_x, int *max_y, int *max_x);
53 bool (*panel_contains_hook)(unsigned int y, unsigned int x);
55 
56 bool get_string(const char *prompt, char *buf, size_t len);
57 int get_quantity(const char *prompt, int max);
58 bool get_check(const char *prompt);
59 bool get_com(const char *prompt, char *command);
60 bool get_rep_dir(int *dir, bool allow_none);
61 bool get_aim_dir(int *dir);
62 int get_spell_from_book(const char *verb, struct object *book,
63  const char *error, bool (*spell_filter)(int spell));
64 int get_spell(const char *verb, item_tester book_filter, cmd_code cmd,
65  const char *error, bool (*spell_filter)(int spell));
66 bool get_item(struct object **choice, const char *pmt, const char *str,
67  cmd_code cmd, item_tester tester, int mode);
68 void get_panel(int *min_y, int *min_x, int *max_y, int *max_x);
69 bool panel_contains(unsigned int y, unsigned int x);
70 bool map_is_visible(void);
71 
72 #endif /* INCLUDED_GAME_INPUT_H */