OSDN Git Service

[Refactor] #37353 #if 0 プリプロセッサ削除 / Delete #if 0 code.
[hengband/hengband.git] / src / racial.c
index c209743..c3cd6d8 100644 (file)
@@ -136,7 +136,6 @@ static bool do_cmd_archer(void)
 
                item_tester_hook = item_tester_hook_convertible;
 
-               /* Get an item */
                q = _("どのアイテムから作りますか? ", "Convert which item? ");
                s = _("材料を持っていない。", "You have no item to convert.");
                if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
@@ -195,7 +194,6 @@ static bool do_cmd_archer(void)
 
                item_tester_hook = item_tester_hook_convertible;
 
-               /* Get an item */
                q = _("どのアイテムから作りますか? ", "Convert which item? ");
                s = _("材料を持っていない。", "You have no item to convert.");
                if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
@@ -264,7 +262,6 @@ bool gain_magic(void)
        /* Only accept legal items */
        item_tester_hook = item_tester_hook_recharge;
 
-       /* Get an item */
        q = _("どのアイテムの魔力を取り込みますか? ", "Gain power of which item? ");
        s = _("魔力を取り込めるアイテムがない。", "You have nothing to gain power.");
 
@@ -335,7 +332,6 @@ bool gain_magic(void)
        }
 
        object_desc(o_name, o_ptr, 0);
-       /* Message */
        msg_format(_("%sの魔力を取り込んだ。", "You absorb magic of %s."), o_name);
 
        /* Eliminate the item (from the pack) */
@@ -399,8 +395,6 @@ static bool choose_kamae(void)
                msg_print(_("混乱していて構えられない!", "Too confused."));
                return FALSE;
        }
-
-       /* Save screen */
        screen_save();
        prt(_(" a) 構えをとく", " a) No form"), 2, 20);
 
@@ -504,8 +498,6 @@ static bool choose_kata(void)
                msg_print(_("体が震えて構えられない!", "You are trembling with fear!"));
                return FALSE;
        }
-
-       /* Save screen */
        screen_save();
        prt(_(" a) 型を崩す", " a) No Form"), 2, 20);
 
@@ -593,12 +585,12 @@ typedef struct power_desc_type power_desc_type;
  */
 struct power_desc_type
 {
-       char name[80];
-       PLAYER_LEVEL level;
-       int  cost;
-       int  stat;
-       int  fail;
-       int  number;
+       char name[80];      //!<レイシャル名
+       PLAYER_LEVEL level;     //!<体得レベル
+       int cost;
+       int stat;
+       int fail;
+       int number;
 };
 
 
@@ -607,10 +599,10 @@ struct power_desc_type
  * @param pd_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
  * @return 成功率(%)を返す
  */
-static int racial_chance(power_desc_type *pd_ptr)
+static PERCENTAGE racial_chance(power_desc_type *pd_ptr)
 {
        PLAYER_LEVEL min_level  = pd_ptr->level;
-       int  difficulty = pd_ptr->fail;
+       int difficulty = pd_ptr->fail;
 
        int i;
        int val;
@@ -747,8 +739,8 @@ static int racial_aux(power_desc_type *pd_ptr)
  */
 static bool cmd_racial_power_aux(s32b command)
 {
-       s16b        plev = p_ptr->lev;
-       int         dir = 0;
+       PLAYER_LEVEL plev = p_ptr->lev;
+       DIRECTION dir = 0;
 
        if (command <= -3)
        {
@@ -2566,9 +2558,7 @@ void do_cmd_racial_power(void)
                                _("(特殊能力 %c-%c, *'で一覧, ESCで中断) どの特殊能力を使いますか?", "(Powers %c-%c, *=List, ESC=exit) Use which power? "),
                                I2A(0), (num <= 26) ? I2A(num - 1) : '0' + num - 27);
 
-#ifdef ALLOW_REPEAT
 if (!repeat_pull(&i) || i<0 || i>=num) {
-#endif /* ALLOW_REPEAT */
        if (use_menu) screen_save();
         /* Get a spell from the user */
 
@@ -2640,7 +2630,7 @@ if (!repeat_pull(&i) || i<0 || i>=num) {
                                int ctr = 0;
                                char dummy[80];
                                char letter;
-                               int x1, y1;
+                               TERM_LEN x1, y1;
 
                                strcpy(dummy, "");
 
@@ -2758,10 +2748,8 @@ if (!repeat_pull(&i) || i<0 || i>=num) {
                p_ptr->energy_use = 0;
                return;
        }
-#ifdef ALLOW_REPEAT
        repeat_push(i);
        } /*if (!repeat_pull(&i) || ...)*/
-#endif /* ALLOW_REPEAT */
        switch (racial_aux(&power_desc[i]))
        {
        case 1:
@@ -2796,7 +2784,6 @@ if (!repeat_pull(&i) || i<0 || i>=num) {
                        /* Redraw mana and hp */
                        p_ptr->redraw |= (PR_HP | PR_MANA);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER | PW_SPELL);
                }
        }