OSDN Git Service

[Refactor] #37353 マジックナンバー修正(A_MAX) / Fix magic number (A_MAX).
[hengband/hengband.git] / src / birth.c
index bf40c92..0bbbad8 100644 (file)
@@ -506,8 +506,6 @@ static void birth_quit(void)
 static void show_help(cptr helpfile)
 {
        screen_save();
-
-       /* Peruse the help file */
        (void)show_file(TRUE, helpfile, NULL, 0, 0);
        screen_load();
 }
@@ -619,14 +617,10 @@ static byte choose_realm(s32b choices, int *count)
        }
 
        /* Extra info */
-#ifdef JP
-       put_str ("注意:魔法の領域の選択によりあなたが習得する呪文のタイプが決まります。", 23, 5);
-#else
-       put_str ("Note: The realm of magic will determine which spells you can learn.", 23, 5);
-#endif
+       put_str (_("注意:魔法の領域の選択によりあなたが習得する呪文のタイプが決まります。", "Note: The realm of magic will determine which spells you can learn."), 23, 5);
 
        cs = 0;
-       for (i = 0; i<32; i++)
+       for (i = 0; i < 32; i++)
        {
                /* Analize realms */
                if (choices & (1L << i))
@@ -648,11 +642,7 @@ static byte choose_realm(s32b choices, int *count)
                        picks[n++] = i+1;
                }
        }
-#ifdef JP
-       sprintf(cur, "%c%c %s", '*', p2, "ランダム");
-#else
-       sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+       sprintf(cur, "%c%c %s", '*', p2, _("ランダム", "Random"));
 
        /* Get a realm */
        k = -1;
@@ -667,11 +657,7 @@ static byte choose_realm(s32b choices, int *count)
 
                        if(cs == n)
                        {
-#ifdef JP
-                               sprintf(cur, "%c%c %s", '*', p2, "ランダム");
-#else
-                               sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+                               sprintf(cur, "%c%c %s", '*', p2, _("ランダム", "Random"));
                        }
                        else
                        {
@@ -692,11 +678,7 @@ static byte choose_realm(s32b choices, int *count)
 
                if (k >= 0) break;
 
-#ifdef JP
-               sprintf(buf, "領域を選んで下さい(%c-%c) ('='初期オプション設定): ", sym[0], sym[n-1]);
-#else
-               sprintf(buf, "Choose a realm (%c-%c) ('=' for options): ", sym[0], sym[n-1]);
-#endif
+               sprintf(buf, _("領域を選んで下さい(%c-%c) ('='初期オプション設定): ", "Choose a realm (%c-%c) ('=' for options): "), sym[0], sym[n-1]);
 
                put_str(buf, 10, 10);
                c = inkey();
@@ -751,20 +733,12 @@ static byte choose_realm(s32b choices, int *count)
                else k = -1;
                if (c == '?')
                {
-#ifdef JP
-                       show_help("jmagic.txt#MagicRealms");
-#else
-                       show_help("magic.txt#MagicRealms");
-#endif
+                       show_help(_("jmagic.txt#MagicRealms", "magic.txt#MagicRealms"));
                }
                else if (c == '=')
                {
                        screen_save();
-#ifdef JP
-                       do_cmd_options_aux(OPT_PAGE_BIRTH, "初期オプション((*)はスコアに影響)");
-#else
-                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth option((*)s effect score)");
-#endif
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth option((*)s effect score)"));
 
                        screen_load();
                }
@@ -825,21 +799,12 @@ static bool get_player_realms(void)
 
                if (count < 2)
                {
-#ifdef JP
-                       prt("何かキーを押してください", 0, 0);
-#else
-                       prt("Hit any key.", 0, 0);
-#endif
+                       prt(_("何かキーを押してください", "Hit any key."), 0, 0);
                        (void)inkey();
                        prt("", 0, 0);
                        break;
                }
-else
-#ifdef JP
-               if (get_check_strict("よろしいですか?", CHECK_DEFAULT_Y)) break;
-#else
-               if (get_check_strict("Are you sure? ", CHECK_DEFAULT_Y)) break;
-#endif
+               else if (get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_DEFAULT_Y)) break;
        }
 
        /* Select the second realm */
@@ -847,12 +812,7 @@ else
        if (p_ptr->realm1)
        {
                /* Print the realm */
-#ifdef JP
-               put_str("魔法        :", 6, 1);
-#else
-               put_str("Magic       :", 6, 1);
-#endif
-
+               put_str(_("魔法        :", "Magic       :"), 6, 1);
                c_put_str(TERM_L_BLUE, realm_names[p_ptr->realm1], 6, 15);
 
                /* Select the second realm */
@@ -875,7 +835,7 @@ else
 
                        roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm2)-1], 74, temp, sizeof(temp));
                        t = temp;
