diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:59 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:59 +0100 |
commit | 63fae54381d0898503c5dc7f4dcfabc125c04807 (patch) | |
tree | 00b743f932c4c3fc7feb7c8a4e87be520e47d2e9 /src/xtra1.cc | |
parent | 71a3bdb100d427ceedce7b2c8fe94de6181341d1 (diff) |
Move xtra1.cc function declarations to separate header
Make a couple of functions private to the module while we're
at it.
Diffstat (limited to 'src/xtra1.cc')
-rw-r--r-- | src/xtra1.cc | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/src/xtra1.cc b/src/xtra1.cc index b7998369..daf19bc0 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -1,7 +1,3 @@ -/* File: misc.c */ - -/* Purpose: misc code */ - /* * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke * @@ -10,6 +6,8 @@ * included in all such copies. */ +#include "xtra1.hpp" + #include "angband.h" #include "corrupt.hpp" #include "gods.hpp" @@ -1573,8 +1571,7 @@ static void calc_powers(void) /* * Calculate the player's sanity */ - -void calc_sanity(void) +static void calc_sanity() { int bonus, msane; @@ -2719,6 +2716,33 @@ void apply_flags(u32b f1, u32b f2, u32b f3, u32b f4, u32b f5, u32b esp, s16b pva } } + + +/** + * Are barehand fighter's hands empty? + */ +static bool_ monk_empty_hands(void) +{ + int i; + object_type *o_ptr; + + if (p_ptr->melee_style != SKILL_HAND) return FALSE; + + i = 0; + while (p_ptr->body_parts[i] == INVEN_WIELD) + { + o_ptr = &p_ptr->inventory[INVEN_WIELD + i]; + + if (o_ptr->k_idx) return FALSE; + + i++; + } + + return TRUE; +} + + + /* * Calculate the players current "state", taking into account * not only race/class intrinsics, but also objects being worn @@ -4310,26 +4334,6 @@ void handle_stuff(void) } -bool_ monk_empty_hands(void) -{ - int i; - object_type *o_ptr; - - if (p_ptr->melee_style != SKILL_HAND) return FALSE; - - i = 0; - while (p_ptr->body_parts[i] == INVEN_WIELD) - { - o_ptr = &p_ptr->inventory[INVEN_WIELD + i]; - - if (o_ptr->k_idx) return FALSE; - - i++; - } - - return TRUE; -} - bool_ monk_heavy_armor(void) { u16b monk_arm_wgt = 0; |