items.cc File Reference

#include "AppHdr.h"
#include "items.h"
#include "cio.h"
#include "clua.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include "externs.h"
#include "arena.h"
#include "artefact.h"
#include "beam.h"
#include "branch.h"
#include "coord.h"
#include "coordit.h"
#include "dbg-util.h"
#include "debug.h"
#include "decks.h"
#include "delay.h"
#include "dgnevent.h"
#include "directn.h"
#include "effects.h"
#include "env.h"
#include "food.h"
#include "godpassive.h"
#include "godprayer.h"
#include "hiscores.h"
#include "invent.h"
#include "it_use2.h"
#include "item_use.h"
#include "itemname.h"
#include "itemprop.h"
#include "libutil.h"
#include "makeitem.h"
#include "message.h"
#include "misc.h"
#include "mon-util.h"
#include "mon-stuff.h"
#include "mutation.h"
#include "notes.h"
#include "options.h"
#include "place.h"
#include "player.h"
#include "quiver.h"
#include "religion.h"
#include "shopping.h"
#include "showsymb.h"
#include "spl-book.h"
#include "spl-util.h"
#include "state.h"
#include "stairs.h"
#include "stuff.h"
#include "areas.h"
#include "stash.h"
#include "terrain.h"
#include "travel.h"
#include "hints.h"
#include "viewchar.h"
#include "viewgeom.h"
#include "xom.h"

Defines

#define PORTAL_VAULT_ORIGIN_KEY   "portal_vault_origin"
#define NON_IDENT_FLAGS
#define slotisfree(s)   ((s) >= 0 && (s) < ENDOFPACK && !you.inv[s].defined())

Typedefs

typedef bool(* item_comparer )(const item_def &pickup_item, const item_def &inv_item)

Functions

void fix_item_coordinates ()
void link_items (void)
bool dec_inv_item_quantity (int obj, int amount, bool suppress_burden)
bool dec_mitm_item_quantity (int obj, int amount)
void inc_inv_item_quantity (int obj, int amount, bool suppress_burden)
void inc_mitm_item_quantity (int obj, int amount)
void init_item (int item)
int get_item_slot (int reserve)
void unlink_item (int dest)
void destroy_item (item_def &item, bool never_created)
void destroy_item (int dest, bool never_created)
void item_was_lost (const item_def &item)
void item_was_destroyed (const item_def &item, int cause)
void lose_item_stack (const coord_def &where)
void item_list_on_square (std::vector< const item_def * > &items, int obj, bool force_squelch)
bool need_to_autopickup ()
void request_autopickup (bool do_pickup)
int item_name_specialness (const item_def &item)
void item_check (bool verbose)
bool origin_known (const item_def &item)
void origin_reset (item_def &item)
void origin_set_unknown (item_def &item)
void origin_set_startequip (item_def &item)
void origin_set_monster (item_def &item, const monster *mons)
void origin_purchased (item_def &item)
void origin_acquired (item_def &item, int agent)
void origin_set_inventory (void(*oset)(item_def &item))
void origin_set (const coord_def &where)
void origin_set_monstercorpse (item_def &item, const coord_def &where)
std::string origin_monster_name (const item_def &item)
bool origin_describable (const item_def &item)
bool origin_is_god_gift (const item_def &item, god_type *god)
bool origin_is_acquirement (const item_def &item, item_source_type *type)
std::string origin_desc (const item_def &item)
bool pickup_single_item (int link, int qty)
void pickup (bool partial_quantity)
bool is_stackable_item (const item_def &item)
iflags_t ident_flags (const item_def &item)
bool items_similar (const item_def &item1, const item_def &item2, bool ignore_ident)
bool items_stack (const item_def &item1, const item_def &item2, bool force_merge, bool ignore_ident)
void merge_item_stacks (item_def &source, item_def &dest, int quant)
int find_free_slot (const item_def &i)
void note_inscribe_item (item_def &item)
int move_item_to_player (int obj, int quant_got, bool quiet, bool ignore_burden)
void mark_items_non_pickup_at (const coord_def &pos)
bool move_item_to_grid (int *const obj, const coord_def &p, bool silent)
void move_item_stack_to_grid (const coord_def &from, const coord_def &to)
bool copy_item_to_grid (const item_def &item, const coord_def &p, int quant_drop, bool mark_dropped, bool silent)
bool move_top_item (const coord_def &pos, const coord_def &dest)
const item_deftop_item_at (const coord_def &where, bool allow_mimic_item)
item_defcorpse_at (coord_def pos, int *num_corpses)
bool multiple_items_at (const coord_def &where, bool allow_mimic_item)
bool drop_item (int item_dropped, int quant_drop)
int get_equip_slot (const item_def *item)
mon_inv_type get_mon_equip_slot (const monster *mon, const item_def &item)
void drop ()
bool need_to_autoinscribe ()
void request_autoinscribe (bool do_inscribe)
void autoinscribe ()
bool item_needs_autopickup (const item_def &item)
bool can_autopickup ()
void autopickup ()
int inv_count (void)
item_deffind_floor_item (object_class_type cls, int sub_type)
int item_on_floor (const item_def &item, const coord_def &where)
int get_max_subtype (object_class_type base_type)
item_def find_item_type (object_class_type base_type, std::string name)
equipment_type item_equip_slot (const item_def &item)
bool item_is_equipped (const item_def &item, bool quiver_too)
bool item_is_melded (const item_def &item)
bool get_item_by_name (item_def *item, char *specs, object_class_type class_wanted, bool create_for_real)
coord_def orb_position ()
void move_items (const coord_def r, const coord_def p)
item_info get_item_info (const item_def &item)

