Go to the documentation of this file.
19 #ifndef TARGET_H
20 #define TARGET_H
31 #define TARGET_KILL 0x01
32 #define TARGET_LOOK 0x02
33 #define TARGET_XTRA 0x04
34 #define TARGET_GRID 0x08
35 #define TARGET_QUIET 0x10
37 int motion_dir(int y1, int x1, int y2, int x2);
38 void look_mon_desc(char *buf, size_t max, int m_idx);
39 bool target_able(struct monster *m);
40 bool target_okay(void);
41 bool target_set_monster(struct monster *mon);
42 void target_set_location(int y, int x);
43 bool target_is_set(void);
44 int cmp_distance(const void *a, const void *b);
45 s16b target_pick(int y1, int x1, int dy, int dx, struct point_set *targets);
46 bool target_accept(int y, int x);
47 void coords_desc(char *buf, int size, int y, int x);
48 void target_get(int *x, int *y);
49 struct monster *target_get_monster(void);
50 bool target_sighted(void);
51 struct point_set *target_get_monsters(int mode);
52 bool target_set_closest(int mode);
54 #endif /* !TARGET_H */
void target_get(int *x, int *y)
Obtains the location the player currently targets.
Definition: target.c:380
Monster information, for a specific monster.
Definition: monster.h:323
struct monster * target_get_monster(void)
Returns the currently targeted monster index.
Definition: target.c:393
int motion_dir(int y1, int x1, int y2, int x2)
Given a "source" and "target" location, extract a "direction", which will move one step from the "sou...
Definition: target.c:59
bool target_accept(int y, int x)
Determine if a given location is "interesting".
Definition: target.c:317
s16b target_pick(int y1, int x1, int dy, int dx, struct point_set *targets)
Help select a location.
Definition: target.c:268
void target_set_location(int y, int x)
Set the target to a location.
Definition: target.c:199
bool target_set_monster(struct monster *mon)
Set the target to a monster (or nobody)
Definition: target.c:175
A set of points that can be constructed to apply a set of changes to.
Definition: z-type.h:44
bool target_okay(void)
Update (if necessary) and verify (if possible) the target.
Definition: target.c:147
png_bytep buf
Definition: libpng12/png.h:2815
bool target_set_closest(int mode)
Set target to closest monster.
Definition: target.c:459
struct point_set * target_get_monsters(int mode)
Return a target set of target_able monsters.
Definition: target.c:418
bool target_able(struct monster *m)
Determine if a monster makes a reasonable target.
Definition: target.c:133
void look_mon_desc(char *buf, size_t max, int m_idx)
Monster health description.
Definition: target.c:84
int16_t s16b
Definition: h-basic.h:170
bool target_sighted(void)
True if the player's current target is in LOS.
Definition: target.c:402
int cmp_distance(const void *a, const void *b)
Sorting hook – comp function – by "distance to player".
Definition: target.c:232
void coords_desc(char *buf, int size, int y, int x)
Describe a location relative to the player position.
Definition: target.c:355
png_uint_32 size
Definition: libpng12/png.h:1546
bool target_is_set(void)
Tell the UI the target is set.
Definition: target.c:221