From d84e50da7a1fd92e5c6615add2a3c4638288a4e0 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Sat, 7 Nov 2009 21:28:28 +0300 Subject: Remove unused check_weapon_tool_size and get_inv_hand_tool. --- crawl-ref/source/itemprop.cc | 42 ------------------------------------------ crawl-ref/source/itemprop.h | 2 -- 2 files changed, 44 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 2e93a44b18..66ac5748b1 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -2033,21 +2033,6 @@ int fit_item_throwable_size( const item_def &item, size_type size ) : ret + 5); } -// Returns true if weapon is usable as a tool. -// Note that we assume that tool usable >= wieldable. -bool check_weapon_tool_size( const item_def &item, size_type size ) -{ - ASSERT( item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES ); - - // Staves are currently usable for everyone just to be nice. - if (item.base_type == OBJ_STAVES || weapon_skill(item) == SK_STAVES) - return (true); - - const int fit = cmp_weapon_size( item, size ); - - return (fit >= -3 && fit <= 1); -} - // Returns true if weapon is usable as a weapon. bool check_weapon_wieldable_size( const item_def &item, size_type size ) { @@ -2110,33 +2095,6 @@ int get_inv_wielded( void ) return (player_weapon_wielded() ? you.equip[EQ_WEAPON] : -1); } -// Returns the you.inv[] index of our hand tool or -1 (no item, not usable) -// Note that we don't count armour and such as "tools" here because -// this function is used to judge if the item will sticky curse to -// our hands. -int get_inv_hand_tool( void ) -{ - const int tool = you.equip[EQ_WEAPON]; - - // FIXME - /* - if (tool == -1 || !is_tool( you.inv[tool] )) - return (-1); - - if (you.inv[tool].base_type == OBJ_WEAPONS - || you.inv[tool].base_type == OBJ_STAVES) - { - // assuring that bad "shape" weapons aren't in hand - ASSERT( check_weapon_shape( you.inv[tool], false ) ); - - if (!check_weapon_tool_size( you.inv[tool], you.body_size() )) - return (-1); - } - */ - - return (tool); -} - // Returns the you.inv[] index of the thing in our hand... this is provided // as a service to specify that both of the above are irrelevant. // Do not use this for low level functions dealing with wielding directly. diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index b63ee75ae0..a7e08bd1ef 100644 --- a/crawl-ref/source/itemprop.h +++ b/crawl-ref/source/itemprop.h @@ -664,7 +664,6 @@ bool shield_reflects(const item_def &shield); int weapon_rarity( int w_type ); int cmp_weapon_size( const item_def &item, size_type size ); -bool check_weapon_tool_size( const item_def &item, size_type size ); int fit_weapon_wieldable_size( const item_def &item, size_type size ); bool check_weapon_wieldable_size( const item_def &item, size_type size ); @@ -676,7 +675,6 @@ int weapon_ev_bonus( const item_def &wpn, int skill, size_type body, int dex, bool hide_hidden = false ); int get_inv_wielded( void ); -int get_inv_hand_tool( void ); int get_inv_in_hand( void ); hands_reqd_type hands_reqd( const item_def &item, size_type size ); -- cgit v1.2.3-54-g00ecf