-                       for (i = 0; i< 6; i++)
+                       for (i = 0; i < A_MAX; i++)
                        {
                                if(t[0] == 0)
                                        break; 
@@ -888,20 +848,12 @@ else
 
                        if (count < 2)
                        {
-#ifdef JP
-                               prt("何かキーを押してください", 0, 0);
-#else
-                               prt("Hit any key.", 0, 0);
-#endif
+                               prt(_("何かキーを押してください", "Hit any key."), 0, 0);
                                (void)inkey();
                                prt("", 0, 0);
                                break;
                        }
-#ifdef JP
-                       else if (get_check_strict("よろしいですか?", CHECK_DEFAULT_Y)) break;
-#else
-                       else if (get_check_strict("Are you sure? ", CHECK_DEFAULT_Y)) break;
-#endif
+                       else if (get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_DEFAULT_Y)) break;
                }
                if (p_ptr->realm2)
                {
@@ -937,7 +889,7 @@ static void save_prev_data(birther *birther_ptr)
        birther_ptr->au = p_ptr->au;
 
        /* Save the stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                birther_ptr->stat_max[i] = p_ptr->stat_max[i];
                birther_ptr->stat_max_max[i] = p_ptr->stat_max_max[i];
@@ -996,7 +948,7 @@ static void load_prev_data(bool swap)
        p_ptr->au = previous_char.au;
 
        /* Load the stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                p_ptr->stat_cur[i] = p_ptr->stat_max[i] = previous_char.stat_max[i];
                p_ptr->stat_max_max[i] = previous_char.stat_max_max[i];
@@ -1152,15 +1104,14 @@ static void get_stats(void)
  */
 void get_max_stats(void)
 {
-       int             i, j;
-
-       int             dice[6];
+       int i, j;
+       int dice[6];
 
        /* Roll and verify some stats */
        while (TRUE)
        {
                /* Roll some dice */
-               for (j = i = 0; i < 6; i++)
+               for (j = i = 0; i < A_MAX; i++)
                {
                        /* Roll the dice */
                        dice[i] = randint1(7);
@@ -1174,7 +1125,7 @@ void get_max_stats(void)
        }
 
        /* Acquire the stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                BASE_STATUS max_max = 18 + 60 + dice[i]*10;
 
@@ -1559,7 +1510,7 @@ static void get_money(void)
          gold += 2000;
 
        /* Process the stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                /* Mega-Hack -- reduce gold for high stats */
                if (p_ptr->stat_max[i] >= 18 + 50) gold -= 300;
@@ -1592,7 +1543,7 @@ static void birth_put_stats(void)
 {
        int i, j, m, p;
        int col;
-       byte attr;
+       TERM_COLOR attr;
        char buf[80];
 
 
@@ -1600,7 +1551,7 @@ static void birth_put_stats(void)
        {
                col = 42;
                /* Put the stats (and percents) */
-               for (i = 0; i < 6; i++)
+               for (i = 0; i < A_MAX; i++)
                {
                        /* Race/Class bonus */
                        j = rp_ptr->r_adj[i] + cp_ptr->c_adj[i] + ap_ptr->a_adj[i];
@@ -2012,11 +1963,8 @@ static void wield_all(void)
                if (slot == INVEN_LITE) continue; /* Does not wield toaches because buys a lantern soon */
                if (inventory[slot].k_idx) continue; 
  
-               /* Get local object */ 
                i_ptr = &object_type_body; 
                object_copy(i_ptr, o_ptr); 
-               /* Modify quantity */ 
                i_ptr->number = 1; 
  
                /* Decrease the item (from the pack) */ 
@@ -2033,14 +1981,9 @@ static void wield_all(void)
                        floor_item_optimize(0 - item); 
                } 
  
-               /* Get the wield slot */ 
                o_ptr = &inventory[slot]; 
-               /* Wear the new stuff */ 
-               object_copy(o_ptr, i_ptr); 
-               /* Increase the weight */ 
-               p_ptr->total_weight += i_ptr->weight; 
+               object_copy(o_ptr, i_ptr); 
+               p_ptr->total_weight += i_ptr->weight; 
  
                /* Increment the equip counter by hand */ 
                equip_cnt++;
@@ -2360,7 +2303,7 @@ void player_outfit(void)
                /* Hack -- Give the player scrolls of DARKNESS! */
                object_prep(q_ptr, lookup_kind(TV_SCROLL, SV_SCROLL_DARKNESS));
 
-               q_ptr->number = (byte)rand_range(2, 5);
+               q_ptr->number = rand_range(2, 5);
 
                add_outfit(q_ptr);
        }
@@ -2368,7 +2311,7 @@ void player_outfit(void)
        {
                /* Hack -- Give the player some torches */
                object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH));
-               q_ptr->number = (byte)rand_range(3, 7);
+               q_ptr->number = rand_range(3, 7);
                q_ptr->xtra4 = rand_range(3, 7) * 500;
 
                add_outfit(q_ptr);
@@ -2425,33 +2368,33 @@ void player_outfit(void)
                {
                        /* Hack -- Give the player some arrows */
                        object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_LIGHT));
-                       q_ptr->number = (byte)rand_range(15, 20);
+                       q_ptr->number = rand_range(15, 20);
 
                        add_outfit(q_ptr);
                }
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_BISCUIT));
-               q_ptr->number = (byte)rand_range(2, 4);
+               q_ptr->number = rand_range(2, 4);
 
                add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_WAYBREAD));
