Definition in file items.c.
#include "crogue.h"
#include "export.h"
Go to the source code of this file.
Data Structures | |
| struct | statdisplay |
Defines | |
| #define | NUM_ITEM_CATEGORIES 13 |
| #define | NUM_DISPLAYED_STATS 7 |
Typedefs | |
| typedef statdisplay | statdisplay |
Functions | |
| int | filter_none (const item *i) |
| int | filter_cursed (const item *i) |
| int | filter_worn (const item *i) |
| int | filter_wearable (const item *i) |
| int | filter_unidentified (const item *i) |
| int | filter_usable (const item *i) |
| int | filter_enchantable (const item *i) |
| int | filter_plural (const item *i) |
| int | filter_rusty (const item *i) |
| int | pick_item (inventoryfilter f) |
| void | pick_multiple (inventoryfilter f, void(*function)(int which)) |
| int | items_menu (inventoryfilter f) |
| void | itemstring (int n, char *buf) |
| int | item_by_sequence (int n) |
| void | sort_inventory (void) |
| int | filter_matches (inventoryfilter f) |
| void | init_inventory (void) |
| item | split_item (int slot) |
| void | merge_item (int slot, item it) |
| int | give_item (const item *itm, sint silent) |
| item * | player_equipment (int slot) |
| int | num_player_equipment (int slot) |
| const item_property_desc * | get_item_property (const item *itm, uint type) |
| void | apply_item_property (const item *itm, uint stat, sint *n) |
| void | apply_all_item_properties (const item *itm, int trigger) |
| void | append_armor_description (const item *itm, char *output) |
| const item_property * | extract_item_property (const item_properties *pr, uint type) |
| void | award_item_points (void) |
| void | rust_inventory (uint which) |
| void | give_gold (ulong amt) |
| ulong | player_gold (void) |
| void | debit_gold (ulong amt) |
| ulong | item_value (const item *i) |
| ulong | item_cost (const item *i) |
| ulong | sale_price (const item *i) |
| void | list_discoveries (void) |
| void | identify_type (ushort t) |
| ulong | type_is_identified (ulong t) |
| void | compress_items (void) |
| void | place_item (const item *i, ushort x, ushort y) |
| uchar | draw_item (uchar x, uchar y) |
| void | init_items () |
| void | cleanup_items (void) |
| uint | add_item (item itm) |
| void | delete_item (uint which) |
| item | randitem (filelink type) |
| schar | random_plus (void) |
| uint | can_stack (const item *one, const item *two) |
| void | drop_item (void) |
| void | drop_multiple (void) |
| void | do_drop_item (int which) |
| void | wear_item (void) |
| void | do_wear_item (int which) |
| void | takeoff_item (void) |
| void | takeoff_multiple (void) |
| void | do_takeoff_item (int which) |
| void | pickup (uint pickup_prompt) |
| void | give_item_slip (const item *itm) |
| uint | count_inventory (void) |
| int | iterate_item_property (const item_properties *pr, uint type, short(*func)(const item_property *pr)) |
| short | cb_apply_item_stat (const item_property *pr) |
| short | cb_apply_item_stat_all (const item_property *pr) |
| const char * | shortitemname (const item *i) |
| uchar * | n_itemname (ulong which) |
| uchar * | itemname (const item *i) |
| short | cb_apply_item_stat_to_temp (const item_property *pr) |
| ushort | fix_rust (void) |
| void | init_discoveries (void) |
| short | count_items (ushort x, ushort y) |
| short | top_item (ushort x, ushort y) |
| void | wear_multiple (void) |
| void | item_step (void) |
| void | hotkey_item (void) |
Variables | |
| const char * | categoryNames [NUM_ITEM_CATEGORIES] |
| inventoryfilter | invfilter |
| const item * | current_item |
| sint * | current_target |
| uint | current_stat |
| const char * | rusty_descriptions [] |
| const statdisplay | displayed_stats [NUM_DISPLAYED_STATS] |
| sint | tmp_stats [NUM_STATS] |
| const int | items_startsize = 64 |
| const int | items_allocinterval = 8 |
| const int | max_worn_items [10] |
|
|
Definition at line 757 of file items.c. Referenced by append_armor_description(). |
|
|
Definition at line 108 of file items.c. Referenced by filter_matches(), and sort_inventory(). |
|
|
|
|
|
Definition at line 1182 of file items.c. References itemsinfo::alloced, debug_realloc, itemsinfo::items, world::items, items_allocinterval, itemsinfo::num, item::type, and w. Referenced by place_item(). |
|
||||||||||||
|
Definition at line 777 of file items.c. References catprintf(), cb_apply_item_stat_to_temp(), current_item, displayed_stats, ITEMDESC, iterate_item_property(), NUM_DISPLAYED_STATS, NUM_STATS, PROPERTY_THROWN_EFFECT, PROPERTY_WORN_STAT_EFFECT, statdisplay::stat, STAT_DAMAGE_MAX, STAT_DAMAGE_MIN, STAT_DV, STAT_MISSILE_TOHIT, STAT_MISSILEDAM_MAX, STAT_MISSILEDAM_MIN, STAT_PV, STAT_TOHIT, and tmp_stats. Referenced by itemname(). |
|
||||||||||||
|
Definition at line 659 of file items.c. References cb_apply_item_stat_all(), current_item, ITEMDESC, and iterate_item_property(). Referenced by throw_item(), and update_player(). |
|
||||||||||||||||
|
Definition at line 650 of file items.c. References cb_apply_item_stat(), current_item, current_stat, current_target, ITEMDESC, iterate_item_property(), and PROPERTY_WORN_STAT_EFFECT. |
|
|
Definition at line 816 of file items.c. References get_item_property(), INVENTORY, ITEMDESC, world::plr, PLRINVSIZE, PROPERTY_SCORE, player::score, item_property_desc::score_factor, and w. Referenced by end_game(). |
|
||||||||||||
|
Definition at line 1284 of file items.c. References item::flags, ITEMDESC, ITEMFLAG_EQUIPPED, ITEMFLAG_IDENTIFIED, ITEMFLAG_STACK, ITEMFLAG_TOP, item::plus, item::rustiness, and item::type. Referenced by give_item(), give_item_slip(), and place_item(). |
|
|
Definition at line 630 of file items.c. References apply_stat_mod_desc(), item_property::contents, current_item, current_stat, current_target, item::plus, stat_mod_desc::stat, and item_property_desc::worn_stat_effect. Referenced by apply_item_property(). |
|
|
Definition at line 641 of file items.c. References apply_stat_mod_desc(), item_property::contents, current_item, item::plus, and item_property_desc::worn_stat_effect. Referenced by apply_all_item_properties(). |
|
|
Definition at line 770 of file items.c. References apply_stat_mod_desc(), item_property::contents, current_item, item::plus, stat_mod_desc::stat, tmp_stats, and item_property_desc::worn_stat_effect. Referenced by append_armor_description(). |
|
|
Definition at line 1175 of file items.c. References debug_free, itemsinfo::items, world::items, and w. Referenced by cleanup(), gen_map(), and load_level(). |
|
|
Definition at line 1051 of file items.c. References itemsinfo::items, world::items, itemsinfo::num, item::type, and w. Referenced by save_level(). |
|
|
Definition at line 562 of file items.c. References INVENTORY, PLRINVSIZE, and uint. Referenced by items_menu(), and plr_move(). |
|
||||||||||||
|
Definition at line 1101 of file items.c. References tile::flags, itemsinfo::items, world::items, item::next, world::t, TFLAG_ITEM, top_item(), and w. Referenced by item_step(), manip_door(), plr_move(), and plr_moveto(). |
|
|
Definition at line 919 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_CURRENCY, and PLRINVSIZE. Referenced by fix_rust(), and pickup(). |
|
|
Definition at line 1211 of file items.c. References itemsinfo::alloced, itemsinfo::items, world::items, item::next, itemsinfo::num, item::type, and w. Referenced by pickup(). |
|
|
Definition at line 1349 of file items.c. References give_gold(), INVENTORY, ITEMDESC, ITEMFLAG_CURRENCY, ITEMFLAG_EQUIPPED, ITEMFLAG_UNPAID, itemname(), message(), place_item(), world::plr, prompt(), retprintf(), sale_price(), world::t, timepass(), tile::type, ulong, update_player(), w, player::x, and player::y. Referenced by drop_item(), and drop_multiple(). |
|
|
Definition at line 1517 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_CURSED, ITEMFLAG_EQUIPPED, itemname(), message(), timepass(), and update_player(). Referenced by takeoff_item(), and takeoff_multiple(). |
|
|
Definition at line 1441 of file items.c. References call_usefunc(), item::flags, get_item_property(), identify_type(), INVENTORY, ITEMDESC, ITEMFLAG_CURSED, ITEMFLAG_EQUIPPED, ITEMFLAG_IDENTIFIED, itemname(), max_worn_items, message(), num_player_equipment(), player_equipment(), PROPERTY_WEAR_FUNC, timepass(), and update_player(). Referenced by wear_item(), and wear_multiple(). |
|
||||||||||||
|
Definition at line 1095 of file items.c. References ITEMDESC, itemsinfo::items, world::items, top_item(), uchar, and w. Referenced by draw_tile(). |
|
|
Definition at line 1314 of file items.c. References do_drop_item(), filter_matches(), filter_none(), message(), and pick_item(). Referenced by plr_move(). |
|
|
Definition at line 1336 of file items.c. References do_drop_item(), filter_matches(), filter_none(), message(), and pick_multiple(). Referenced by plr_move(). |
|
||||||||||||
|
Definition at line 605 of file items.c. References item_property::contents, deref_file_ptr(), item_properties::num_properties, item_property_desc::parent, item_properties::properties, PROPERTY_INHERIT, and item_property::type. Referenced by get_item_property(). |
|
|
Definition at line 137 of file items.c. References item::flags, ITEMFLAG_CURSED, and ITEMFLAG_IDENTIFIED. Referenced by removecurses(). |
|
|
Definition at line 182 of file items.c. References ITEMDESC, ITEMFLAG_CHARGED, and ITEMFLAG_PLUS. Referenced by enchant_item(). |
|
|
Definition at line 379 of file items.c. References INVENTORY, ITEMDESC, NUM_ITEM_CATEGORIES, and PLRINVSIZE. Referenced by drop_item(), drop_multiple(), enchant_item(), fix_rust(), identify(), items_menu(), removecurses(), takeoff_item(), takeoff_multiple(), throw_item_from_menu(), use_item(), wear_item(), and wear_multiple(). |
|
|
Definition at line 131 of file items.c. Referenced by drop_item(), drop_multiple(), hotkey_item(), plr_move(), and throw_item_from_menu(). |
|
|
Definition at line 188 of file items.c. References ITEMDESC, ITEMFLAG_HIDECHARGE, ITEMFLAG_STACK, and item::stacksize. Referenced by give_item_slip(), and itemname(). |
|
|
Definition at line 195 of file items.c. References item::rustiness. Referenced by fix_rust(). |
|
|
Definition at line 157 of file items.c. References itemdesc::flags, item::flags, ITEMDESC, ITEMFLAG_CHARGED, ITEMFLAG_HIDECHARGE, ITEMFLAG_IDENTIFIED, ITEMFLAG_PLUS, item::type, and type_is_identified(). Referenced by identify(). |
|
|
Definition at line 176 of file items.c. References ITEMDESC, and ITEMFLAG_USABLE. Referenced by use_item(). |
|
|
Definition at line 149 of file items.c. References item::flags, ITEMDESC, and ITEMFLAG_EQUIPPED. Referenced by wear_item(), and wear_multiple(). |
|
|
Definition at line 143 of file items.c. References item::flags, and ITEMFLAG_EQUIPPED. Referenced by takeoff_item(), and takeoff_multiple(). |
|
|
Definition at line 862 of file items.c. References debit_gold(), filter_matches(), filter_rusty(), INVENTORY, itemname(), message(), pick_item(), player_gold(), prompt(), retprintf(), and ushort. |
|
||||||||||||
|
Definition at line 596 of file items.c. References item_property::contents, extract_item_property(), and ITEMDESC. Referenced by award_item_points(), do_wear_item(), throw_item(), thrown_item_effect(), timepass(), and use_item(). |
|
|
Definition at line 896 of file items.c. References world::desc, world_descriptor::generate_currency, give_item(), randitem(), item::stacksize, and w. Referenced by do_drop_item(). |
|
||||||||||||
|
Definition at line 459 of file items.c. References can_stack(), INVENTORY, ITEMDESC, ITEMFLAG_STACK, itemname(), message(), PLRINVSIZE, and item::stacksize. Referenced by give_gold(), and pickup(). |
|
|
Definition at line 493 of file items.c. References can_stack(), filter_plural(), INVENTORY, ITEMDESC, ITEMFLAG_STACK, itemname(), message(), place_item(), world::plr, PLRINVSIZE, item::stacksize, w, player::x, and player::y. |
|
|
Definition at line 1633 of file items.c. References draw(), filter_none(), INVENTORY, KEY_ESC, message(), pick_item(), read_char(), and w. Referenced by plr_move(). |
|
|
Definition at line 1032 of file items.c. References world::itemids, and w. Referenced by do_wear_item(), identify(), init_discoveries(), init_inventory(), pickup(), and use_item(). |
|
|
Definition at line 1019 of file items.c. References debug_malloc, world::desc, identify_type(), ITEMDESCN, world_descriptor::itementries, ITEMFLAG_AUTOID, world::itemids, ulong, and w. Referenced by initialize(), and restore_game(). |
|
|
Definition at line 404 of file items.c. References deref_file_ptr(), world::desc, identify_type(), INVENTORY, player::inventory, world::plr, PLRINVSIZE, world_descriptor::startinginventory, uint, and w. Referenced by init_player(). |
|
|
Definition at line 1161 of file items.c. References itemsinfo::alloced, debug_malloc, itemsinfo::items, world::items, items_startsize, itemsinfo::num, item::type, and w. Referenced by gen_map(). |
|
|
Definition at line 320 of file items.c. References INVENTORY, invfilter, ITEMDESC, and PLRINVSIZE. Referenced by items_menu(). |
|
|
Definition at line 965 of file items.c. References item::flags, item_value(), ITEMFLAG_UNPAID, and ulong. Referenced by itemname(), and pickup(). |
|
|
Definition at line 1547 of file items.c. References count_items(), itemname(), itemsinfo::items, world::items, message(), OPTION_AUTO_NO, OPTION_AUTO_PROMPT, OPTION_AUTO_YES, OPTION_AUTOPICKUP, world::options, pickup(), world::plr, top_item(), w, player::x, and player::y. Referenced by plr_moveto(). |
|
|
Definition at line 937 of file items.c. References ITEMDESC, ITEMFLAG_CHARGED, ITEMFLAG_STACK, item::plus, item::stacksize, and ulong. Referenced by item_cost(), and sale_price(). |
|
|
Definition at line 695 of file items.c. References append_armor_description(), catprintf(), filter_plural(), itemdesc::flags, item::flags, item_cost(), ITEMDESC, ITEMFLAG_CHARGED, ITEMFLAG_CURSED, ITEMFLAG_EQUIPPED, ITEMFLAG_HIDECHARGE, ITEMFLAG_IDENTIFIED, ITEMFLAG_STACK, ITEMFLAG_UNPAID, pluralize(), item::rustiness, rusty_descriptions, shortitemname(), itemdesc::spot, item::stacksize, uchar, and uint. Referenced by do_drop_item(), do_takeoff_item(), do_wear_item(), enchant_item(), fix_rust(), give_item(), give_item_slip(), identify(), item_step(), itemstring(), n_itemname(), and pickup(). |
|
|
Definition at line 234 of file items.c. References count_inventory(), filter_matches(), inventory_rect, invfilter, item_by_sequence(), item_tab_stops, itemstring(), setTabStops(), sort_inventory(), and UI_Menu_Pick(). Referenced by pick_item(), and pick_multiple(). |
|
||||||||||||
|
Definition at line 265 of file items.c. References categoryNames, INVENTORY, invfilter, ITEMDESC, itemname(), and PLRINVSIZE. Referenced by items_menu(). |
|
||||||||||||||||
|
Definition at line 572 of file items.c. References item_property::contents, deref_file_ptr(), item_property_desc::parent, PROPERTY_INHERIT, and item_property::type. Referenced by append_armor_description(), apply_all_item_properties(), and apply_item_property(). |
|
|
Definition at line 984 of file items.c. References deref_file_ptr(), world::desc, discovery_screen_tab_stops, draw_string(), full_redraw(), Graph_ClrScr(), isNull, ITEMDESCN, world_descriptor::itementries, message(), OPTION_FONT_SMALL, read_char(), SCREEN_HEIGHT, SCREEN_WIDTH, setTabStops(), type_is_identified(), and w. Referenced by plr_move(). |
|
||||||||||||
|
Definition at line 449 of file items.c. References INVENTORY, and item::stacksize. Referenced by throw_item(). |
|
|
Definition at line 689 of file items.c. References INVENTORY, itemname(), and uchar. |
|
|
Definition at line 543 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_EQUIPPED, and PLRINVSIZE. Referenced by do_wear_item(). |
|
|
Definition at line 207 of file items.c. References full_redraw(), and items_menu(). Referenced by drop_item(), enchant_item(), fix_rust(), hotkey_item(), identify(), plr_move(), removecurses(), takeoff_item(), throw_item_from_menu(), use_item(), and wear_item(). |
|
||||||||||||
|
Definition at line 216 of file items.c. References full_redraw(), items_menu(), and UI_Menu_Set_Persist(). Referenced by drop_multiple(), takeoff_multiple(), and wear_multiple(). |
|
|
Definition at line 1572 of file items.c. References debit_gold(), delete_item(), tile::flags, item::flags, give_item(), identify_type(), item_cost(), ITEMFLAG_TOP, ITEMFLAG_UNPAID, itemname(), itemsinfo::items, world::items, message(), item::next, player_gold(), world::plr, prompt(), retprintf(), sshort, world::t, TFLAG_ITEM, timepass(), top_item(), item::type, uint, update_player(), w, player::x, and player::y. Referenced by item_step(), and plr_move(). |
|
||||||||||||||||
|
Definition at line 1064 of file items.c. References add_item(), can_stack(), item::flags, tile::flags, ITEMFLAG_TOP, itemsinfo::items, world::items, item::next, item::stacksize, world::t, TFLAG_ITEM, top_item(), w, item::x, and item::y. Referenced by do_drop_item(), give_item_slip(), make_connections(), place_items(), place_shop(), and throw_item(). |
|
|
Definition at line 529 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_EQUIPPED, and PLRINVSIZE. Referenced by do_wear_item(). |
|
|
Definition at line 907 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_CURRENCY, PLRINVSIZE, and ulong. Referenced by draw(), fix_rust(), and pickup(). |
|
|
Definition at line 1227 of file items.c. References deref_file_ptr(), ITEMDESC, ITEMFLAG_CHARGED, ITEMFLAG_CURSED, ITEMFLAG_FUELED, ITEMFLAG_GEN_CURSED, ITEMFLAG_HIDECHARGE, ITEMFLAG_PLUS, ITEMFLAG_RUSTPROOF, ITEMFLAG_STACK, nrandom(), random_plus(), and RANGE. Referenced by give_gold(), make_connections(), place_items(), and place_shop(). |
|
|
Definition at line 1259 of file items.c. References lrand(), RANGE, and schar. Referenced by randitem(). |
|
|
Definition at line 831 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_RUSTPROOF, message(), and shortitemname(). |
|
|
Definition at line 974 of file items.c. References item_value(), and ulong. Referenced by do_drop_item(). |
|
|
Definition at line 667 of file items.c. References deref_file_ptr(), item::flags, isNull, ITEMDESC, ITEMFLAG_UNPAID, itemdesc::name, item::type, type_is_identified(), uchar, and itemdesc::unidname. Referenced by itemname(), rust_inventory(), and throw_item(). |
|
|
Definition at line 348 of file items.c. References INVENTORY, ITEMDESC, NUM_ITEM_CATEGORIES, and PLRINVSIZE. Referenced by items_menu(). |
|
|
Definition at line 427 of file items.c. References INVENTORY, ITEMDESC, ITEMFLAG_CHARGED, and item::stacksize. Referenced by throw_item(). |
|
|
Definition at line 1481 of file items.c. References do_takeoff_item(), filter_matches(), filter_worn(), message(), and pick_item(). Referenced by plr_move(). |
|
|
Definition at line 1504 of file items.c. References do_takeoff_item(), filter_matches(), filter_worn(), message(), and pick_multiple(). Referenced by plr_move(). |
|
||||||||||||
|
Definition at line 1119 of file items.c. References itemsinfo::alloced, item::flags, tile::flags, ITEMFLAG_TOP, itemsinfo::items, world::items, message(), world::t, TFLAG_ITEM, w, item::x, and item::y. Referenced by count_items(), draw_item(), item_step(), pickup(), and place_item(). |
|
|
Definition at line 1038 of file items.c. References world::itemids, ulong, and w. Referenced by filter_unidentified(), list_discoveries(), and shortitemname(). |
|
|
Definition at line 1406 of file items.c. References do_wear_item(), filter_matches(), filter_wearable(), message(), and pick_item(). Referenced by plr_move(). |
|
|
Definition at line 1428 of file items.c. References do_wear_item(), filter_matches(), filter_wearable(), message(), and pick_multiple(). Referenced by plr_move(). |
|
|
Initial value:
{
gettext("Weapons"),
gettext("Ammunition"),
gettext("Armor"),
gettext("Amulets"),
gettext("Rings"),
gettext("Wands"),
gettext("Potions"),
gettext("Scrolls"),
gettext("Spellbooks"),
gettext("Food"),
gettext("Gems"),
gettext("Money"),
gettext("Tools")
}
Definition at line 109 of file items.c. Referenced by itemstring(). |
|
|
Definition at line 625 of file items.c. Referenced by append_armor_description(), apply_all_item_properties(), apply_item_property(), cb_apply_item_stat(), cb_apply_item_stat_all(), and cb_apply_item_stat_to_temp(). |
|
|
Definition at line 627 of file items.c. Referenced by apply_item_property(), and cb_apply_item_stat(). |
|
|
Definition at line 626 of file items.c. Referenced by apply_item_property(), and cb_apply_item_stat(). |
|
|
Initial value: {
{STAT_STRENGTH, gettext("St")},
{STAT_DEXTERITY, gettext("Dx")},
{STAT_TOUGHNESS, gettext("To")},
{STAT_MANA, gettext("Ma")},
{STAT_WILLPOWER, gettext("Wi")},
{STAT_LIGHTRADIUS, gettext("Light")},
{STAT_SPEED, gettext("Spd")}
}
Definition at line 758 of file items.c. Referenced by append_armor_description(). |
|
|
Definition at line 204 of file items.c. Referenced by item_by_sequence(), items_menu(), and itemstring(). |
|
|
Definition at line 1048 of file items.c. Referenced by add_item(). |
|
|
Definition at line 1047 of file items.c. Referenced by init_items(). |
|
|
Initial value:
{
1,
1,
1,
1,
1,
1,
1,
1,
2,
1
}
Definition at line 1391 of file items.c. Referenced by do_wear_item(). |
|
|
Initial value:
{
gettext("pristine "),
gettext("slightly rusty "),
gettext("rusty "),
gettext("very rusty ")
}
Definition at line 680 of file items.c. Referenced by itemname(). |
|
|
Definition at line 768 of file items.c. Referenced by append_armor_description(), and cb_apply_item_stat_to_temp(). |
1.3.6