OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sat, 30 Sep 2017 08:44:26 +0000 (17:44 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 30 Sep 2017 08:44:26 +0000 (17:44 +0900)
src/bldg.c
src/cmd4.c
src/externs.h
src/files.c
src/flavor.c
src/init1.c
src/racial.c
src/spells3.c

index 593155a..b08a78a 100644 (file)
@@ -2027,7 +2027,7 @@ static bool kankin(void)
  * @param r_idx 判定対象となるモンスターのID
  * @return 悪夢の元凶となり得るか否か。
  */
-bool get_nightmare(int r_idx)
+bool get_nightmare(IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -2323,9 +2323,9 @@ static void town_history(void)
  * @return ダメージ期待値
  * @note 基本ダメージ量と重量はこの部位では計算に加わらない。
  */
-s16b calc_crit_ratio_shot(int plus_ammo, int plus_bow)
+HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow)
 {
-       int i;
+       HIT_POINT i;
        object_type *j_ptr =  &inventory[INVEN_BOW];
        
        /* Extract "shot" power */
index 3ed8cb0..9925ac1 100644 (file)
@@ -7792,7 +7792,7 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, int d
        }
 
        /* Free the "feat_idx" array */
-       C_KILL(feat_idx, max_f_idx, int);
+       C_KILL(feat_idx, max_f_idx, IDX);
 }
 
 
@@ -8176,7 +8176,7 @@ static bool do_cmd_knowledge_quests_aux(FILE *fff, IDX q_idx)
        if (is_fixed_quest_idx(q_idx))
        {
                /* Set the quest number temporary */
-               int old_quest = p_ptr->inside_quest;
+               IDX old_quest = p_ptr->inside_quest;
 
                p_ptr->inside_quest = q_idx;
 
@@ -8299,13 +8299,8 @@ static void do_cmd_knowledge_quests_wiz_random(FILE *fff)
                        total++;
 
                        /* Print the quest info */
-#ifdef JP
-                       sprintf(tmp_str, "  %s (%d階, %s)\n",
-                               quest[i].name, quest[i].level, r_name+r_info[quest[i].r_idx].name);
-#else
-                       sprintf(tmp_str, "  %s (%d, %s)\n",
-                               quest[i].name, quest[i].level, r_name+r_info[quest[i].r_idx].name);
-#endif
+                       sprintf(tmp_str, _("  %s (%d階, %s)\n", "  %s (%d, %s)\n"),
+                               quest[i].name, (int)quest[i].level, r_name+r_info[quest[i].r_idx].name);
                        fputs(tmp_str, fff);
                }
        }
@@ -8359,7 +8354,7 @@ static void do_cmd_knowledge_quests(void)
        }
 
        /* Allocate Memory */
-       C_MAKE(quest_num, max_quests, int);
+       C_MAKE(quest_num, max_quests, IDX);
 
        /* Sort by compete level */
        for (i = 1; i < max_quests; i++) quest_num[i] = i;
@@ -8389,7 +8384,7 @@ static void do_cmd_knowledge_quests(void)
        fd_kill(file_name);
 
        /* Free Memory */
-       C_KILL(quest_num, max_quests, int);
+       C_KILL(quest_num, max_quests, IDX);
 }
 
 
index 4cf58be..581c5b9 100644 (file)
@@ -1293,7 +1293,7 @@ extern void store_init(int town_num, int store_num);
 extern void move_to_black_market(object_type * o_ptr);
 
 /* bldg.c */
-extern bool get_nightmare(int r_idx);
+extern bool get_nightmare(IDX r_idx);
 extern void battle_monsters(void);
 extern void do_cmd_bldg(void);
 extern void do_cmd_quest(void);
@@ -1301,7 +1301,7 @@ extern void quest_discovery(int q_idx);
 extern IDX quest_number(DEPTH level);
 extern IDX random_quest_number(DEPTH level);
 extern bool tele_town(void);
-extern s16b calc_crit_ratio_shot(int plus_ammo,int plus_bow);
+extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow);
 extern s16b calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, int dam);
 extern s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari);
 
index b8cff46..d2e71b2 100644 (file)
@@ -4425,13 +4425,13 @@ static void dump_aux_class_special(FILE *fff)
 static void dump_aux_quest(FILE *fff)
 {
        int i;
-       int *quest_num;
+       IDX *quest_num;
        int dummy;
 
        fprintf(fff, _("\n\n  [クエスト情報]\n", "\n\n  [Quest Information]\n"));
 
        /* Allocate Memory */
-       C_MAKE(quest_num, max_quests, int);
+       C_MAKE(quest_num, max_quests, IDX);
 
        /* Sort by compete level */
        for (i = 1; i < max_quests; i++) quest_num[i] = i;
@@ -4447,7 +4447,7 @@ static void dump_aux_quest(FILE *fff)
        fputc('\n', fff);
 
        /* Free Memory */
-       C_KILL(quest_num, max_quests, int);
+       C_KILL(quest_num, max_quests, IDX);
 }
 
 
index bc6ca61..71c985a 100644 (file)
@@ -201,8 +201,8 @@ void get_table_sindarin(char *out_string)
  */
 static void shuffle_flavors(byte tval)
 {
-       s16b *k_idx_list;
-       int k_idx_list_num = 0;
+       IDX *k_idx_list;
+       IDX k_idx_list_num = 0;
        int i;
 
        /* Allocate an array for a list of k_idx */
index 67b888e..2720289 100644 (file)
@@ -1675,10 +1675,10 @@ errr parse_f_info(char *buf, header *head)
                }
 
                /* Default "mimic" */
-               f_ptr->mimic = i;
+               f_ptr->mimic = (IDX)i;
 
                /* Default "destroyed state" -- if not specified */
-               f_ptr->destroyed = i;
+               f_ptr->destroyed = (IDX)i;
 
                /* Default "states" */
                for (i = 0; i < MAX_FEAT_STATES; i++) f_ptr->state[i].action = FF_FLAG_MAX;
index aef3713..c92af19 100644 (file)
@@ -603,7 +603,7 @@ typedef struct power_desc_type power_desc_type;
 struct power_desc_type
 {
        char name[40];
-       int  level;
+       PLAYER_LEVEL level;
        int  cost;
        int  stat;
        int  fail;
@@ -618,7 +618,7 @@ struct power_desc_type
  */
 static int racial_chance(power_desc_type *pd_ptr)
 {
-       s16b min_level  = pd_ptr->level;
+       PLAYER_LEVEL min_level  = pd_ptr->level;
        int  difficulty = pd_ptr->fail;
 
        int i;
index 0167c93..e70cbb4 100644 (file)
@@ -5154,11 +5154,12 @@ bool brand_bolts(void)
  * @details
  * Note that this function is one of the more "dangerous" ones...
  */
-static s16b poly_r_idx(int r_idx)
+static IDX poly_r_idx(IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
-       int i, r, lev1, lev2;
+       int i, r;
+       DEPTH lev1, lev2;
 
        /* Hack -- Uniques/Questors never polymorph */
        if ((r_ptr->flags1 & RF1_UNIQUE) ||