-               q_ptr->number = (byte)rand_range(2, 4);
+               q_ptr->number = rand_range(2, 4);
 
                add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_JERKY));
-               q_ptr->number = (byte)rand_range(1, 3);
+               q_ptr->number = rand_range(1, 3);
 
                add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_ALE));
-               q_ptr->number = (byte)rand_range(2, 4);
+               q_ptr->number = rand_range(2, 4);
 
                add_outfit(q_ptr);
 
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_WINE));
-               q_ptr->number = (byte)rand_range(2, 4);
+               q_ptr->number = rand_range(2, 4);
 
                add_outfit(q_ptr);
        }
@@ -2459,7 +2402,7 @@ void player_outfit(void)
        {
                /* Hack -- Give the player some arrows */
                object_prep(q_ptr, lookup_kind(TV_SPIKE, 0));
-               q_ptr->number = (byte)rand_range(15, 20);
+               q_ptr->number = rand_range(15, 20);
 
                add_outfit(q_ptr);
        }
@@ -2467,7 +2410,7 @@ void player_outfit(void)
        {
                /* Hack -- Give the player some bolts */
                object_prep(q_ptr, lookup_kind(TV_BOLT, SV_AMMO_NORMAL));
-               q_ptr->number = (byte)rand_range(15, 20);
+               q_ptr->number = rand_range(15, 20);
 
                add_outfit(q_ptr);
        }
@@ -2495,12 +2438,11 @@ void player_outfit(void)
                        /* Barbarians do not need a ring of resist fear */
                        sv = SV_RING_SUSTAIN_STR;
 
-               else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT &&
-                   p_ptr->prace == RACE_MIND_FLAYER)
-                 {
+               else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT && p_ptr->prace == RACE_MIND_FLAYER)
+               {
                        tv = TV_POTION;
                        sv = SV_POTION_RESTORE_MANA;
-                 }
+               }
                q_ptr = &forge;
 
                /* Hack -- Give the player an object */
@@ -2533,11 +2475,10 @@ static bool get_player_race(void)
        char    p2 = ')';
        char    buf[80], cur[80];
 
-
        /* Extra info */
        clear_from(10);
        put_str(_("注意:《種族》によってキャラクターの先天的な資質やボーナスが変化します。",
-       "Note: Your 'race' determines various intrinsic factors and bonuses."), 23, 5);
+               "Note: Your 'race' determines various intrinsic factors and bonuses."), 23, 5);
 
        /* Dump races */
        for (n = 0; n < MAX_RACES; n++)
@@ -2551,12 +2492,8 @@ static bool get_player_race(void)
                        sym[n] = I2A(n);
                else
                        sym[n] = ('A' + n - 26);
-#ifdef JP
                sprintf(buf, "%c%c%s", sym[n], p2, str);
-#else
-               sprintf(buf, "%c%c %s", sym[n], p2, str);
-#endif
-               put_str(buf, 12 + (n/5), 1 + 16 * (n%5));
+               put_str(buf, 12 + (n / 5), 1 + 16 * (n % 5));
 
        }
 
@@ -2575,11 +2512,7 @@ static bool get_player_race(void)
                        put_str("                                   ", 3, 40);
                        if(cs == MAX_RACES)
                        {
-#ifdef JP
-                               sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
-                               sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+                               sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
                                put_str("                                   ", 4, 40);
                                put_str("                                   ", 5, 40);
                        }
@@ -2587,17 +2520,11 @@ static bool get_player_race(void)
                        {
                                rp_ptr = &race_info[cs];
                                str = rp_ptr->title;
-#ifdef JP
                                sprintf(cur, "%c%c%s", sym[cs], p2, str);
                                c_put_str(TERM_L_BLUE, rp_ptr->title, 3, 40);
-                               put_str("の種族修正", 3, 40+strlen(rp_ptr->title));
-                               put_str("腕力 知能 賢さ 器用 耐久 魅力 経験 ", 4, 40);
-#else
-                               sprintf(cur, "%c%c %s", sym[cs], p2, str);
-                               c_put_str(TERM_L_BLUE, rp_ptr->title, 3, 40);
-                               put_str(": Race modification", 3, 40+strlen(rp_ptr->title));
-                               put_str("Str  Int  Wis  Dex  Con  Chr   EXP ", 4, 40);
-#endif
+                               put_str(_("腕力 知能 賢さ 器用 耐久 魅力 経験 ", "Str  Int  Wis  Dex  Con  Chr   EXP "), 4, 40);
+                               put_str(_("の種族修正", ": Race modification"), 3, 40 + strlen(rp_ptr->title));
+
                                sprintf(buf, "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d %+4d%% ",
                                        rp_ptr->r_adj[0], rp_ptr->r_adj[1], rp_ptr->r_adj[2], rp_ptr->r_adj[3],
                                        rp_ptr->r_adj[4], rp_ptr->r_adj[5], (rp_ptr->r_exp - 100));
@@ -2731,26 +2658,14 @@ static bool get_player_class(void)
 
                /* Display */
                if (!(rp_ptr->choice & (1L << n)))
-#ifdef JP
                        sprintf(buf, "%c%c(%s)", sym[n], p2, str);
-#else
-                       sprintf(buf, "%c%c (%s)", sym[n], p2, str);
-#endif
                else
-#ifdef JP
                        sprintf(buf, "%c%c%s", sym[n], p2, str);
-#else
-                       sprintf(buf, "%c%c %s", sym[n], p2, str);
-#endif
 
                put_str(buf, 13+ (n/4), 2 + 19 * (n%4));
        }
 
