OSDN Git Service

[Refactor] #40274 Moved definition values of sound from util.h to sound-definitions...
authorHourier <hourier@users.sourceforge.jp>
Wed, 22 Apr 2020 09:03:18 +0000 (18:03 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 22 Apr 2020 09:06:57 +0000 (18:06 +0900)
37 files changed:
src/birth.c
src/chest.c
src/cmd/cmd-activate.c
src/cmd/cmd-basic.c
src/cmd/cmd-eat.c
src/cmd/cmd-hissatsu.c
src/cmd/cmd-item.c
src/cmd/cmd-magiceat.c
src/cmd/cmd-mane.c
src/cmd/cmd-quaff.c
src/cmd/cmd-read.c
src/cmd/cmd-spell.c
src/cmd/cmd-usestaff.c
src/cmd/cmd-zaprod.c
src/cmd/cmd-zapwand.c
src/combat/melee1.c
src/combat/shoot.c
src/core.c
src/main/sound-definitions-table.h
src/market/say-comments.c
src/market/store.c
src/mind.c
src/monster-status.c
src/monster2.c
src/mspells2.c
src/mspells3.c
src/mspells4.c
src/object2.c
src/player-damage.c
src/player-move.c
src/player-status.c
src/snipe.c
src/spells1.c
src/spells2.c
src/spells3.c
src/trap.c
src/util.h

index c136a21..3084439 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
 #include "market/building.h"
 #include "core.h"
 #include "core/show-file.h"
index a50ccdd..ec92b0a 100644 (file)
@@ -1,6 +1,6 @@
-
-#include "angband.h"
+#include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "spells.h"
 #include "spells-summon.h"
index f77bf76..e296493 100644 (file)
@@ -7,6 +7,7 @@
 */
 
 #include "angband.h"
+#include "main/sound-definitions-table.h"
 
 #include "cmd/cmd-activate.h"
 #include "cmd/cmd-basic.h"
index add169e..4dd1ec5 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
 #include "core.h"
 #include "gameterm.h"
 
index 5eb92fe..3fd3ed6 100644 (file)
@@ -8,6 +8,7 @@
 
 
 #include "angband.h"
+#include "main/sound-definitions-table.h"
 #include "util.h"
 
 #include "object-flavor.h"
index 30b56d7..7ec16b0 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "monsterrace-hook.h"
 #include "player-status.h"
index 74217fc..988a844 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "autopick.h"
 #include "gameterm.h"
 
index 3dbb56b..af3557a 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "gameterm.h"
 
 #include "cmd-basic.h"
index f855d86..664db28 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "floor.h"
 #include "grid.h"
index e818c12..f11e1bb 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "birth.h"
 #include "selfinfo.h"
index 2c64c23..1aa036f 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "object-flavor.h"
 #include "object-hook.h"
index bde0f7e..ce41e86 100644 (file)
@@ -9,6 +9,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "cmd/cmd-spell.h"
 
 #include "io/write-diary.h"
index b7873df..0f232ad 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "player-race.h"
 #include "spells-summon.h"
index 703c8eb..a85d17f 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "avatar.h"
 #include "player-status.h"
index 2986db3..0f68643 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "avatar.h"
 #include "spells.h"
index 8f4f93e..c5ce785 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "artifact.h"
 #include "cmd-pet.h"
index 7913fe0..d2c6af0 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "gameterm.h"
 
 #include "monster.h"
index c4fc413..0fe8711 100644 (file)
@@ -14,6 +14,7 @@
 #include "signal-handlers.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
 #include "core.h"
 #include "inet.h"
 #include "gameterm.h"
index 2e979ff..fcd3a15 100644 (file)
@@ -1,5 +1,71 @@
 #pragma once
 
+#define SOUND_HIT        1
+#define SOUND_MISS       2
+#define SOUND_FLEE       3
+#define SOUND_DROP       4
+#define SOUND_KILL       5
+#define SOUND_LEVEL      6
+#define SOUND_DEATH      7
+#define SOUND_STUDY      8
+#define SOUND_TELEPORT   9
+#define SOUND_SHOOT     10
+#define SOUND_QUAFF     11
+#define SOUND_ZAP       12
+#define SOUND_WALK      13
+#define SOUND_TPOTHER   14
+#define SOUND_HITWALL   15
+#define SOUND_EAT       16
+#define SOUND_STORE1    17
+#define SOUND_STORE2    18
+#define SOUND_STORE3    19
+#define SOUND_STORE4    20
+#define SOUND_DIG       21
+#define SOUND_OPENDOOR  22
+#define SOUND_SHUTDOOR  23
+#define SOUND_TPLEVEL   24
+#define SOUND_SCROLL   25
+#define SOUND_BUY          26
+#define SOUND_SELL         27
+#define SOUND_WARN         28
+#define SOUND_ROCKET    29 /*!< Somebody's shooting rockets */
+#define SOUND_N_KILL    30 /*!< The player kills a non-living/undead monster */
+#define SOUND_U_KILL    31 /*!< The player kills a unique */
+#define SOUND_QUEST     32 /*!< The player has just completed a quest */
+#define SOUND_HEAL      33 /*!< The player was healed a little bit */
+#define SOUND_X_HEAL    34 /*!< The player was healed full health */
+#define SOUND_BITE      35 /*!< A monster bites you */
+#define SOUND_CLAW      36 /*!< A monster claws you */
+#define SOUND_M_SPELL   37 /*!< A monster casts a miscellaneous spell */
+#define SOUND_SUMMON    38 /*!< A monster casts a summoning spell  */
+#define SOUND_BREATH    39 /*!< A monster breathes */
+#define SOUND_BALL      40 /*!< A monster casts a ball / bolt spell */
+#define SOUND_M_HEAL    41 /*!< A monster heals itself somehow */
+#define SOUND_ATK_SPELL 42 /*!< A monster casts a misc. offensive spell */
+#define SOUND_EVIL      43 /*!< Something nasty has just happened! */
+#define SOUND_TOUCH     44 /*!< A monster touches you */
+#define SOUND_STING     45 /*!< A monster stings you */
+#define SOUND_CRUSH     46 /*!< A monster crushes / envelopes you */
+#define SOUND_SLIME     47 /*!< A monster drools/spits/etc on you */
+#define SOUND_WAIL      48 /*!< A monster wails */
+#define SOUND_WINNER    49 /*!< Just won the game! */
+#define SOUND_FIRE      50 /*!< An item was burned  */
+#define SOUND_ACID      51 /*!< An item was destroyed by acid */
+#define SOUND_ELEC      52 /*!< An item was destroyed by electricity */
+#define SOUND_COLD      53 /*!< An item was shattered */
+#define SOUND_ILLEGAL   54 /*!< Illegal command attempted */
+#define SOUND_FAIL      55 /*!< Fail to get a spell off / activate an item */
+#define SOUND_WAKEUP    56 /*!< A monster wakes up */
+#define SOUND_INVULN    57 /*!< Invulnerability! */
+#define SOUND_FALL      58 /*!< Falling through a trapdoor... */
+#define SOUND_PAIN      59 /*!< A monster is in pain! */
+#define SOUND_DESTITEM  60 /*!< An item was destroyed by misc. means */
+#define SOUND_MOAN      61 /*!< A monster makes a moan/beg/insult attack */
+#define SOUND_SHOW      62 /*!< A monster makes a "show" attack */
+#define SOUND_UNUSED    63 /*!< (no sound for gaze attacks) */
+#define SOUND_EXPLODE   64 /*!< Something (or somebody) explodes */
+#define SOUND_GLASS     65 /*!< A glass feature was crashed */
+#define SOUND_REFLECT   66 /*!< A bolt was reflected */
 #define SOUND_MAX 67 /*!< 効果音定義の最大数 / Maximum numbers of sound effect */
 
 extern const concptr angband_sound_name[SOUND_MAX];
index 596aae7..973a961 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "say-comments.h"
+#include "main/sound-definitions-table.h"
 #include "market/store-owner-comments.h"
 #include "market/store-util.h"
 #include "avatar.h"
index 9bf5709..9d29d89 100644 (file)
@@ -20,6 +20,7 @@
 #include "core.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
 #include "gameterm.h"
 
 #include "floor.h"
index defdab1..72976d0 100644 (file)
@@ -17,6 +17,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "mind.h"
 
index d5f8945..d369c85 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "creature.h"
 #include "io/write-diary.h"
index a2fc8e1..749685d 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "core.h"
 
 #include "io/write-diary.h"
index d7bd9c9..4a9220e 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "cmd-pet.h"
 #include "floor.h"
index 421a2f5..47f2f86 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "floor.h"
 #include "grid.h"
index c820048..a7094d9 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "floor.h"
 #include "grid.h"
index 09914f5..a30ae72 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "world.h"
 #include "gameterm.h"
 
index 012412e..275ca6d 100644 (file)
@@ -2,6 +2,7 @@
 #include "core.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
 #include "gameterm.h"
 
 #include "avatar.h"
 #include "save.h"
 #include "files.h"
 
-
 /*!
-* todo 元々「破損したアイテムの数」をreturnしていました
-* しかし調査の結果、どの関数も戻り値を使用していませんでした
-* よって戻りをvoidとし、破損したアイテム数を計上しているローカル変数を削除しました
-* 確認後、問題がなければ本コメントを削除の上コミット願います
-* そして英語のコメントにある「stealing」とは一体…詳細不明につき残しました
-* なお「toryを省略する必要はないじゃろ」との独断により関数名を変更しました
-* 気に入らなければ元に戻して下さい。。。 by Hourier
-* ***
-* @brief アイテムを指定確率で破損させる /
-* Destroys a type of item on a given percent chance
-* @param player_ptr プレーヤーへの参照ポインタ
-* @param typ 破損判定関数ポインタ
-* @param perc 基本確率
-* @return なし
-* @details
-* Note that missiles are no longer necessarily all destroyed
-* Destruction taken from "melee.c" code for "stealing".
-* New-style wands and rods handled correctly. -LM-
-*/
+ * @brief アイテムを指定確率で破損させる /
+ * Destroys a type of item on a given percent chance
+ * @param player_ptr プレーヤーへの参照ポインタ
+ * @param typ 破損判定関数ポインタ
+ * @param perc 基本確率
+ * @return なし
+ * @details
+ * Note that missiles are no longer necessarily all destroyed
+ * Destruction taken from "melee.c" code for "stealing".
+ * New-style wands and rods handled correctly. -LM-
+ */
 void inventory_damage(player_type *player_ptr, inven_func typ, int perc)
 {
        INVENTORY_IDX i;
@@ -386,7 +378,6 @@ HIT_POINT cold_dam(player_type *creature_ptr, HIT_POINT dam, concptr kb_str, int
  * the game when he dies, since the "You die." message is shown before
  * setting the player to "dead".
  */
-
 int take_hit(player_type *creature_ptr, int damage_type, HIT_POINT damage, concptr hit_from, int monspell)
 {
        int old_chp = creature_ptr->chp;
index 4237e29..c0a6cfc 100644 (file)
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "realm-song.h"
 #include "autopick.h"
index 3b2c20f..2ede05e 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "market/building.h"
 #include "quest.h"
index ca168ff..06de21c 100644 (file)
@@ -9,6 +9,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "gameterm.h"
 
 #include "player-status.h"
index 3bd625b..9f902b8 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "io/write-diary.h"
 #include "cmd/cmd-pet.h"
index 0ab4712..6ad102a 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "core.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "creature.h"
 
index 655dd9b..e3afad0 100644 (file)
@@ -16,6 +16,7 @@
 #include "core.h"
 #include "gameterm.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "object-ego.h"
 
 #include "creature.h"
index 360483a..5f55c22 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "io/write-diary.h"
 #include "cmd/cmd-dump.h"
index ba30417..1ff8899 100644 (file)
@@ -166,80 +166,6 @@ extern s16b command_new;
 
 extern concptr keymap_act[KEYMAP_MODES][256];
 
-/*** Sound constants ***/
-
-/*
- * Mega-Hack -- some primitive sound support (see "main-win.c")
- *
- * Some "sound" constants for "Term_xtra(TERM_XTRA_SOUND, val)"
- */
-#define SOUND_HIT        1
-#define SOUND_MISS       2
-#define SOUND_FLEE       3
-#define SOUND_DROP       4
-#define SOUND_KILL       5
-#define SOUND_LEVEL      6
-#define SOUND_DEATH      7
-#define SOUND_STUDY      8
-#define SOUND_TELEPORT   9
-#define SOUND_SHOOT     10
-#define SOUND_QUAFF     11
-#define SOUND_ZAP       12
-#define SOUND_WALK      13
-#define SOUND_TPOTHER   14
-#define SOUND_HITWALL   15
-#define SOUND_EAT       16
-#define SOUND_STORE1    17
-#define SOUND_STORE2    18
-#define SOUND_STORE3    19
-#define SOUND_STORE4    20
-#define SOUND_DIG       21
-#define SOUND_OPENDOOR  22
-#define SOUND_SHUTDOOR  23
-#define SOUND_TPLEVEL   24
-#define SOUND_SCROLL   25
-#define SOUND_BUY          26
-#define SOUND_SELL         27
-#define SOUND_WARN         28
-#define SOUND_ROCKET    29 /*!< Somebody's shooting rockets */
-#define SOUND_N_KILL    30 /*!< The player kills a non-living/undead monster */
-#define SOUND_U_KILL    31 /*!< The player kills a unique */
-#define SOUND_QUEST     32 /*!< The player has just completed a quest */
-#define SOUND_HEAL      33 /*!< The player was healed a little bit */
-#define SOUND_X_HEAL    34 /*!< The player was healed full health */
-#define SOUND_BITE      35 /*!< A monster bites you */
-#define SOUND_CLAW      36 /*!< A monster claws you */
-#define SOUND_M_SPELL   37 /*!< A monster casts a miscellaneous spell */
-#define SOUND_SUMMON    38 /*!< A monster casts a summoning spell  */
-#define SOUND_BREATH    39 /*!< A monster breathes */
-#define SOUND_BALL      40 /*!< A monster casts a ball / bolt spell */
-#define SOUND_M_HEAL    41 /*!< A monster heals itself somehow */
-#define SOUND_ATK_SPELL 42 /*!< A monster casts a misc. offensive spell */
-#define SOUND_EVIL      43 /*!< Something nasty has just happened! */
-#define SOUND_TOUCH     44 /*!< A monster touches you */
-#define SOUND_STING     45 /*!< A monster stings you */
-#define SOUND_CRUSH     46 /*!< A monster crushes / envelopes you */
-#define SOUND_SLIME     47 /*!< A monster drools/spits/etc on you */
-#define SOUND_WAIL      48 /*!< A monster wails */
-#define SOUND_WINNER    49 /*!< Just won the game! */
-#define SOUND_FIRE      50 /*!< An item was burned  */
-#define SOUND_ACID      51 /*!< An item was destroyed by acid */
-#define SOUND_ELEC      52 /*!< An item was destroyed by electricity */
-#define SOUND_COLD      53 /*!< An item was shattered */
-#define SOUND_ILLEGAL   54 /*!< Illegal command attempted */
-#define SOUND_FAIL      55 /*!< Fail to get a spell off / activate an item */
-#define SOUND_WAKEUP    56 /*!< A monster wakes up */
-#define SOUND_INVULN    57 /*!< Invulnerability! */
-#define SOUND_FALL      58 /*!< Falling through a trapdoor... */
-#define SOUND_PAIN      59 /*!< A monster is in pain! */
-#define SOUND_DESTITEM  60 /*!< An item was destroyed by misc. means */
-#define SOUND_MOAN      61 /*!< A monster makes a moan/beg/insult attack */
-#define SOUND_SHOW      62 /*!< A monster makes a "show" attack */
-#define SOUND_UNUSED    63 /*!< (no sound for gaze attacks) */
-#define SOUND_EXPLODE   64 /*!< Something (or somebody) explodes */
-#define SOUND_GLASS     65 /*!< A glass feature was crashed */
-#define SOUND_REFLECT   66 /*!< A bolt was reflected */
-
   /*!
    * @brief 銘情報の最大数 / Maximum number of "quarks" (see "io.c")
    * @note