From 54a6e6459c471bcb475bb5c3a169b8e996fbf0ea Mon Sep 17 00:00:00 2001 From: Deskull Date: Tue, 25 Sep 2018 19:53:32 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E3=82=BD=E3=83=BC?= =?utf8?q?=E3=82=B9=E6=95=B4=E5=BD=A2=E3=80=82=20Refactor=20sources.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/mind.c | 14 ++++---------- src/xtra1.c | 30 ++++++++++++------------------ 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/src/mind.c b/src/mind.c index b5ecca876..b33149413 100644 --- a/src/mind.c +++ b/src/mind.c @@ -855,11 +855,9 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse) prt("", y, x); put_str(_("名前", "Name"), y, x + 5); -#ifdef JP -put_str(format("Lv %s 失率 効果", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35); -#else -put_str(format("Lv %s Fail Info", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35); -#endif + put_str(format(_("Lv %s 失率 効果", "Lv %s Fail Info"), + ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35); + has_weapon[0] = buki_motteruka(INVEN_RARM); has_weapon[1] = buki_motteruka(INVEN_LARM); @@ -942,11 +940,7 @@ put_str(format("Lv %s Fail Info", ((use_mind == MIND_BERSERKER) || (use_mind strcat(psi_desc, format("%-30s%2d %4d%s %3d%%%s", spell.name, spell.min_lev, mana_cost, -#ifdef JP - (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "~" : " "), -#else - (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "~ " : " "), -#endif + (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? _("~", "~ ") : " "), chance, comment)); prt(psi_desc, y + i + 1, x); } diff --git a/src/xtra1.c b/src/xtra1.c index 379b1050f..2d5c6fe54 100644 --- a/src/xtra1.c +++ b/src/xtra1.c @@ -1,7 +1,7 @@ /*! * @file xtra1.c - * @brief 雑多なその他の処理1 / misc code - * @date 2014/08/17 + * @brief プレイヤーのステータス処理 / status + * @date 2018/09/25 * @author * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke\n * This software may be copied and distributed for educational, research, and\n @@ -2197,9 +2197,9 @@ static void fix_object(void) */ static void calc_spells(void) { - int i, j, k, levels; - int num_allowed; - int num_boukyaku = 0; + int i, j, k, levels; + int num_allowed; + int num_boukyaku = 0; const magic_type *s_ptr; REALM_IDX which; @@ -2331,11 +2331,9 @@ static void calc_spells(void) /* Message */ #ifdef JP - msg_format("%sの%sを忘れてしまった。", - do_spell(which, j%32, SPELL_NAME), p ); + msg_format("%sの%sを忘れてしまった。", do_spell(which, j%32, SPELL_NAME), p ); #else - msg_format("You have forgotten the %s of %s.", p, - do_spell(which, j%32, SPELL_NAME)); + msg_format("You have forgotten the %s of %s.", p, do_spell(which, j%32, SPELL_NAME)); #endif @@ -2467,11 +2465,9 @@ static void calc_spells(void) /* Message */ #ifdef JP - msg_format("%sの%sを思い出した。", - do_spell(which, j%32, SPELL_NAME), p ); + msg_format("%sの%sを思い出した。", do_spell(which, j%32, SPELL_NAME), p ); #else - msg_format("You have remembered the %s of %s.", - p, do_spell(which, j%32, SPELL_NAME)); + msg_format("You have remembered the %s of %s.", p, do_spell(which, j%32, SPELL_NAME)); #endif @@ -2554,7 +2550,7 @@ static void calc_spells(void) */ static void calc_mana(void) { - int msp, levels, cur_wgt, max_wgt; + int msp, levels, cur_wgt, max_wgt; object_type *o_ptr; @@ -2807,8 +2803,7 @@ static void calc_mana(void) /* レベルアップの時は上昇量を表示する */ if ((level_up == 1) && (msp > p_ptr->msp)) { - msg_format("最大マジック・ポイントが %d 増加した!", - (msp - p_ptr->msp)); + msg_format("最大マジック・ポイントが %d 増加した!", (msp - p_ptr->msp)); } #endif /* Save new mana */ @@ -2933,8 +2928,7 @@ static void calc_hitpoints(void) /* レベルアップの時は上昇量を表示する */ if ((level_up == 1) && (mhp > p_ptr->mhp)) { - msg_format("最大ヒット・ポイントが %d 増加した!", - (mhp - p_ptr->mhp) ); + msg_format("最大ヒット・ポイントが %d 増加した!", (mhp - p_ptr->mhp) ); } #endif /* Save the new max-hitpoints */ -- 2.11.0