1 /** 2 * \file: obj-gear.h 3 * \brief management of inventory, equipment and quiver 4 * 5 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke 6 * Copyright (c) 2014 Nick McConnell 7 * 8 * This work is free software; you can redistribute it and/or modify it 9 * under the terms of either: 10 * 11 * a) the GNU General Public License as published by the Free Software 12 * Foundation, version 2, or 13 * 14 * b) the "Angband licence": 15 * This software may be copied and distributed for educational, research, 16 * and not for profit purposes provided that this copyright and statement 17 * are included in all such copies. Other copyrights may also apply. 18 */ 19 20 #ifndef OBJECT_GEAR_H 21 #define OBJECT_GEAR_H 22 23 #include "player.h" 24 25 /** 26 * Player equipment slot types 27 */ 28 enum 29 { 30 #define EQUIP(a, b, c, d, e, f) EQUIP_##a, 31 #include "list-equip-slots.h" 32 #undef EQUIP 33 EQUIP_MAX 34 }; 35 36 int slot_by_name(struct player *p, const char *name); 37 bool slot_type_is(int slot, int type); 38 struct object *slot_object(struct player *p, int slot); 39 struct object *equipped_item_by_slot_name(struct player *p, const char *name); 40 int object_slot(struct player_body body, const struct object *obj); 41 bool object_is_equipped(struct player_body body, const struct object *obj); 42 bool object_is_carried(struct player *p, const struct object *obj); 43 const char *equip_mention(struct player *p, int slot); 44 const char *equip_describe(struct player *p, int slot); 45 int wield_slot(const struct object *obj); 46 bool minus_ac(struct player *p); 47 char gear_to_label(struct object *obj); 48 struct object *gear_last_item(void); 49 struct object *gear_object_for_use(struct object *obj, int num, bool message, 50 bool *none_left); 51 int inven_carry_num(const struct object *obj, bool stack); 52 bool inven_carry_okay(const struct object *obj); 53 void inven_item_charges(struct object *obj); 54 void inven_carry(struct player *p, struct object *obj, bool absorb, 55 bool message); 56 void inven_wield(struct object *obj, int slot); 57 void inven_takeoff(struct object *item); 58 void inven_drop(struct object *obj, int amt); 59 void combine_pack(void); 60 bool pack_is_full(void); 61 bool pack_is_overfull(void); 62 void pack_overflow(struct object *obj); 63 64 65 #endif /* OBJECT_GEAR_H */ 66