Angband
ui-target.h
Go to the documentation of this file.
1 
20 #ifndef UI_TARGET_H
21 #define UI_TARGET_H
22 
23 #include "ui-event.h"
24 
28 #define KEY_GRID_Y(K) \
29  ((int) (((K.mouse.y - ROW_MAP) / tile_height) + Term->offset_y))
30 
34 #define KEY_GRID_X(K) \
35  ((int) (((K.mouse.x - COL_MAP) / tile_width) + Term->offset_x))
36 
37 
42 #define HELP_HEIGHT 3
43 
47 #define TARGET_OUT_VAL_SIZE 256
48 
49 int target_dir(struct keypress ch);
50 int target_dir_allow(struct keypress ch, bool allow_5);
51 void target_display_help(bool monster, bool free);
52 void textui_target(void);
53 void textui_target_closest(void);
54 bool target_set_interactive(int mode, int x, int y);
55 
56 #endif /* UI_TARGET_H */
bool target_set_interactive(int mode, int x, int y)
Handle "target" and "look".
Definition: ui-target.c:935
Monster information, for a specific monster.
Definition: monster.h:323
int target_dir_allow(struct keypress ch, bool allow_5)
Definition: ui-target.c:54
int target_dir(struct keypress ch)
Extract a direction (or zero) from a character.
Definition: ui-target.c:49
void textui_target(void)
Target command.
Definition: ui-target.c:742
Struct holding all relevant info for keypresses.
Definition: ui-event.h:162
void textui_target_closest(void)
Target closest monster.
Definition: ui-target.c:756
void target_display_help(bool monster, bool free)
Display targeting help at the bottom of the screen.
Definition: ui-target.c:98
Utility functions relating to UI events.