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 {
15  } what;
16 
17  union {
18  struct trap *trap;
19  int monster;
20  struct object *object;
22  } which;
23 };
24 
25 /*
26  * Generate different forms of the source for projection and effect
27  * functions
28  */
29 struct source source_none(void);
30 struct source source_trap(struct trap *);
31 struct source source_monster(int who);
32 struct source source_player(void);
33 struct source source_object(struct object *);
35 
36 #endif /* EFFECT_SOURCE_H */
struct source source_object(struct object *)
Definition: source.c:50
Definition: source.h:9
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp
An actual trap.
Definition: trap.h:82
Definition: source.h:12
struct source source_monster(int who)
Definition: source.c:36
typedef int
Definition: libpng12/png.h:1135
struct object * object
Definition: source.h:20
struct source source_player(void)
Definition: source.c:44
Definition: source.h:13
struct trap * trap
Definition: source.h:18
Object information, for a specific object.
Definition: object.h:418
Definition: source.h:10
int monster
Definition: source.h:19
struct source source_trap(struct trap *)
Definition: source.c:28
struct chest_trap * chest_trap
Definition: source.h:21
enum source::@56 what
Definition: source.h:14
union source::@57 which
struct source source_chest_trap(struct chest_trap *chest_trap)
Definition: source.c:58
Definition: source.h:11
Definition: source.h:7
struct source source_none(void)
Definition: source.c:21
Chests.
Definition: object.h:67