OSDN Git Service

[Refactor] #37353 stop_singing() を spell-status.c へ移動。 / Move stop_singing() to spell...
authorDeskull <deskull@users.sourceforge.jp>
Sat, 26 Jan 2019 10:26:40 +0000 (19:26 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 26 Jan 2019 10:26:40 +0000 (19:26 +0900)
src/cmd-eat.c
src/cmd-quaff.c
src/cmd-read.c
src/cmd2.c
src/dungeon.c
src/effects.c
src/externs.h
src/realm-song.c
src/spells-status.c
src/spells-status.h

index a729874..3c7ab73 100644 (file)
@@ -10,6 +10,7 @@
 #include "angband.h"\r
 #include "object-hook.h"\r
 #include "avatar.h"\r
+#include "spells-status.h"\r
 \r
 /*!\r
  * @brief 食料を食べるコマンドのサブルーチン\r
index 7cc5cf3..f26f579 100644 (file)
@@ -11,6 +11,7 @@
 #include "object-hook.h"\r
 #include "mutation.h"\r
 #include "avatar.h"\r
+#include "spells-status.h"\r
 \r
 /*!\r
  * @brief 薬を飲むコマンドのサブルーチン /\r
index 5648e07..c1d0fff 100644 (file)
@@ -12,6 +12,7 @@
 #include "artifact.h"\r
 #include "avatar.h"\r
 #include "player-status.h"\r
+#include "spells-status.h"\r
 \r
 /*!\r
  * @brief 巻物を読むコマンドのサブルーチン\r
index d97dad9..cbe76e3 100644 (file)
@@ -17,6 +17,7 @@
 #include "object-hook.h"
 #include "projection.h"
 #include "spells-summon.h"
+#include "spells-status.h"
 #include "monster-status.h"
 #include "quest.h"
 #include "artifact.h"
index b79fb7f..72ce4a6 100644 (file)
@@ -27,6 +27,7 @@
 #include "store.h"
 #include "spells-summon.h"
 #include "spells-object.h"
+#include "spells-status.h"
 #include "monsterrace-hook.h"
 #include "world.h"
 #include "mutation.h"
index 453fa84..858295e 100644 (file)
@@ -17,6 +17,7 @@
 #include "quest.h"
 #include "avatar.h"
 #include "player-status.h"
+#include "spells-status.h"
 
 /*!
  * @brief プレイヤーの継続行動を設定する。
index 32e65d8..c1a7d42 100644 (file)
@@ -598,7 +598,6 @@ extern void do_cmd_checkquest(void);
 extern void do_cmd_time(void);
 
 /* cmd-spell.c */
-extern void stop_singing(void);
 extern concptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode);
 extern bool trump_summoning(int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode);
 
index 972ce42..febb2cb 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "spells-status.h"
 #include "projection.h"
 
 /*!
@@ -27,39 +28,6 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
 }
 
 /*!
-* @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);
-}
-
-/*!
 * @brief 歌の各処理を行う
 * @param spell 歌ID
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
index 289c479..29560c8 100644 (file)
@@ -134,3 +134,36 @@ bool fear_monster(DIRECTION dir, PLAYER_LEVEL plev)
        BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
        return (project_hook(GF_TURN_ALL, dir, plev, flg));
 }
+
+/*!
+* @brief \89Ì\82Ì\92â\8e~\82ð\8f\88\97\9d\82·\82é / Stop singing if the player is a Bard
+* @return \82È\82µ
+*/
+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);
+}
index 2179e05..be1ecff 100644 (file)
@@ -10,3 +10,5 @@ extern bool stun_monster(DIRECTION dir, PLAYER_LEVEL plev);
 extern bool fear_monster(DIRECTION dir, PLAYER_LEVEL plev);
 extern bool poly_monster(DIRECTION dir, int power);
 extern bool clone_monster(DIRECTION dir);
+extern void stop_singing(void);
+