1 //------------------------------------------------------------------------ 2 // SOUND Definitions 3 //------------------------------------------------------------------------ 4 // 5 // DEH_EDGE Copyright (C) 2004-2005 The EDGE Team 6 // 7 // This program is under the GNU General Public License. 8 // It comes WITHOUT ANY WARRANTY of any kind. 9 // See COPYING.txt for the full details. 10 // 11 //------------------------------------------------------------------------ 12 13 #ifndef __SOUNDS_HDR__ 14 #define __SOUNDS_HDR__ 15 16 namespace Deh_Edge 17 { 18 19 // 20 // MusicInfo struct. 21 // 22 typedef struct 23 { 24 // up to 6-character name 25 const char *orig_name; 26 27 int ddf_num; 28 29 // changed name (NULL if not modified). Space for 6 non-NUL characters. 30 char *new_name; 31 } 32 musicinfo_t; 33 34 // 35 // Identifiers for all music in game. 36 // 37 38 typedef enum 39 { 40 mus_None, 41 42 mus_e1m1, mus_e1m2, mus_e1m3, mus_e1m4, mus_e1m5, 43 mus_e1m6, mus_e1m7, mus_e1m8, mus_e1m9, mus_e2m1, 44 mus_e2m2, mus_e2m3, mus_e2m4, mus_e2m5, mus_e2m6, 45 mus_e2m7, mus_e2m8, mus_e2m9, mus_e3m1, mus_e3m2, 46 mus_e3m3, mus_e3m4, mus_e3m5, mus_e3m6, mus_e3m7, 47 mus_e3m8, mus_e3m9, 48 49 mus_inter, mus_intro, mus_bunny, mus_victor, mus_introa, 50 mus_runnin, mus_stalks, mus_countd, mus_betwee, mus_doom, 51 mus_the_da, mus_shawn, mus_ddtblu, mus_in_cit, mus_dead, 52 mus_stlks2, mus_theda2, mus_doom2, mus_ddtbl2, mus_runni2, 53 mus_dead2, mus_stlks3, mus_romero, mus_shawn2, mus_messag, 54 mus_count2, mus_ddtbl3, mus_ampie, mus_theda3, mus_adrian, 55 mus_messg2, mus_romer2, mus_tense, mus_shawn3, mus_openin, 56 mus_evil, mus_ultima, mus_read_m, mus_dm2ttl, mus_dm2int, 57 58 NUMMUSIC 59 } 60 musictype_e; 61 62 // the complete set of music 63 extern musicinfo_t S_music[NUMMUSIC]; 64 65 66 //------------------------------------------------------------------------ 67 68 // 69 // SoundFX struct. 70 // 71 72 typedef struct 73 { 74 // up to 6-character name 75 const char *orig_name; 76 77 // Sfx singularity (only one at a time) 78 int singularity; 79 80 // Sfx priority 81 int priority; 82 83 // referenced sound if a link 84 int link; 85 86 // pitch if a link 87 int pitch; 88 89 // volume if a link 90 int volume; 91 92 // changed name (NULL if not modified). Space for 6 non-NUL characters. 93 char *new_name; 94 } 95 sfxinfo_t; 96 97 // 98 // Identifiers for all sfx in game. 99 // 100 101 typedef enum 102 { 103 sfx_None, 104 105 sfx_pistol, sfx_shotgn, sfx_sgcock, sfx_dshtgn, sfx_dbopn, 106 sfx_dbcls, sfx_dbload, sfx_plasma, sfx_bfg, sfx_sawup, 107 sfx_sawidl, sfx_sawful, sfx_sawhit, sfx_rlaunc, sfx_rxplod, 108 sfx_firsht, sfx_firxpl, sfx_pstart, sfx_pstop, sfx_doropn, 109 sfx_dorcls, sfx_stnmov, sfx_swtchn, sfx_swtchx, sfx_plpain, 110 sfx_dmpain, sfx_popain, sfx_vipain, sfx_mnpain, sfx_pepain, 111 sfx_slop, sfx_itemup, sfx_wpnup, sfx_oof, sfx_telept, 112 sfx_posit1, sfx_posit2, sfx_posit3, sfx_bgsit1, sfx_bgsit2, 113 sfx_sgtsit, sfx_cacsit, sfx_brssit, sfx_cybsit, sfx_spisit, 114 sfx_bspsit, sfx_kntsit, sfx_vilsit, sfx_mansit, sfx_pesit, 115 sfx_sklatk, sfx_sgtatk, sfx_skepch, sfx_vilatk, sfx_claw, 116 sfx_skeswg, sfx_pldeth, sfx_pdiehi, sfx_podth1, sfx_podth2, 117 sfx_podth3, sfx_bgdth1, sfx_bgdth2, sfx_sgtdth, sfx_cacdth, 118 sfx_skldth, sfx_brsdth, sfx_cybdth, sfx_spidth, sfx_bspdth, 119 sfx_vildth, sfx_kntdth, sfx_pedth, sfx_skedth, sfx_posact, 120 sfx_bgact, sfx_dmact, sfx_bspact, sfx_bspwlk, sfx_vilact, 121 sfx_noway, sfx_barexp, sfx_punch, sfx_hoof, sfx_metal, 122 sfx_chgun, sfx_tink, sfx_bdopn, sfx_bdcls, sfx_itmbk, 123 sfx_flame, sfx_flamst, sfx_getpow, sfx_bospit, sfx_boscub, 124 sfx_bossit, sfx_bospn, sfx_bosdth, sfx_manatk, sfx_mandth, 125 sfx_sssit, sfx_ssdth, sfx_keenpn, sfx_keendt, sfx_skeact, 126 sfx_skesit, sfx_skeatk, sfx_radio, 127 128 NUMSFX, 129 130 // BOOM and MBF sounds: 131 #define sfx_dgsit NUMSFX 132 sfx_dgatk, sfx_dgact, sfx_dgdth, sfx_dgpain, 133 134 NUMSFX_BEX 135 } 136 sfxtype_e; 137 138 // the complete set of sound effects 139 extern sfxinfo_t S_sfx[NUMSFX_BEX]; 140 141 142 namespace Sounds 143 { 144 void Startup(void); 145 146 // this returns true if the string was found. 147 bool ReplaceSound(const char *before, const char *after); 148 bool ReplaceMusic(const char *before, const char *after); 149 150 void AlterBexSound(const char *new_val); 151 void AlterBexMusic(const char *new_val); 152 153 void MarkSound(int s_num); 154 void AlterSound(int new_val); 155 156 const char *GetSound(int sound_id); 157 158 void ConvertSFX(void); 159 void ConvertMUS(void); 160 } 161 162 } // Deh_Edge 163 164 #endif /* __SOUNDS_HDR__ */ 165