OSDN Git Service

[Refactor] #37353 ソースファイル改名。
[hengband/hengband.git] / src / bldg.c
index d6e7aab..85e70fd 100644 (file)
@@ -1438,10 +1438,10 @@ static bool gamble_comm(int cmd)
  * 自爆以外のなんらかのHP攻撃手段を持っていること。
  * @return 参加できるか否か
  */
-static bool vault_aux_battle(int r_idx)
+static bool vault_aux_battle(MONRACE_IDX r_idx)
 {
        int i;
-       int dam = 0;
+       HIT_POINT dam = 0;
 
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1503,7 +1503,7 @@ void battle_monsters(void)
                tekitou = FALSE;
                for(i = 0; i < 4; i++)
                {
-                       IDX r_idx;
+                       MONRACE_IDX r_idx;
                        int j;
                        while (1)
                        {
@@ -2027,7 +2027,7 @@ static bool kankin(void)
  * @param r_idx 判定対象となるモンスターのID
  * @return 悪夢の元凶となり得るか否か。
  */
-bool get_nightmare(IDX r_idx)
+bool get_nightmare(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -2356,7 +2356,7 @@ HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow)
  * @param dam 基本ダメージ量
  * @return ダメージ期待値
  */
-HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  int dam)
+HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  HIT_POINT dam)
 {
        u32b num;
        int i, k, crit;
@@ -2398,7 +2398,7 @@ HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  int da
  * @param dokubari 毒針処理か否か
  * @return ダメージ期待値
  */
-HIT_POINT calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
+HIT_POINT calc_expect_crit(int weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari)
 {
        u32b k, num;
        int i;
@@ -2871,7 +2871,7 @@ static bool item_tester_hook_ammo(object_type *o_ptr)
 static int compare_weapons(int bcost)
 {
        int i, n;
-       int item, item2;
+       OBJECT_IDX item, item2;
        object_type *o_ptr[2];
        object_type orig_weapon;
        object_type *i_ptr;
@@ -3184,7 +3184,7 @@ static void give_one_ability_of_object(object_type *to_ptr, object_type *from_pt
 static int repair_broken_weapon_aux(int bcost)
 {
        s32b cost;
-       int item, mater;
+       OBJECT_IDX item, mater;
        object_type *o_ptr, *mo_ptr; /* broken weapon and material weapon */
        object_kind *k_ptr;
        int i, dd_bonus, ds_bonus;
@@ -3458,7 +3458,8 @@ static int repair_broken_weapon(int bcost)
  */
 static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
 {
-       int         i, item;
+       int         i;
+       OBJECT_IDX  item;
        bool        okay = FALSE;
        object_type *o_ptr;
        cptr        q, s;
@@ -3576,7 +3577,8 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
  */
 static void building_recharge(void)
 {
-       int         item, lev;
+       OBJECT_IDX  item;
+       int         lev;
        object_type *o_ptr;
        object_kind *k_ptr;
        cptr        q, s;
@@ -3753,7 +3755,7 @@ if (get_check(format("そのロッドを$%d で再充填しますか?",
                        max_charges = o_ptr->number * k_ptr->pval - o_ptr->pval;
 
                /* Get the quantity for staves and wands */
-               charges = get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price), 
+               charges = (PARAMETER_VALUE)get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price), 
                                        MIN(p_ptr->au / price, max_charges));
 
                /* Do nothing */
@@ -4022,7 +4024,7 @@ static bool research_mon(void)
 {
        IDX i;
        int n;
-       IDX r_idx;
+       MONRACE_IDX r_idx;
        char sym, query;
        char buf[128];
 
@@ -4291,8 +4293,8 @@ static bool research_mon(void)
  */
 static void bldg_process_command(building_type *bldg, int i)
 {
-       int bact = bldg->actions[i];
-       int bcost;
+       BACT_IDX bact = bldg->actions[i];
+       PRICE bcost;
        bool paid = FALSE;
        int amt;
 
@@ -4449,7 +4451,7 @@ static void bldg_process_command(building_type *bldg, int i)
                        else if(quest[QUEST_SERPENT].status != QUEST_STATUS_FINISHED) max_depth = 99;
                }
                amt = get_quantity(format(_("%sの何階にテレポートしますか?", "Teleport to which level of %s? "), 
-                                                       d_name + d_info[select_dungeon].name), max_depth);
+                                                       d_name + d_info[select_dungeon].name), (QUANTITY)max_depth);
 
                if (amt > 0)
                {
@@ -4812,7 +4814,7 @@ IDX quest_number(DEPTH level)
        if (p_ptr->inside_quest)
                return (p_ptr->inside_quest);
 
-       for (i = 0; i < max_quests; i++)
+       for (i = 0; i < max_q_idx; i++)
        {
                if (quest[i].status != QUEST_STATUS_TAKEN) continue;