-#ifdef JP
-       sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
-       sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+       sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
 
        /* Get a class */
        k = -1;
@@ -2765,11 +2680,7 @@ static bool get_player_class(void)
                        put_str("                                   ", 3, 40);
                        if(cs == MAX_CLASS_CHOICE)
                        {
-#ifdef JP
-                               sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
-                               sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+                               sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
                                put_str("                                   ", 4, 40);
                                put_str("                                   ", 5, 40);
                        }
@@ -2779,32 +2690,19 @@ static bool get_player_class(void)
                                mp_ptr = &m_info[cs];
                                str = cp_ptr->title;
                                if (!(rp_ptr->choice & (1L << cs)))
-#ifdef JP
                                        sprintf(cur, "%c%c(%s)", sym[cs], p2, str);
-#else
-                                       sprintf(cur, "%c%c (%s)", sym[cs], p2, str);
-#endif
                                else
-#ifdef JP
                                        sprintf(cur, "%c%c%s", sym[cs], p2, str);
-#else
-                                       sprintf(cur, "%c%c %s", sym[cs], p2, str);
-#endif
-#ifdef JP
-                                       c_put_str(TERM_L_BLUE, cp_ptr->title, 3, 40);
-                                       put_str("の職業修正", 3, 40+strlen(cp_ptr->title));
-                                       put_str("腕力 知能 賢さ 器用 耐久 魅力 経験 ", 4, 40);
-#else
+
                                        c_put_str(TERM_L_BLUE, cp_ptr->title, 3, 40);
-                                       put_str(": Class modification", 3, 40+strlen(cp_ptr->title));
-                                       put_str("Str  Int  Wis  Dex  Con  Chr   EXP ", 4, 40);
-#endif
+                                       put_str(_("の職業修正", ": Class modification"), 3, 40+strlen(cp_ptr->title));
+                                       put_str(_("腕力 知能 賢さ 器用 耐久 魅力 経験 ", "Str  Int  Wis  Dex  Con  Chr   EXP "), 4, 40);
                                        sprintf(buf, "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d %+4d%% ",
                                                cp_ptr->c_adj[0], cp_ptr->c_adj[1], cp_ptr->c_adj[2], cp_ptr->c_adj[3],
                                                cp_ptr->c_adj[4], cp_ptr->c_adj[5], cp_ptr->c_exp);
                                        c_put_str(TERM_L_BLUE, buf, 5, 40);
                        }
-                       c_put_str(TERM_YELLOW, cur, 13 + (cs/4), 2 + 19 * (cs%4));
+                       c_put_str(TERM_YELLOW, cur, 13 + (cs / 4), 2 + 19 * (cs % 4));
                        os = cs;
                }
 
@@ -2887,7 +2785,6 @@ static bool get_player_class(void)
        cp_ptr = &class_info[p_ptr->pclass];
        mp_ptr = &m_info[p_ptr->pclass];
 
-
        /* Display */
        c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 15);
 
@@ -2901,22 +2798,18 @@ static bool get_player_class(void)
  */
 static bool get_player_seikaku(void)
 {
-       int     k, n, os, cs;
-       char    c;
-       char    sym[MAX_SEIKAKU];
-       char    p2 = ')';
-       char    buf[80], cur[80];
-       char    tmp[64];
-       cptr    str;
-
+       int k;
+       int n, os, cs;
+       char c;
+       char sym[MAX_SEIKAKU];
+       char p2 = ')';
+       char buf[80], cur[80];
+       char tmp[64];
+       cptr str;
 
        /* Extra info */
        clear_from(10);
-#ifdef JP
-       put_str("注意:《性格》によってキャラクターの能力やボーナスが変化します。", 23, 5);
-#else
-       put_str("Note: Your personality determines various intrinsic abilities and bonuses.", 23, 5);
-#endif
+       put_str(_("注意:《性格》によってキャラクターの能力やボーナスが変化します。", "Note: Your personality determines various intrinsic abilities and bonuses."), 23, 5);
 
        /* Dump seikakus */
        for (n = 0; n < MAX_SEIKAKU; n++)
@@ -2932,20 +2825,11 @@ static bool get_player_seikaku(void)
                        sym[n] = ('A' + n - 26);
 
                /* Display */
-               /* Display */
-#ifdef JP
                sprintf(buf, "%c%c%s", I2A(n), p2, str);
-#else
-               sprintf(buf, "%c%c %s", I2A(n), p2, str);
-#endif
                put_str(buf, 12 + (n/4), 2 + 18 * (n%4));
        }
 
