Go to the documentation of this file.
19 #ifndef OBJ_IGNORE_H
20 #define OBJ_IGNORE_H
22 /*
23  * Used for mapping the values below to names.
24  */
25 typedef struct
26 {
27  unsigned int enum_val;
28  const char *name;
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
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)
50 /*
51  * The different kinds of quality ignore
52  */
53 enum
54 {
62 };
68 struct ego_desc {
71  const char *short_name;
72 };
74 /*
75  * Ignore flags
76  */
77 #define IGNORE_IF_AWARE 0x01
78 #define IGNORE_IF_UNAWARE 0x02
84 extern bool **ego_ignore_types;
87 /* obj-ignore.c */
88 void ignore_birth_init(void);
89 void rune_autoinscribe(int i);
90 const char *get_autoinscription(struct object_kind *kind, bool aware);
91 int apply_autoinscription(struct object *obj);
93 int add_autoinscription(s16b kind, const char *inscription, bool aware);
94 void autoinscribe_ground(void);
95 void autoinscribe_pack(void);
96 void object_ignore_flavor_of(const struct object *obj);
97 ignore_type_t ignore_type_of(const struct object *obj);
98 byte ignore_level_of(const struct object *obj);
99 bool ego_has_ignore_type(struct ego_item *ego, ignore_type_t itype);
100 void kind_ignore_clear(struct object_kind *kind);
101 void ego_ignore(struct object *obj);
102 void ego_ignore_clear(struct object *obj);
103 void ego_ignore_toggle(int e_idx, int itype);
104 bool ego_is_ignored(int e_idx, int itype);
105 bool kind_is_ignored_aware(const struct object_kind *kind);
106 bool kind_is_ignored_unaware(const struct object_kind *kind);
107 void kind_ignore_when_aware(struct object_kind *kind);
108 void kind_ignore_when_unaware(struct object_kind *kind);
109 bool object_is_ignored(const struct object *obj);
110 bool ignore_item_ok(const struct object *obj);
111 bool ignore_known_item_ok(const struct object *obj);
112 void ignore_drop(void);
115 extern byte ignore_level[];
116 extern const size_t ignore_size;
118 /* ui-options.c */
119 int ego_item_name(char *buf, size_t buf_size, struct ego_desc *desc);
121 #endif /* !OBJ_IGNORE_H */
uint16_t u16b
Definition: h-basic.h:169
Definition: obj-ignore.h:57
int apply_autoinscription(struct object *obj)
Put an autoinscription on an object.
Definition: obj-ignore.c:244
void kind_ignore_when_aware(struct object_kind *kind)
Definition: obj-ignore.c:559
const char * short_name
Definition: obj-ignore.h:71
Definition: obj-ignore.h:56
int add_autoinscription(s16b kind, const char *inscription, bool aware)
Register an object kind autoinscription.
Definition: obj-ignore.c:319
Structure to describe ego item short name.
Definition: obj-ignore.h:68
byte ignore_level[]
Definition: obj-ignore.c:107
png_uint_32 i
Definition: libpng12/png.h:2821
void autoinscribe_pack(void)
Put an autoinscription on all the player's carried objects.
Definition: obj-ignore.c:351
Information about object kinds, including player knowledge.
Definition: object.h:157
Definition: obj-ignore.h:25
bool object_is_ignored(const struct object *obj)
Determines if an object is already ignored.
Definition: obj-ignore.c:575
void rune_autoinscribe(int i)
Put a rune autoinscription on all available objects.
Definition: obj-ignore.c:193
unsigned int enum_val
Definition: obj-ignore.h:27
uint8_t byte
Definition: h-basic.h:167
void ego_ignore(struct object *obj)
Definition: obj-ignore.c:524
bool ** ego_ignore_types
Definition: obj-ignore.c:109
bool ignore_item_ok(const struct object *obj)
Determines if an object is eligible for ignoring.
Definition: obj-ignore.c:621
void ego_ignore_toggle(int e_idx, int itype)
Definition: obj-ignore.c:538
types of object used for ignoring by quality or ego
int remove_autoinscription(s16b kind)
Deregister an object kind autoinscription.
Definition: obj-ignore.c:291
byte ignore_level_of(const struct object *obj)
Determine the ignore level of an object, which is similar to its pseudo.
Definition: obj-ignore.c:463
png_bytep buf
Definition: libpng12/png.h:2815
void ego_ignore_clear(struct object *obj)
Definition: obj-ignore.c:531
const char * desc
Definition: obj-info.c:71
int type
Definition: mon-msg.c:79
bool ego_is_ignored(int e_idx, int itype)
Definition: obj-ignore.c:544
ignore_type_t ignore_type_of(const struct object *obj)
Find the ignore type of the object, or ITYPE_MAX if none.
Definition: obj-ignore.c:381
void object_ignore_flavor_of(const struct object *obj)
Ignore code
Definition: obj-ignore.c:369
int16_t s16b
Definition: h-basic.h:170
bool ego_has_ignore_type(struct ego_item *ego, ignore_type_t itype)
Find whether an ignore type is valid for a given ego item.
Definition: obj-ignore.c:404
const char * get_autoinscription(struct object_kind *kind, bool aware)
Return an object kind autoinscription.
Definition: obj-ignore.c:231
void ignore_drop(void)
Drop all {ignore}able items.
Definition: obj-ignore.c:650
Information about ego-items.
Definition: object.h:303
Definition: obj-ignore.h:59
u16b itype
Definition: obj-ignore.h:70
Definition: obj-ignore.h:55
Definition: obj-ignore.h:74
quality_name_struct quality_values[IGNORE_MAX]
The names for the various kinds of quality.
Definition: obj-ignore.c:98
bool kind_is_ignored_aware(const struct object_kind *kind)
Definition: obj-ignore.c:549
Definition: obj-ignore.h:58
void ignore_birth_init(void)
Reset the player's ignore choices for a new game.
Definition: obj-ignore.c:143
void kind_ignore_clear(struct object_kind *kind)
Remove any ignoring of a particular flavor.
Definition: obj-ignore.c:518
bool kind_is_ignored_unaware(const struct object_kind *kind)
Definition: obj-ignore.c:554
int ego_item_name(char *buf, size_t buf_size, struct ego_desc *desc)
Display an ego-item type on the screen.
Definition: ui-options.c:1068
Definition: obj-ignore.h:61
Definition: obj-ignore.h:34
void kind_ignore_when_unaware(struct object_kind *kind)
Definition: obj-ignore.c:565
void autoinscribe_ground(void)
Put an autoinscription on all objects on the floor beneath the player.
Definition: obj-ignore.c:337
const char * name
Definition: obj-ignore.h:28
const char * ignore_name_for_type(ignore_type_t type)
Return the name of an ignore type.
Definition: obj-ignore.c:702
s16b e_idx
Definition: obj-ignore.h:69
quality_name_struct quality_choices[ITYPE_MAX]
Definition: obj-ignore.c:88
const size_t ignore_size
Definition: obj-ignore.c:108
bool ignore_known_item_ok(const struct object *obj)
Determines if the known version of an object is eligible for ignoring.
Definition: obj-ignore.c:635