OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / mutation.c
index 525d94a..54694ea 100644 (file)
@@ -1999,12 +1999,7 @@ void do_cmd_knowledge_mutations(void)
        my_fclose(fff);
 
        /* Display the file contents */
-#ifdef JP
-show_file(TRUE, file_name, "突然変異", 0, 0);
-#else
-       show_file(TRUE, file_name, "Mutations", 0, 0);
-#endif
-
+       show_file(TRUE, file_name, _("突然変異", "Mutations"), 0, 0);
 
        /* Remove the file */
        fd_kill(file_name);
@@ -2015,7 +2010,7 @@ show_file(TRUE, file_name, "突然変異", 0, 0);
  * @param x ビット数を調べたい変数
  * @return ビット数
  */
-int count_bits(u32b x)
+int count_bits(BIT_FLAGS x)
 {
        int n = 0;
 
@@ -2078,7 +2073,7 @@ int calc_mutant_regenerate_mod(void)
  * @brief 突然変異レイシャル上で口を使うよりを行った際に歌や呪術を停止する /
  * @return なし
  */
-void mutation_stop_mouth()
+static void mutation_stop_mouth(void)
 {
        if (music_singing_any()) stop_singing();
        if (hex_spelling_any()) stop_hex_spell_all();
@@ -2154,8 +2149,8 @@ bool mutation_power_aux(u32b power)
 
                                /* Only works on adjacent monsters */
                                if (!get_rep_dir2(&dir)) return FALSE;
-                               y = py + ddy[dir];
-                               x = px + ddx[dir];
+                               y = p_ptr->y + ddy[dir];
+                               x = p_ptr->x + ddx[dir];
                                c_ptr = &cave[y][x];
 
                                mutation_stop_mouth();
@@ -2215,8 +2210,8 @@ bool mutation_power_aux(u32b power)
                                feature_type *f_ptr, *mimic_f_ptr;
 
                                if (!get_rep_dir2(&dir)) return FALSE;
-                               y = py + ddy[dir];
-                               x = px + ddx[dir];
+                               y = p_ptr->y + ddy[dir];
+                               x = p_ptr->x + ddx[dir];
                                c_ptr = &cave[y][x];
                                f_ptr = &f_info[c_ptr->feat];
                                mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
@@ -2230,11 +2225,7 @@ bool mutation_power_aux(u32b power)
                                }
                                else if (have_flag(f_ptr->flags, FF_PERMANENT))
                                {
-#ifdef JP
-                                       msg_format("いてっ!この%sはあなたの歯より硬い!", f_name + mimic_f_ptr->name);
-#else
-                                       msg_format("Ouch!  This %s is harder than your teeth!", f_name + mimic_f_ptr->name);
-#endif
+                                       msg_format(_("いてっ!この%sはあなたの歯より硬い!", "Ouch!  This %s is harder than your teeth!"), f_name + mimic_f_ptr->name);
                                        break;
                                }
                                else if (c_ptr->m_idx)
@@ -2265,11 +2256,7 @@ bool mutation_power_aux(u32b power)
                                }
                                else
                                {
-#ifdef JP
-                                       msg_format("この%sはとてもおいしい!", f_name + mimic_f_ptr->name);
-#else
-                                       msg_format("This %s is very filling!", f_name + mimic_f_ptr->name);
-#endif
+                                       msg_format(_("この%sはとてもおいしい!", "This %s is very filling!"), f_name + mimic_f_ptr->name);
                                        (void)set_food(p_ptr->food + 10000);
                                }
 
@@ -2325,11 +2312,7 @@ bool mutation_power_aux(u32b power)
                        break;
 
                case MUT1_POLYMORPH:
-#ifdef JP
-                       if (!get_check("変身します。よろしいですか?")) return FALSE;
-#else
-                       if (!get_check("You will polymorph your self. Are you sure? ")) return FALSE;
-#endif
+                       if (!get_check(_("変身します。よろしいですか?", "You will polymorph your self. Are you sure? "))) return FALSE;
                        do_poly_self();
                        break;
 
@@ -2343,7 +2326,7 @@ bool mutation_power_aux(u32b power)
                                int i;
                                for (i = 0; i < 8; i++)
                                {
-                                       summon_specific(-1, py, px, lvl, SUMMON_BIZARRE1, PM_FORCE_PET);
+                                       summon_specific(-1, p_ptr->y, p_ptr->x, lvl, SUMMON_MOLD, PM_FORCE_PET);
                                }
                        }
                        break;
@@ -2351,7 +2334,7 @@ bool mutation_power_aux(u32b power)
                case MUT1_RESIST:
                        {
                                int num = lvl / 10;
-                               int dur = randint1(20) + 20;
+                               TIME_EFFECT dur = randint1(20) + 20;
 
                                if (randint0(5) < num)
                                {
@@ -2382,7 +2365,7 @@ bool mutation_power_aux(u32b power)
                        break;
 
                case MUT1_EARTHQUAKE:
-                       (void)earthquake(py, px, 10);
+                       (void)earthquake(p_ptr->y, p_ptr->x, 10);
                        break;
 
                case MUT1_EAT_MAGIC:
@@ -2411,8 +2394,8 @@ bool mutation_power_aux(u32b power)
                                int x, y;
 
                                if (!get_rep_dir2(&dir)) return FALSE;
-                               y = py + ddy[dir];
-                               x = px + ddx[dir];
+                               y = p_ptr->y + ddy[dir];
+                               x = p_ptr->x + ddx[dir];
                                if (cave[y][x].m_idx)
                                {
                                        py_attack(y, x, 0);
@@ -2452,8 +2435,8 @@ bool mutation_power_aux(u32b power)
                                monster_race *r_ptr;
 
                                if (!get_rep_dir2(&dir)) return FALSE;
-                               y = py + ddy[dir];
-                               x = px + ddx[dir];
+                               y = p_ptr->y + ddy[dir];
+                               x = p_ptr->x + ddx[dir];
                                c_ptr = &cave[y][x];
 
                                if (!c_ptr->m_idx)
@@ -2501,8 +2484,8 @@ bool mutation_power_aux(u32b power)
                                cave_type *c_ptr;
 
                                if (!get_rep_dir2(&dir)) return FALSE;
-                               y = py + ddy[dir];
-                               x = px + ddx[dir];
+                               y = p_ptr->y + ddy[dir];
+                               x = p_ptr->x + ddx[dir];
                                c_ptr = &cave[y][x];
 
                                if (!c_ptr->m_idx)
@@ -2522,13 +2505,8 @@ bool mutation_power_aux(u32b power)
                        break;
 
                default:
-                       energy_use = 0;
-#ifdef JP
-                       msg_format("能力 %s は実装されていません。", power);
-#else
-                       msg_format("Power %s not implemented. Oops.", power);
-#endif
-
+                       p_ptr->energy_use = 0;
+                       msg_format(_("能力 %s は実装されていません。", "Power %s not implemented. Oops."), power);
        }
 
        return TRUE;