-#ifdef JP
-       sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
-       sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+       sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
 
        /* Get a seikaku */
        k = -1;
@@ -2960,11 +2844,7 @@ static bool get_player_seikaku(void)
                        put_str("                                   ", 3, 40);
                        if(cs == MAX_SEIKAKU)
                        {
-#ifdef JP
-                               sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
-                               sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+                               sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
                                put_str("                                   ", 4, 40);
                                put_str("                                   ", 5, 40);
                        }
@@ -2972,24 +2852,14 @@ static bool get_player_seikaku(void)
                        {
                                ap_ptr = &seikaku_info[cs];
                                str = ap_ptr->title;
-#ifdef JP
-                                       sprintf(cur, "%c%c%s", sym[cs], p2, str);
-#else
-                                       sprintf(cur, "%c%c %s", sym[cs], p2, str);
-#endif
-#ifdef JP
-                                       c_put_str(TERM_L_BLUE, ap_ptr->title, 3, 40);
-                                       put_str("の性格修正", 3, 40+strlen(ap_ptr->title));
-                                       put_str("腕力 知能 賢さ 器用 耐久 魅力      ", 4, 40);
-#else
-                                       c_put_str(TERM_L_BLUE, ap_ptr->title, 3, 40);
-                                       put_str(": Personality modification", 3, 40+strlen(ap_ptr->title));
-                                       put_str("Str  Int  Wis  Dex  Con  Chr       ", 4, 40);
-#endif
-                                       sprintf(buf, "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d       ",
-                                               ap_ptr->a_adj[0], ap_ptr->a_adj[1], ap_ptr->a_adj[2], ap_ptr->a_adj[3],
-                                               ap_ptr->a_adj[4], ap_ptr->a_adj[5]);
-                                       c_put_str(TERM_L_BLUE, buf, 5, 40);
+                               sprintf(cur, "%c%c%s", sym[cs], p2, str);
+                               c_put_str(TERM_L_BLUE, ap_ptr->title, 3, 40);
+                               put_str(_("の性格修正", ": Personality modification"), 3, 40+strlen(ap_ptr->title));
+                               put_str(_("腕力 知能 賢さ 器用 耐久 魅力      ", "Str  Int  Wis  Dex  Con  Chr       "), 4, 40);
+                               sprintf(buf, "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d       ",
+                                       ap_ptr->a_adj[0], ap_ptr->a_adj[1], ap_ptr->a_adj[2], ap_ptr->a_adj[3],
+                                       ap_ptr->a_adj[4], ap_ptr->a_adj[5]);
+                               c_put_str(TERM_L_BLUE, buf, 5, 40);
                        }
                        c_put_str(TERM_YELLOW, cur, 12 + (cs/4), 2 + 18 * (cs%4));
                        os = cs;
@@ -2997,11 +2867,7 @@ static bool get_player_seikaku(void)
 
                if (k >= 0) break;
 
-#ifdef JP
-               sprintf(buf, "性格を選んで下さい (%c-%c) ('='初期オプション設定): ", sym[0], sym[MAX_SEIKAKU-1]);
-#else
-               sprintf(buf, "Choose a personality (%c-%c) ('=' for options): ", sym[0], sym[MAX_SEIKAKU-1]);
-#endif
+               sprintf(buf, _("性格を選んで下さい (%c-%c) ('='初期オプション設定): ", "Choose a personality (%c-%c) ('=' for options): "), sym[0], sym[MAX_SEIKAKU-1]);
 
                put_str(buf, 10, 10);
                c = inkey();
@@ -3109,19 +2975,14 @@ static bool get_player_seikaku(void)
                else if (c == '=')
                {
                        screen_save();
-#ifdef JP
-                       do_cmd_options_aux(OPT_PAGE_BIRTH, "初期オプション((*)はスコアに影響)");
-#else
-                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
-#endif
-
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth Option((*)s effect score)"));
                        screen_load();
                }
                else if (c !='2' && c !='4' && c !='6' && c !='8') bell();
        }
 
        /* Set seikaku */
-       p_ptr->pseikaku = (byte_hack)k;
+       p_ptr->pseikaku = (CHARACTER_IDX)k;
        ap_ptr = &seikaku_info[p_ptr->pseikaku];
 #ifdef JP
        strcpy(tmp, ap_ptr->title);
@@ -3133,8 +2994,6 @@ static bool get_player_seikaku(void)
 #endif
        strcat(tmp,p_ptr->name);
 
