Angband
obj-ignore.h
Go to the documentation of this file.
1 
19 #ifndef OBJ_IGNORE_H
20 #define OBJ_IGNORE_H
21 
22 /*
23  * Used for mapping the values below to names.
24  */
25 typedef struct
26 {
27  unsigned int enum_val;
28  const char *name;
30 
31 /*
32  * List of kinds of item, for pseudo-id and ego ignore.
33  */
34 typedef enum
35 {
36  #define ITYPE(a, b) ITYPE_##a,
37  #include "list-ignore-types.h"
38  #undef ITYPE
39 
40  ITYPE_MAX
42 
43 
44 #define ITYPE_SIZE FLAG_SIZE(ITYPE_MAX)
45 
46 #define itype_has(f, flag) flag_has_dbg(f, ITYPE_SIZE, flag, #f, #flag)
47 #define itype_on(f, flag) flag_on_dbg(f, ITYPE_SIZE, flag, #f, #flag)
48 #define itype_wipe(f) flag_wipe(f, ITYPE_SIZE)
49 
50 /*
51  * The different kinds of quality ignore
52  */
53 enum
54 {
62 
64 };
65 
66 
70 typedef struct ego_desc
71 {
74  const char *short_name;
75 } ego_desc;
76 
77 /*
78  * Ignore flags
79  */
80 #define IGNORE_IF_AWARE 0x01
81 #define IGNORE_IF_UNAWARE 0x02
82 
83 
84 
88 
89 
90 /* obj-ignore.c */
91 void ignore_birth_init(void);
92 const char *get_autoinscription(object_kind *kind);
95 int add_autoinscription(s16b kind, const char *inscription);
96 void autoinscribe_ground(void);
97 void autoinscribe_pack(void);
98 void object_ignore_flavor_of(const object_type *o_ptr);
100 byte ignore_level_of(const object_type *o_ptr);
101 bool tval_has_ignore_type(int tval, ignore_type_t itype);
102 void kind_ignore_clear(object_kind *k_ptr);
103 void ego_ignore(struct object *obj);
104 void ego_ignore_clear(struct object *obj);
105 void ego_ignore_toggle(int e_idx, int itype);
106 bool ego_is_ignored(int e_idx, int itype);
107 bool kind_is_ignored_aware(const object_kind *k_ptr);
108 bool kind_is_ignored_unaware(const object_kind *k_ptr);
111 bool object_is_ignored(const object_type *o_ptr);
112 bool ignore_item_ok(const object_type *o_ptr);
113 void ignore_drop(void);
115 
116 extern byte ignore_level[];
117 extern const size_t ignore_size;
118 
119 /* ui-options.c */
120 int ego_item_name(char *buf, size_t buf_size, ego_desc *desc);
121 
122 #endif /* !OBJ_IGNORE_H */