Angband
obj-pile.h
Go to the documentation of this file.
1 
19 #include "cave.h"
20 #include "player.h"
21 
25 typedef enum
26 {
27  OSTACK_NONE = 0x00, /* No options (this does NOT mean no stacking) */
28  OSTACK_STORE = 0x01, /* Store stacking */
29  OSTACK_PACK = 0x02, /* Inventory and home */
30  OSTACK_LIST = 0x04, /* Object list */
31  OSTACK_MONSTER = 0x08, /* Monster carrying objects */
32  OSTACK_FLOOR = 0x10, /* Floor stacking */
33  OSTACK_QUIVER = 0x20 /* Quiver */
35 
36 struct object *object_new(void);
37 void object_delete(struct object *obj);
38 void object_pile_free(struct object *obj);
39 
40 void pile_insert(struct object **pile, struct object *obj);
41 void pile_insert_end(struct object **pile, struct object *obj);
42 void pile_excise(struct object **pile, struct object *obj);
43 struct object *pile_last_item(struct object *const pile);
44 bool pile_contains(const struct object *top, const struct object *obj);
45 
46 bool object_stackable(const struct object *o_ptr, const struct object *j_ptr,
47  object_stack_t mode);
48 bool object_similar(const struct object *o_ptr, const struct object *j_ptr,
49  object_stack_t mode);
50 void object_absorb_partial(struct object *o_ptr, struct object *j_ptr);
51 void object_absorb(struct object *o_ptr, struct object *j_ptr);
52 void object_wipe(struct object *o_ptr);
53 void object_copy(struct object *o_ptr, const struct object *j_ptr);
54 void object_copy_amt(struct object *dest, struct object *src, int amt);
55 struct object *object_split(struct object *src, int amt);
56 struct object *floor_object_for_use(struct object *obj, int num, bool message);
57 bool floor_carry(struct chunk *c, int y, int x, struct object *drop, bool last);
58 void drop_near(struct chunk *c, struct object *j_ptr, int chance, int y, int x,
59  bool verbose);
60 void push_object(int y, int x);
61 void floor_item_charges(struct object *obj);
62 int scan_floor(struct object **items, int max_size, int y, int x, int mode,
63  item_tester tester);
64 int scan_items(struct object **item_list, size_t item_list_max, int mode,
65  item_tester tester);
66 bool item_is_available(struct object *obj, bool (*tester)(const struct object *), int mode);