Angband
obj-util.h
Go to the documentation of this file.
1 
19 #ifndef OBJECT_UTIL_H
20 #define OBJECT_UTIL_H
21 
22 /* Maximum number of scroll titles generated */
23 #define MAX_TITLES 50
24 
25 /* An item's pval (for charges, amount of gold, etc) is limited to s16b */
26 #define MAX_PVAL 32767
27 
28 void flavor_init(void);
29 void object_flags(const object_type *o_ptr, bitflag flags[OF_SIZE]);
31 bool object_test(item_tester tester, const struct object *o);
32 bool item_test(item_tester tester, int item);
33 bool is_unknown(const object_type *o_ptr);
34 unsigned check_for_inscrip(const object_type *o_ptr, const char *inscrip);
35 struct object_kind *lookup_kind(int tval, int sval);
36 struct object_kind *objkind_byid(int kidx);
37 int lookup_artifact_name(const char *name);
38 int lookup_sval(int tval, const char *name);
39 void object_short_name(char *buf, size_t max, const char *name);
40 int compare_items(const object_type *o1, const object_type *o2);
41 bool obj_has_charges(const object_type *o_ptr);
42 bool obj_can_zap(const object_type *o_ptr);
43 bool obj_is_activatable(const object_type *o_ptr);
44 bool obj_can_activate(const object_type *o_ptr);
45 bool obj_can_refill(const object_type *o_ptr);
46 bool obj_can_browse(const object_type *o_ptr);
47 bool obj_can_cast_from(const object_type *o_ptr);
48 bool obj_can_study(const object_type *o_ptr);
49 bool obj_can_takeoff(const object_type *o_ptr);
50 bool obj_can_wear(const object_type *o_ptr);
51 bool obj_can_fire(const object_type *o_ptr);
52 bool obj_has_inscrip(const object_type *o_ptr);
53 bool obj_is_useable(const object_type *o_ptr);
54 u16b object_effect(const object_type *o_ptr);
55 bool obj_needs_aim(object_type *o_ptr);
56 bool obj_can_fail(const struct object *o);
57 
58 int get_use_device_chance(const object_type *o_ptr);
59 void distribute_charges(object_type *o_ptr, object_type *q_ptr, int amt);
60 void reduce_charges(object_type *o_ptr, int amt);
61 int number_charging(const object_type *o_ptr);
62 bool recharge_timeout(object_type *o_ptr);
63 bool verify_object(const char *prompt, struct object *obj);
64 
65 
66 #endif /* OBJECT_UTIL_H */