OSDN Git Service

Change the KWD_* macros to be constant string pointers with definitions in cmd-spell...
[hengbandforosx/hengbandosx.git] / src / cmd-spell.c
index 39c8b39..f983add 100644 (file)
 #include "player-status.h"
 #include "object-hook.h"
 
+/*
+ * Define these here, rather than use preprocessor macros set in cmd-spell.h,
+ * so that the preprocessing done to switch character encoding works on the
+ * platforms that use configure/automake.
+ */
+concptr KWD_DAM = _("損傷:", "dam ");
+concptr KWD_RANGE = _("射程:", "rng ");
+concptr KWD_DURATION = _("期間:", "dur ");
+concptr KWD_SPHERE = _("範囲:", "range ");
+concptr KWD_HEAL = _("回復:", "heal ");
+concptr KWD_RANDOM = _("ランダム", "random");
+
 /*!
  * @brief
  * 魔法の効果を「キャプション:ダイス+定数値」のフォーマットで出力する / Generate dice info string such as "foo 2d10"
@@ -368,8 +380,6 @@ static int get_spell(SPELL_IDX *sn, concptr prompt, OBJECT_SUBTYPE_VALUE sval, b
                p, I2A(0), I2A(num - 1), prompt, p);
 #endif
 
-       /* Get a spell from the user */
-
        choice = (always_show_list || use_menu) ? ESCAPE : 1;
        while (!flag)
        {
@@ -744,7 +754,7 @@ static void change_realm2(CHARACTER_IDX next_realm)
        p_ptr->spell_worked2 = 0L;
        p_ptr->spell_forgotten2 = 0L;
 
-       sprintf(tmp, _("魔法の領域を%sから%sに変更した。", "change magic realm from %s to %s."), realm_names[p_ptr->realm2], realm_names[next_realm]);
+       sprintf(tmp, _("魔法の領域を%sから%sに変更した。", "changed magic realm from %s to %s."), realm_names[p_ptr->realm2], realm_names[next_realm]);
        do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
        p_ptr->old_realm |= 1 << (p_ptr->realm2 - 1);
        p_ptr->realm2 = next_realm;
@@ -1059,7 +1069,7 @@ void do_cmd_cast(void)
                if (hex_spell_fully())
                {
                        bool flag = FALSE;
-                       msg_print(_("これ以上新しい呪文を詠唱することはできない。", "Can not spell new spells more."));
+                       msg_print(_("これ以上新しい呪文を詠唱することはできない。", "Can not cast more spells."));
                        flush();
                        if (p_ptr->lev >= 35) flag = stop_hex_spell();
                        if (!flag) return;
@@ -1254,7 +1264,7 @@ void do_cmd_cast(void)
        /* Process spell */
        else
        {
-               /* Canceled spells cost neither a current_world_ptr->game_turn nor mana */
+               /* Canceled spells cost neither a turn nor mana */
                if (!do_spell(realm, spell, SPELL_CAST)) return;
 
                if (randint1(100) < chance)