OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement. (BASE_STATUS / A_MAX)
[hengband/hengband.git] / src / realm-song.c
index b9f8826..f88cfb8 100644 (file)
@@ -1,5 +1,7 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "spells-status.h"
+#include "projection.h"
 
 /*!
 * @brief 歌の開始を処理する / Start singing if the player is a Bard
@@ -20,41 +22,6 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
        set_action(ACTION_SING);
 
        p_ptr->update |= (PU_BONUS);
-
-       /* Redraw status bar */
-       p_ptr->redraw |= (PR_STATUS);
-}
-
-/*!
-* @brief 歌の停止を処理する / Stop singing if the player is a Bard
-* @return なし
-*/
-void stop_singing(void)
-{
-       if (p_ptr->pclass != CLASS_BARD) return;
-
-       /* Are there interupted song? */
-       if (INTERUPTING_SONG_EFFECT(p_ptr))
-       {
-               /* Forget interupted song */
-               INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
-               return;
-       }
-
-       /* The player is singing? */
-       if (!SINGING_SONG_EFFECT(p_ptr)) return;
-
-       /* Hack -- if called from set_action(), avoid recursive loop */
-       if (p_ptr->action == ACTION_SING) set_action(ACTION_NONE);
-
-       /* Message text of each song or etc. */
-       do_spell(REALM_MUSIC, SINGING_SONG_ID(p_ptr), SPELL_STOP);
-
-       SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
-       SINGING_SONG_ID(p_ptr) = 0;
-       p_ptr->update |= (PU_BONUS);
-
-       /* Redraw status bar */
        p_ptr->redraw |= (PR_STATUS);
 }
 
@@ -73,7 +40,6 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
        bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
        bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
        bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
-       static const char s_dam[] = _("損傷:", "dam ");
 
        DIRECTION dir;
        PLAYER_LEVEL plev = p_ptr->lev;
@@ -653,7 +619,7 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        DICE_SID m_sides = plev * 3;
                        DICE_SID e_sides = plev * 3;
 
-                       if (info) return format("%s1d%d+1d%d", s_dam, m_sides, e_sides);
+                       if (info) return format("%s1d%d+1d%d", KWD_DAM, m_sides, e_sides);
 
                        if (cont)
                        {