-
-       /* Display */
        c_put_str(TERM_L_BLUE, tmp, 1, 34);
 
        return TRUE;
@@ -3157,22 +3016,13 @@ static bool get_stat_limits(void)
        clear_from(10);
 
        /* Extra infomation */
-#ifdef JP
-       put_str("最低限得たい能力値を設定して下さい。", 10, 10);
-       put_str("2/8で項目選択、4/6で値の増減、Enterで次へ", 11, 10);
-#else
-       put_str("Set minimum stats.", 10, 10);
-       put_str("2/8 for Select, 4/6 for Change value, Enter for Goto next", 11, 10);
-#endif
+       put_str(_("最低限得たい能力値を設定して下さい。", "Set minimum stats."), 10, 10);
+       put_str(_("2/8で項目選択、4/6で値の増減、Enterで次へ", "2/8 for Select, 4/6 for Change value, Enter for Goto next"), 11, 10);
        
-#ifdef JP
-       put_str("         基本値  種族 職業 性格     合計値  最大値", 13, 10);
-#else
-       put_str("           Base   Rac  Cla  Per      Total  Maximum", 13, 10);
-#endif
+       put_str(_("         基本値  種族 職業 性格     合計値  最大値", "           Base   Rac  Cla  Per      Total  Maximum"), 13, 10);
 
        /* Output the maximum stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                /* Reset the "success" counter */
                stat_match[i] = 0;
@@ -3232,7 +3082,7 @@ static bool get_stat_limits(void)
                        {
                                c_put_str(TERM_WHITE, _("決定する", "Accept"), 21, 35);
                        }
-                       else if(os < 6)
+                       else if(os < A_MAX)
                        {
                                c_put_str(TERM_WHITE, cur, 14 + os, 10);
                        }
@@ -3291,7 +3141,7 @@ static bool get_stat_limits(void)
                        break;
                case '2':
                case 'j':
-                       if (cs < 6) cs++;
+                       if (cs < A_MAX) cs++;
                        break;
                case '4':
                case 'h':
@@ -3365,7 +3215,7 @@ static bool get_stat_limits(void)
                if(c == ESCAPE || ((c == ' ' || c == '\r' || c == '\n') && cs == 6))break;
        }
        
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                /* Save the minimum stat */
                stat_limit[i] = (s16b)cval[i];
@@ -3396,17 +3246,11 @@ static bool get_chara_limits(void)
                _("社会的地位", "social class")
        };
 
-       /* Clean up */
        clear_from(10);
        
        /* Prompt for the minimum stats */
-#ifdef JP
-       put_str("2/4/6/8で項目選択、+/-で値の増減、Enterで次へ", 11, 10);
-       put_str("注意:身長と体重の最大値/最小値ぎりぎりの値は非常に出現確率が低くなります。", 23, 2);
-#else
-       put_str("2/4/6/8 for Select, +/- for Change value, Enter for Goto next", 11, 10);
-       put_str("Caution: Values near minimum or maximum is extremery rare.", 23, 5);
-#endif
+       put_str(_("2/4/6/8で項目選択、+/-で値の増減、Enterで次へ", "2/4/6/8 for Select, +/- for Change value, Enter for Goto next"), 11, 10);
+       put_str(_("注意:身長と体重の最大値/最小値ぎりぎりの値は非常に出現確率が低くなります。", "Caution: Values near minimum or maximum is extremery rare."), 23, 2);
        
        if (p_ptr->psex == SEX_MALE)
        {
@@ -3419,13 +3263,8 @@ static bool get_chara_limits(void)
                min_percent = (int)(rp_ptr->f_b_ht-rp_ptr->f_m_ht*4+1) * 100 / (int)(rp_ptr->f_b_ht);
        }
        
-#ifdef JP
-       put_str("体格/地位の最小値/最大値を設定して下さい。", 10, 10);
-       put_str("  項    目                 最小値  最大値", 13,20);
-#else
-       put_str(" Parameter                    Min     Max", 13,20);
-       put_str("Set minimum/maximum attribute.", 10, 10);
-#endif
+       put_str(_("体格/地位の最小値/最大値を設定して下さい。", "Set minimum/maximum attribute."), 10, 10);
+       put_str(_("  項    目                 最小値  最大値", " Parameter                    Min     Max"), 13,20);
 
        /* Output the maximum stats */
        for (i = 0; i < MAXITEMS; i++)
@@ -3647,12 +3486,7 @@ static bool get_chara_limits(void)
                        break;
                case '=':
                        screen_save();
