Angband
source.h
Go to the documentation of this file.
1 #ifndef EFFECT_SOURCE_H
2 #define EFFECT_SOURCE_H
3 
4 /*
5  * Structure that tells you where an effect came from
6  */
7 struct source {
8  enum {
14  } what;
15 
16  union {
17  struct trap *trap;
18  int monster;
19  struct object *object;
20  } which;
21 };
22 
23 /*
24  * Generate different forms of the source for projection and effect
25  * functions
26  */
27 struct source source_none(void);
28 struct source source_trap(struct trap *);
29 struct source source_monster(int who);
30 struct source source_player(void);
31 struct source source_object(struct object *);
32 
33 #endif /* EFFECT_SOURCE_H */
struct source source_object(struct object *)
Definition: source.c:50
Definition: source.h:13
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp
An actual trap.
Definition: trap.h:75
struct source source_monster(int who)
Definition: source.c:36
typedef int
Definition: libpng12/png.h:1135
struct object * object
Definition: source.h:19
struct source source_player(void)
Definition: source.c:44
Definition: source.h:9
Definition: source.h:10
struct trap * trap
Definition: source.h:17
Object information, for a specific object.
Definition: object.h:393
int monster
Definition: source.h:18
enum source::@55 what
struct source source_trap(struct trap *)
Definition: source.c:28
Definition: source.h:12
Definition: source.h:11
union source::@56 which
Definition: source.h:7
struct source source_none(void)
Definition: source.c:21