Variables

std::vector< SelItemitems_for_multidrop

Define Documentation

#define NON_IDENT_FLAGS

#define PORTAL_VAULT_ORIGIN_KEY   "portal_vault_origin"

#define slotisfree (  )     ((s) >= 0 && (s) < ENDOFPACK && !you.inv[s].defined())


Typedef Documentation

typedef bool(* item_comparer)(const item_def &pickup_item, const item_def &inv_item)


Function Documentation

void autoinscribe (  ) 

void autopickup (  ) 

bool can_autopickup (  ) 

Here is the call graph for this function:

bool copy_item_to_grid ( const item_def item,
const coord_def p,
int  quant_drop,
bool  mark_dropped,
bool  silent 
)

Here is the call graph for this function:

item_def* corpse_at ( coord_def  pos,
int *  num_corpses 
)

Here is the call graph for this function:

bool dec_inv_item_quantity ( int  obj,
int  amount,
bool  suppress_burden 
)

Here is the call graph for this function:

bool dec_mitm_item_quantity ( int  obj,
int  amount 
)

Here is the call graph for this function:

void destroy_item ( int  dest,
bool  never_created 
)

Here is the call graph for this function:

void destroy_item ( item_def item,
bool  never_created 
)

Here is the call graph for this function:

void drop ( void   ) 

Here is the call graph for this function:

bool drop_item ( int  item_dropped,
int  quant_drop 
)

Here is the call graph for this function:

item_def* find_floor_item ( object_class_type  cls,
int  sub_type 
)

int find_free_slot ( const item_def i  ) 

Here is the call graph for this function:

item_def find_item_type ( object_class_type  base_type,
std::string  name 
)

Here is the call graph for this function:

void fix_item_coordinates ( void   ) 

int get_equip_slot ( const item_def item  ) 

Here is the call graph for this function:

bool get_item_by_name ( item_def item,
char *  specs,
object_class_type  class_wanted,
bool  create_for_real 
)

Here is the call graph for this function:

item_info get_item_info ( const item_def item  ) 

Here is the call graph for this function:

int get_item_slot ( int  reserve  ) 

Here is the call graph for this function:

int get_max_subtype ( object_class_type  base_type  ) 

mon_inv_type get_mon_equip_slot ( const monster mon,
const item_def item 
)

Here is the call graph for this function:

iflags_t ident_flags ( const item_def item  ) 

Here is the call graph for this function:

void inc_inv_item_quantity ( int  obj,
int  amount,
bool  suppress_burden 
)

Here is the call graph for this function:

void inc_mitm_item_quantity ( int  obj,
int  amount 
)

void init_item ( int  item  ) 

int inv_count ( void   ) 