-#ifdef JP
-                       do_cmd_options_aux(OPT_PAGE_BIRTH, "初期オプション((*)はスコアに影響)");
-#else
-                       do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth Option((*)s effect score)");
-#endif
-
+                       do_cmd_options_aux(OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth Option((*)s effect score)"));
                        screen_load();
                        break;
                default:
@@ -3704,11 +3538,7 @@ static bool do_cmd_histpref(void)
        char temp[64 * 4];
        char histbuf[HISTPREF_LIMIT];
 
-#ifdef JP
-       if (!get_check("生い立ち設定ファイルをロードしますか? ")) return FALSE;
-#else
-       if (!get_check("Load background history preference file? ")) return FALSE;
-#endif
+       if (!get_check(_("生い立ち設定ファイルをロードしますか? ", "Load background history preference file? "))) return FALSE;
 
        /* Prepare the buffer */
        histbuf[0] = '\0';
@@ -3734,11 +3564,7 @@ static bool do_cmd_histpref(void)
 
        if (err)
        {
-#ifdef JP
-               msg_print("生い立ち設定ファイルの読み込みに失敗しました。");
-#else
-               msg_print("Failed to load background history preference.");
-#endif
+               msg_print(_("生い立ち設定ファイルの読み込みに失敗しました。", "Failed to load background history preference."));
                msg_print(NULL);
 
                /* Kill the buffer */
@@ -3748,11 +3574,7 @@ static bool do_cmd_histpref(void)
        }
        else if (!histpref_buf[0])
        {
-#ifdef JP
-               msg_print("有効な生い立ち設定はこのファイルにありません。");
-#else
-               msg_print("There does not exist valid background history preference.");
-#endif
+               msg_print(_("有効な生い立ち設定はこのファイルにありません。", "There does not exist valid background history preference."));
                msg_print(NULL);
 
                /* Kill the buffer */
@@ -4258,7 +4080,7 @@ static bool player_birth_aux(void)
                roff_to_buf(seikaku_jouhou[p_ptr->pseikaku], 74, temp, sizeof(temp));
                t = temp;
 
-               for (i = 0; i< 6; i++)
+               for (i = 0; i< A_MAX; i++)
                {
                        if(t[0] == 0)
                                break; 
@@ -4390,7 +4212,7 @@ static bool player_birth_aux(void)
 
 
                        /* Put the minimal stats */
-                       for (i = 0; i < 6; i++)
+                       for (i = 0; i < A_MAX; i++)
                        {
                                int j, m;
 
@@ -4427,7 +4249,7 @@ static bool player_birth_aux(void)
 
                                if (autoroller)
                                {
-                                       for (i = 0; i < 6; i++)
+                                       for (i = 0; i < A_MAX; i++)
                                        {
                                                stat_match[i] = 0;
                                        }
@@ -4437,7 +4259,7 @@ static bool player_birth_aux(void)
                        if (autoroller)
                        {
                                /* Check and count acceptable stats */
-                               for (i = 0; i < 6; i++)
+                               for (i = 0; i < A_MAX; i++)
                                {
                                        /* This stat is okay */
                                        if (p_ptr->stat_max[i] >= stat_limit[i])
@@ -4514,7 +4336,6 @@ static bool player_birth_aux(void)
                /* Flush input */
                flush();
 
-
                /*** Display ***/
 
                /* Mode */
@@ -4534,7 +4355,7 @@ static bool player_birth_aux(void)
                {
                        /* Calculate the bonuses and hitpoints */
                        p_ptr->update |= (PU_BONUS | PU_HP);
-                       handle_stuff();
+                       update_creature(p_ptr);
 
                        p_ptr->chp = p_ptr->mhp;
                        p_ptr->csp = p_ptr->msp;
@@ -4719,15 +4540,9 @@ static bool ask_quick_start(void)
        /* Calc hitdie, but don't roll */
        get_extra(FALSE);
 
-       /* Calculate the bonuses and hitpoints */
        p_ptr->update |= (PU_BONUS | PU_HP);
-
-       handle_stuff();
-
-       /* Fully healed */
+       update_creature(p_ptr);
        p_ptr->chp = p_ptr->mhp;
-
-       /* Fully rested */
        p_ptr->csp = p_ptr->msp;
 
        /* Process the player name */
@@ -4785,49 +4600,25 @@ void player_birth(void)
        message_add(" ");
        message_add("  ");
 
-#ifdef JP
-       do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- 新規ゲーム開始 --------");
-#else
-       do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Start New Game --------");
-#endif
+       do_cmd_write_nikki(NIKKI_GAMESTART, 1, _("-------- 新規ゲーム開始 --------", "-------- Start New Game --------"));
        do_cmd_write_nikki(NIKKI_HIGAWARI, 0, NULL);
 
-#ifdef JP
-       sprintf(buf,"                            性別に%sを選択した。", sex_info[p_ptr->psex].title);
-#else
-       sprintf(buf,"                            choose %s personality.", sex_info[p_ptr->psex].title);
-#endif
+       sprintf(buf,_("                            性別に%sを選択した。", "                            choose %s personality."), sex_info[p_ptr->psex].title);
        do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
 
-#ifdef JP
-       sprintf(buf,"                            種族に%sを選択した。", race_info[p_ptr->prace].title);
-#else
-       sprintf(buf,"                            choose %s race.", race_info[p_ptr->prace].title);
-#endif
+       sprintf(buf,_("                            種族に%sを選択した。", "                            choose %s race."), race_info[p_ptr->prace].title);
        do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
 
-#ifdef JP
-       sprintf(buf,"                            職業に%sを選択した。", class_info[p_ptr->pclass].title);
-#else
-       sprintf(buf,"                            choose %s class.", class_info[p_ptr->pclass].title);
-#endif
+       sprintf(buf,_("                            職業に%sを選択した。", "                            choose %s class."), class_info[p_ptr->pclass].title);
        do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
 
        if (p_ptr->realm1)
        {
-#ifdef JP
-               sprintf(buf,"                            魔法の領域に%s%sを選択した。",realm_names[p_ptr->realm1], p_ptr->realm2 ? format("と%s",realm_names[p_ptr->realm2]) : "");
-#else
-               sprintf(buf,"                            choose %s%s realm.",realm_names[p_ptr->realm1], p_ptr->realm2 ? format(" realm and %s",realm_names[p_ptr->realm2]) : "");
-#endif
+               sprintf(buf,_("                            魔法の領域に%s%sを選択した。", "                            choose %s%s realm."),realm_names[p_ptr->realm1], p_ptr->realm2 ? format("と%s",realm_names[p_ptr->realm2]) : "");
                do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
        }
 
-#ifdef JP
-       sprintf(buf,"                            性格に%sを選択した。", seikaku_info[p_ptr->pseikaku].title);
-#else
-       sprintf(buf,"                            choose %s.", seikaku_info[p_ptr->pseikaku].title);
-#endif
+       sprintf(buf,_("                            性格に%sを選択した。", "                            choose %s."), seikaku_info[p_ptr->pseikaku].title);
        do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
 
        /* Init the shops */
@@ -4870,11 +4661,8 @@ void dump_yourself(FILE *fff)
 
        roff_to_buf(race_jouhou[p_ptr->prace], 78, temp, sizeof(temp));
        fprintf(fff, "\n\n");
-#ifdef JP
-       fprintf(fff, "種族: %s\n", race_info[p_ptr->prace].title);
-#else
-       fprintf(fff, "Race: %s\n", race_info[p_ptr->prace].title);
-#endif
+       fprintf(fff, _("種族: %s\n", "Race: %s\n"), race_info[p_ptr->prace].title);
+
        t = temp;
        for (i = 0; i < 10; i++)
        {
@@ -4885,11 +4673,8 @@ void dump_yourself(FILE *fff)
        }
        roff_to_buf(class_jouhou[p_ptr->pclass], 78, temp, sizeof(temp));
        fprintf(fff, "\n");
-#ifdef JP
-       fprintf(fff, "職業: %s\n", class_info[p_ptr->pclass].title);
-#else
-       fprintf(fff, "Class: %s\n", class_info[p_ptr->pclass].title);
-#endif
+       fprintf(fff, _("職業: %s\n", "Class: %s\n"), class_info[p_ptr->pclass].title);
+
        t = temp;
        for (i = 0; i < 10; i++)
        {
@@ -4900,13 +4685,10 @@ void dump_yourself(FILE *fff)
        }
        roff_to_buf(seikaku_jouhou[p_ptr->pseikaku], 78, temp, sizeof(temp));
        fprintf(fff, "\n");
-#ifdef JP
-       fprintf(fff, "性格: %s\n", seikaku_info[p_ptr->pseikaku].title);
-#else
-       fprintf(fff, "Pesonality: %s\n", seikaku_info[p_ptr->pseikaku].title);
-#endif
+       fprintf(fff, _("性格: %s\n", "Pesonality: %s\n"), seikaku_info[p_ptr->pseikaku].title);
+
        t = temp;
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                if(t[0] == 0)
                        break; 
@@ -4917,13 +4699,10 @@ void dump_yourself(FILE *fff)
        if (p_ptr->realm1)
        {
                roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm1)-1], 78, temp, sizeof(temp));
-#ifdef JP
-               fprintf(fff, "魔法: %s\n", realm_names[p_ptr->realm1]);
-#else
-               fprintf(fff, "Realm: %s\n", realm_names[p_ptr->realm1]);
-#endif
+               fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[p_ptr->realm1]);
+
                t = temp;
-               for (i = 0; i < 6; i++)
+               for (i = 0; i < A_MAX; i++)
                {
                        if(t[0] == 0)
                                break; 
@@ -4935,13 +4714,10 @@ void dump_yourself(FILE *fff)
        if (p_ptr->realm2)
        {
                roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm2)-1], 78, temp, sizeof(temp));
-#ifdef JP
-               fprintf(fff, "魔法: %s\n", realm_names[p_ptr->realm2]);
-#else
-               fprintf(fff, "Realm: %s\n", realm_names[p_ptr->realm2]);
-#endif
+               fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[p_ptr->realm2]);
+
                t = temp;
-               for (i = 0; i < 6; i++)
+               for (i = 0; i < A_MAX; i++)
                {
                        if(t[0] == 0)
                                break;