OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement. (BASE_STATUS / A_MAX)
[hengband/hengband.git] / src / selfinfo.c
index 1274002..784fe58 100644 (file)
@@ -15,6 +15,8 @@
  */\r
 \r
 #include "angband.h"\r
+#include "player-status.h"\r
+#include "avatar.h"\r
 \r
 /*!\r
  * @brief 自己分析処理(Nethackからのアイデア) / self-knowledge... idea from nethack.\r
@@ -31,7 +33,7 @@
  *\r
  * See also "identify_fully()".\r
  *\r
- * XXX XXX XXX Use the "show_file()" method, perhaps.\r
+ * Use the "show_file()" method, perhaps.\r
  * </pre>\r
  */\r
 void self_knowledge(void)\r
@@ -49,7 +51,7 @@ void self_knowledge(void)
        char Dummy[80];\r
        char buf[2][80];\r
 \r
-       cptr info[220];\r
+       concptr info[220];\r
 \r
        PLAYER_LEVEL plev = p_ptr->lev;\r
 \r
@@ -83,8 +85,6 @@ void self_knowledge(void)
 \r
                /* Skip non-objects */\r
                if (!o_ptr->k_idx) continue;\r
-\r
-               /* Extract the flags */\r
                object_flags(o_ptr, tflgs);\r
 \r
                /* Extract flags */\r
@@ -94,7 +94,7 @@ void self_knowledge(void)
 \r
        info[i++] = _("能力の最大値", "Limits of maximum stats");\r
 \r
-       for (v_nr = 0; v_nr < 6; v_nr++)\r
+       for (v_nr = 0; v_nr < A_MAX; v_nr++)\r
        {\r
                char stat_desc[80];\r
 \r
@@ -111,7 +111,7 @@ void self_knowledge(void)
        info[i++] = buf[1];\r
        for (v_nr = 0; v_nr < 8; v_nr++)\r
        {\r
-               char vir_name [20];\r
+               GAME_TEXT vir_name [20];\r
                char vir_desc[80];\r
                int tester = p_ptr->virtues[v_nr];\r
        \r
@@ -1451,7 +1451,6 @@ void self_knowledge(void)
                        info[i++] = _("あなたの武器はログルスの徴の属性をもつ。", "Your weapon is branded with the Sign of Logrus.");\r
                }\r
 \r
-               /* Hack */\r
                if (have_flag(flgs, TR_IMPACT))\r
                {\r
                        info[i++] = _("あなたの武器は打撃で地震を発生することができる。", "The impact of your weapon can cause earthquakes.");\r
@@ -1574,8 +1573,6 @@ void self_knowledge(void)
                }\r
        }\r
 \r
-\r
-       /* Save the screen */\r
        screen_save();\r
 \r
        /* Erase the screen */\r
@@ -1602,8 +1599,6 @@ void self_knowledge(void)
        /* Pause */\r
        prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);\r
        inkey();\r
-\r
-       /* Restore the screen */\r
        screen_load();\r
 }\r
 \r
@@ -1644,17 +1639,17 @@ static int report_magics_aux(int dur)
        }\r
 }\r
 \r
-static cptr report_magic_durations[] =\r
+static concptr report_magic_durations[] =\r
 {\r
 #ifdef JP\r
-"ごく短い間",\r
-"少しの間",\r
-"しばらくの間",\r
-"多少長い間",\r
-"長い間",\r
-"非常に長い間",\r
-"信じ難いほど長い間",\r
-"モンスターを攻撃するまで"\r
+       "ごく短い間",\r
+       "少しの間",\r
+       "しばらくの間",\r
+       "多少長い間",\r
+       "長い間",\r
+       "非常に長い間",\r
+       "信じ難いほど長い間",\r
+       "モンスターを攻撃するまで"\r
 #else\r
        "for a short time",\r
        "for a little while",\r
@@ -1676,7 +1671,7 @@ void report_magics(void)
 {\r
        int     i = 0, j, k;\r
        char    Dummy[80];\r
-       cptr    info[128];\r
+       concptr    info[128];\r
        int     info2[128];\r
 \r
 \r
@@ -1780,8 +1775,6 @@ void report_magics(void)
                info2[i]  = report_magics_aux(p_ptr->oppose_pois);\r
                info[i++] = _("あなたは毒への耐性を持っている", "You are resistant to poison");\r
        }\r
-\r
-       /* Save the screen */\r
        screen_save();\r
 \r
        /* Erase the screen */\r
@@ -1811,7 +1804,5 @@ void report_magics(void)
        /* Pause */\r
        prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);\r
        inkey();\r
-\r
-       /* Restore the screen */\r
        screen_load();\r
 }\r