bool is_stackable_item ( const item_def item  ) 

Here is the call graph for this function:

void item_check ( bool  verbose  ) 

Here is the call graph for this function:

equipment_type item_equip_slot ( const item_def item  ) 

Here is the call graph for this function:

bool item_is_equipped ( const item_def item,
bool  quiver_too 
)

Here is the call graph for this function:

bool item_is_melded ( const item_def item  ) 

Here is the call graph for this function:

void item_list_on_square ( std::vector< const item_def * > &  items,
int  obj,
bool  force_squelch 
)

int item_name_specialness ( const item_def item  ) 

Here is the call graph for this function:

bool item_needs_autopickup ( const item_def item  ) 

Here is the call graph for this function:

int item_on_floor ( const item_def item,
const coord_def where 
)

void item_was_destroyed ( const item_def item,
int  cause 
)

Here is the call graph for this function:

void item_was_lost ( const item_def item  ) 

Here is the call graph for this function:

bool items_similar ( const item_def item1,
const item_def item2,
bool  ignore_ident 
)

Here is the call graph for this function:

bool items_stack ( const item_def item1,
const item_def item2,
bool  force_merge,
bool  ignore_ident 
)

Here is the call graph for this function:

void link_items ( void   ) 

Here is the call graph for this function:

void lose_item_stack ( const coord_def where  ) 

Here is the call graph for this function:

void mark_items_non_pickup_at ( const coord_def pos  ) 

void merge_item_stacks ( item_def source,
item_def dest,
int  quant 
)

Here is the call graph for this function:

void move_item_stack_to_grid ( const coord_def from,
const coord_def to 
)

bool move_item_to_grid ( int *const   obj,
const coord_def p,
bool  silent 
)

Here is the call graph for this function:

int move_item_to_player ( int  obj,
int  quant_got,
bool  quiet,
bool  ignore_burden 
)

Here is the call graph for this function:

void move_items ( const coord_def  r,
const coord_def  p 
)

Here is the call graph for this function:

bool move_top_item ( const coord_def pos,
const coord_def dest 
)

Here is the call graph for this function:

bool multiple_items_at ( const coord_def where,
bool  allow_mimic_item 
)

Here is the call graph for this function:

bool need_to_autoinscribe (  ) 

bool need_to_autopickup (  ) 

void note_inscribe_item ( item_def item  ) 

Here is the call graph for this function:

coord_def orb_position (  ) 

Here is the call graph for this function:

void origin_acquired ( item_def item,
int  agent 
)

Here is the call graph for this function:

std::string origin_desc ( const item_def item  ) 

Here is the call graph for this function:

bool origin_describable ( const item_def item  ) 

Here is the call graph for this function:

bool origin_is_acquirement ( const item_def item,
item_source_type type 
)

bool origin_is_god_gift ( const item_def item,
god_type god 
)

bool origin_known ( const item_def item  ) 

std::string origin_monster_name ( const item_def item  ) 

Here is the call graph for this function:

void origin_purchased ( item_def item  ) 

Here is the call graph for this function:

void origin_reset ( item_def item  ) 

void origin_set ( const coord_def where  ) 

Here is the call graph for this function:

void origin_set_inventory ( void(*)(item_def &item)  oset  ) 

void origin_set_monster ( item_def item,
const monster mons 
)

Here is the call graph for this function:

void origin_set_monstercorpse ( item_def item,
const coord_def where 
)

void origin_set_startequip ( item_def item  ) 

Here is the call graph for this function:

void origin_set_unknown ( item_def item  ) 

Here is the call graph for this function:

void pickup ( bool  partial_quantity  ) 

Here is the call graph for this function:

bool pickup_single_item ( int  link,
int  qty 
)

Here is the call graph for this function:

void request_autoinscribe ( bool  do_inscribe  ) 

void request_autopickup ( bool  do_pickup  ) 

const item_def* top_item_at ( const coord_def where,
bool  allow_mimic_item 
)

Here is the call graph for this function:

void unlink_item ( int  dest  ) 

Here is the call graph for this function:


Variable Documentation


Generated on Thu Jan 13 13:07:38 2011 by  doxygen 1.5.6