• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision21db8abd402fdd79148f4b5b838daab30748c7a2 (tree)
Time2019-05-21 22:03:58
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 歌に関するマクロ定義を realm-song.h へ移動.

Change Summary

Incremental Difference

--- a/src/chest.c
+++ b/src/chest.c
@@ -9,6 +9,7 @@
99 #include "player-status.h"
1010 #include "player-effects.h"
1111 #include "grid.h"
12+#include "realm-song.h"
1213
1314 /*!
1415 * @brief 箱からアイテムを引き出す /
--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -30,6 +30,7 @@
3030 #include "object-ego.h"
3131 #include "grid.h"
3232 #include "targeting.h"
33+#include "realm-song.h"
3334
3435 /*!
3536 * @brief 装備耐性に準じたブレス効果の選択テーブル /
--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -33,6 +33,7 @@
3333 #include "avatar.h"
3434 #include "player-status.h"
3535 #include "realm-hex.h"
36+#include "realm-song.h"
3637 #include "geometry.h"
3738 #include "wild.h"
3839 #include "grid.h"
--- a/src/cmd-eat.c
+++ b/src/cmd-eat.c
@@ -20,6 +20,7 @@
2020 #include "player-race.h"
2121 #include "floor.h"
2222 #include "objectkind.h"
23+#include "realm-song.h"
2324
2425 /*!
2526 * @brief 食料を食べるコマンドのサブルーチン
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -20,6 +20,7 @@
2020 #include "player-effects.h"
2121 #include "player-race.h"
2222 #include "realm-hex.h"
23+#include "realm-song.h"
2324 #include "spells-floor.h"
2425 #include "object-broken.h"
2526 #include "cmd-basic.h"
--- a/src/cmd-read.c
+++ b/src/cmd-read.c
@@ -28,6 +28,7 @@
2828 #include "files.h"
2929 #include "floor.h"
3030 #include "objectkind.h"
31+#include "realm-song.h"
3132
3233 /*!
3334 * @brief 巻物を読むコマンドのサブルーチン
--- a/src/core.c
+++ b/src/core.c
@@ -81,6 +81,7 @@
8181 #include "autopick.h"
8282 #include "save.h"
8383 #include "realm.h"
84+#include "realm-song.h"
8485 #include "targeting.h"
8586
8687 /*!
--- a/src/defines.h
+++ b/src/defines.h
@@ -2627,43 +2627,6 @@ extern int PlayerUID;
26272627 #define KNOW_HPRATE 0x02
26282628
26292629 /*
2630- * Music songs
2631- */
2632-#define MUSIC_NONE 0
2633-#define MUSIC_SLOW 1
2634-#define MUSIC_BLESS 2
2635-#define MUSIC_STUN 3
2636-#define MUSIC_L_LIFE 4
2637-#define MUSIC_FEAR 5
2638-#define MUSIC_HERO 6
2639-#define MUSIC_MIND 7
2640-#define MUSIC_STEALTH 8
2641-#define MUSIC_ID 9
2642-#define MUSIC_CONF 10
2643-#define MUSIC_SOUND 11
2644-#define MUSIC_CHARM 12
2645-#define MUSIC_WALL 13
2646-#define MUSIC_RESIST 14
2647-#define MUSIC_SPEED 15
2648-#define MUSIC_DISPEL 16
2649-#define MUSIC_SARUMAN 17
2650-#define MUSIC_QUAKE 18
2651-#define MUSIC_STASIS 19
2652-#define MUSIC_SHERO 20
2653-#define MUSIC_H_LIFE 21
2654-#define MUSIC_INVULN 22
2655-#define MUSIC_PSI 23
2656-
2657-#define MUSIC_DETECT 101
2658-
2659-#define SINGING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[0])
2660-#define INTERUPTING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[1])
2661-#define SINGING_COUNT(P_PTR) ((P_PTR)->magic_num1[2])
2662-#define SINGING_SONG_ID(P_PTR) ((P_PTR)->magic_num2[0])
2663-#define music_singing(X) ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == (X)))
2664-#define music_singing_any() ((p_ptr->pclass == CLASS_BARD) && p_ptr->magic_num1[0])
2665-
2666-/*
26672630 * Special essence id for Weapon smith
26682631 */
26692632 #define MIN_SPECIAL_ESSENCE 200
--- a/src/files.c
+++ b/src/files.c
@@ -63,6 +63,7 @@
6363 #include "objectkind.h"
6464 #include "autopick.h"
6565 #include "save.h"
66+#include "realm-song.h"
6667
6768 concptr ANGBAND_DIR; //!< Path name: The main "lib" directory This variable is not actually used anywhere in the code
6869 concptr ANGBAND_DIR_APEX; //!< High score files (binary) These files may be portable between platforms
--- a/src/grid.c
+++ b/src/grid.c
@@ -38,6 +38,7 @@
3838 #include "player-effects.h"
3939 #include "spells.h"
4040 #include "view-mainwindow.h"
41+#include "realm-song.h"
4142
4243
4344 /*!
--- a/src/load.c
+++ b/src/load.c
@@ -82,6 +82,7 @@
8282 #include "object-ego.h"
8383 #include "save.h"
8484 #include "japanese.h"
85+#include "realm-song.h"
8586
8687 /*
8788 * Maximum number of tries for selection of a proper quest monster
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -24,6 +24,7 @@
2424 #include "monster-spell.h"
2525 #include "avatar.h"
2626 #include "realm-hex.h"
27+#include "realm-song.h"
2728 #include "object-flavor.h"
2829 #include "object-hook.h"
2930 #include "grid.h"
--- a/src/mind.c
+++ b/src/mind.c
@@ -38,6 +38,7 @@
3838 #include "player-effects.h"
3939 #include "view-mainwindow.h"
4040 #include "targeting.h"
41+#include "realm-song.h"
4142
4243 /*! 特殊技能の一覧テーブル */
4344 mind_power const mind_powers[5] =
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -37,6 +37,7 @@
3737 #include "monsterrace.h"
3838 #include "creature.h"
3939 #include "targeting.h"
40+#include "realm-song.h"
4041
4142 #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
4243 #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -53,6 +53,7 @@
5353 #include "monster-spell.h"
5454 #include "spells.h"
5555 #include "world.h"
56+#include "realm-song.h"
5657
5758
5859 /*!
--- a/src/player-damage.c
+++ b/src/player-damage.c
@@ -1,6 +1,7 @@
11 #include "angband.h"
22 #include "util.h"
33
4+#include "realm-song.h"
45 #include "player-damage.h"
56 #include "artifact.h"
67 #include "object-flavor.h"
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -29,6 +29,7 @@
2929 #include "quest.h"
3030 #include "avatar.h"
3131 #include "spells-status.h"
32+#include "realm-song.h"
3233 #include "realm-hex.h"
3334 #include "object-ego.h"
3435 #include "object-hook.h"
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -143,6 +143,7 @@
143143 #include "core.h"
144144 #include "util.h"
145145
146+#include "realm-song.h"
146147 #include "autopick.h"
147148 #include "dungeon.h"
148149 #include "floor.h"
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -25,6 +25,7 @@
2525 #include "mutation.h"
2626 #include "patron.h"
2727 #include "realm-hex.h"
28+#include "realm-song.h"
2829 #include "cmd-pet.h"
2930 #include "cmd-spell.h"
3031 #include "dungeon.h"
--- a/src/racial.c
+++ b/src/racial.c
@@ -21,6 +21,7 @@
2121 #include "cmd-pet.h"
2222 #include "melee.h"
2323 #include "object-hook.h"
24+#include "realm-song.h"
2425
2526 #include "mutation.h"
2627 #include "player-effects.h"
--- a/src/realm-hex.c
+++ b/src/realm-hex.c
@@ -33,6 +33,7 @@
3333 #include "grid.h"
3434 #include "monsterrace.h"
3535 #include "targeting.h"
36+#include "realm-song.h"
3637
3738 #define MAX_KEEP 4 /*!<呪術の最大詠唱数 */
3839
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -1,6 +1,8 @@
11 #include "angband.h"
22 #include "util.h"
33
4+#include "realm-song.h"
5+
46 #include "cmd-spell.h"
57 #include "spells.h"
68 #include "spells-status.h"
--- a/src/realm-song.h
+++ b/src/realm-song.h
@@ -1 +1,39 @@
1-extern concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode);
1+
2+/*
3+ * Music songs
4+ */
5+#define MUSIC_NONE 0
6+#define MUSIC_SLOW 1
7+#define MUSIC_BLESS 2
8+#define MUSIC_STUN 3
9+#define MUSIC_L_LIFE 4
10+#define MUSIC_FEAR 5
11+#define MUSIC_HERO 6
12+#define MUSIC_MIND 7
13+#define MUSIC_STEALTH 8
14+#define MUSIC_ID 9
15+#define MUSIC_CONF 10
16+#define MUSIC_SOUND 11
17+#define MUSIC_CHARM 12
18+#define MUSIC_WALL 13
19+#define MUSIC_RESIST 14
20+#define MUSIC_SPEED 15
21+#define MUSIC_DISPEL 16
22+#define MUSIC_SARUMAN 17
23+#define MUSIC_QUAKE 18
24+#define MUSIC_STASIS 19
25+#define MUSIC_SHERO 20
26+#define MUSIC_H_LIFE 21
27+#define MUSIC_INVULN 22
28+#define MUSIC_PSI 23
29+
30+#define MUSIC_DETECT 101
31+
32+#define SINGING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[0])
33+#define INTERUPTING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[1])
34+#define SINGING_COUNT(P_PTR) ((P_PTR)->magic_num1[2])
35+#define SINGING_SONG_ID(P_PTR) ((P_PTR)->magic_num2[0])
36+#define music_singing(X) ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == (X)))
37+#define music_singing_any() ((p_ptr->pclass == CLASS_BARD) && p_ptr->magic_num1[0])
38+
39+extern concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode);
--- a/src/selfinfo.c
+++ b/src/selfinfo.c
@@ -20,6 +20,7 @@
2020 #include "player-status.h"
2121 #include "avatar.h"
2222 #include "realm-hex.h"
23+#include "realm-song.h"
2324
2425 /*!
2526 * @brief 自己分析処理(Nethackからのアイデア) / self-knowledge... idea from nethack.
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -13,6 +13,7 @@
1313 #include "player-effects.h"
1414 #include "objectkind.h"
1515 #include "targeting.h"
16+#include "realm-song.h"
1617
1718 /*!
1819 * @brief モンスター回復処理
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -43,6 +43,7 @@
4343 #include "player-status.h"
4444 #include "player-move.h"
4545 #include "realm-hex.h"
46+#include "realm-song.h"
4647 #include "object-hook.h"
4748 #include "object-broken.h"
4849 #include "object-flavor.h"
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -51,6 +51,7 @@
5151 #include "objectkind.h"
5252 #include "monsterrace.h"
5353 #include "targeting.h"
54+#include "realm-song.h"
5455
5556 /*!
5657 * @brief プレイヤー周辺の地形を感知する
--- a/src/trap.c
+++ b/src/trap.c
@@ -19,6 +19,7 @@
1919 #include "files.h"
2020 #include "dungeon.h"
2121 #include "world.h"
22+#include "realm-song.h"
2223
2324 static s16b normal_traps[MAX_NORMAL_TRAPS];
2425
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -30,6 +30,7 @@
3030
3131 #include "spells.h"
3232 #include "realm-hex.h"
33+#include "realm-song.h"
3334
3435 #include "object-flavor.h"
3536
--- a/src/warning.c
+++ b/src/warning.c
@@ -16,6 +16,7 @@
1616 #include "dungeon.h"
1717 #include "player-race.h"
1818 #include "melee.h"
19+#include "realm-song.h"
1920
2021 /*!
2122 * @brief 警告を放つアイテムを選択する /
Show on old repository browser