OSDN Git Service

[Version] 2.2.1.6.
[hengband/hengband.git] / src / flavor.c
index 4b46127..d606075 100644 (file)
@@ -65,7 +65,6 @@ static bool object_easy_know(int i)
                }
        }
 
-       /* Nope */
        return (FALSE);
 }
 
@@ -199,11 +198,11 @@ void get_table_sindarin(char *out_string)
  * @return なし
  * @details 巻物、各種魔道具などに利用される。
  */
-static void shuffle_flavors(byte tval)
+static void shuffle_flavors(OBJECT_TYPE_VALUE tval)
 {
-       s16b *k_idx_list;
-       int k_idx_list_num = 0;
-       int i;
+       IDX *k_idx_list;
+       IDX k_idx_list_num = 0;
+       IDX i;
 
        /* Allocate an array for a list of k_idx */
        C_MAKE(k_idx_list, max_k_idx, s16b);
@@ -281,7 +280,7 @@ static void shuffle_flavors(byte tval)
  */
 void flavor_init(void)
 {
-       int i;
+       KIND_OBJECT_IDX i;
        u32b state_backup[4];
 
        /* Hack -- Backup the RNG state */
@@ -966,7 +965,7 @@ static flag_insc_table flag_insc_sust[] =
  * sprintf(t, "%+d", n), and return a pointer to the terminator.
  * Note that we always print a sign, either "+" or "-".
  */
-static char *inscribe_flags_aux(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
+static char *inscribe_flags_aux(flag_insc_table *fi_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
 {
 #ifndef JP
        (void)kanji;
@@ -994,7 +993,7 @@ static char *inscribe_flags_aux(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE]
  * @param flgs 対応するオブジェクトのフラグ文字列
  * @return 1つでも該当の特性があったらTRUEを返す。
  */
-static bool have_flag_of(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE])
+static bool have_flag_of(flag_insc_table *fi_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
 {
        while (fi_ptr->english)
        {
@@ -1018,7 +1017,7 @@ static bool have_flag_of(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE])
 static char *get_ability_abbreviation(char *ptr, object_type *o_ptr, bool kanji, bool all)
 {
        char *prev_ptr = ptr;
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        /* Extract the flags */
        object_flags(o_ptr, flgs);
@@ -1249,7 +1248,7 @@ bool object_is_quest_target(object_type *o_ptr)
 {
        if (p_ptr->inside_quest)
        {
-               int a_idx = quest[p_ptr->inside_quest].k_idx;
+               ARTIFACT_IDX a_idx = quest[p_ptr->inside_quest].k_idx;
                if (a_idx)
                {
                        artifact_type *a_ptr = &a_info[a_idx];
@@ -1316,7 +1315,7 @@ bool object_is_quest_target(object_type *o_ptr)
  *   OD_NO_FLAVOR        : Allow to hidden flavor\n
  *   OD_FORCE_FLAVOR     : Get un-shuffled flavor name\n
  */
-void object_desc(char *buf, object_type *o_ptr, u32b mode)
+void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode)
 {
        /* Extract object kind name */
        cptr            kindname = k_name + k_info[o_ptr->k_idx].name;
@@ -1327,8 +1326,8 @@ void object_desc(char *buf, object_type *o_ptr, u32b mode)
        /* Assume no "modifier" string */
        cptr            modstr = "";
 
-       int             power;
-       int                             fire_rate;
+       int power;
+       int fire_rate;
 
        bool            aware = FALSE;
        bool            known = FALSE;
@@ -1348,7 +1347,7 @@ void object_desc(char *buf, object_type *o_ptr, u32b mode)
        char            tmp_val2[MAX_NLEN+10];
        char            fake_insc_buf[30];
 
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        object_type *bow_ptr;
 
@@ -2101,7 +2100,7 @@ void object_desc(char *buf, object_type *o_ptr, u32b mode)
                        {
                                char k = t[-1];
 
-                               /* XXX XXX XXX Mega-Hack */
+                               /* Mega-Hack */
 
                                /* Hack -- "Cutlass-es" and "Torch-es" */
                                if ((k == 's') || (k == 'h')) *t++ = 'e';
@@ -2174,11 +2173,11 @@ void object_desc(char *buf, object_type *o_ptr, u32b mode)
                        if (*str)
                        {
                                /* Find the '#' */
-                               cptr str = my_strchr(quark_str(o_ptr->inscription), '#');
+                               cptr str_aux = my_strchr(quark_str(o_ptr->inscription), '#');
 
                                /* Add the false name */
                                t = object_desc_str(t,"『");
-                               t = object_desc_str(t, &str[1]);
+                               t = object_desc_str(t, &str_aux[1]);
                                t = object_desc_str(t,"』");
                        }
                }
@@ -2448,7 +2447,7 @@ void object_desc(char *buf, object_type *o_ptr, u32b mode)
        {
                int avgdam = o_ptr->dd * (o_ptr->ds + 1) * 10 / 2;
                int tmul = bow_tmul(bow_ptr->sval);
-               s16b energy_fire = bow_energy(bow_ptr->sval);
+               ENERGY energy_fire = bow_energy(bow_ptr->sval);
 
                /* See if the bow is "known" - then set damage bonus */
                if (object_is_known(bow_ptr)) avgdam += (bow_ptr->to_d * 10);