Subversion Repositories eduke32

Rev

Rev 6055 | Rev 8788 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3834 hendricks2 1
//-------------------------------------------------------------------------
2
/*
3
Copyright (C) 2013 EDuke32 developers and contributors
4
 
5
This file is part of EDuke32.
6
 
7
EDuke32 is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License version 2
9
as published by the Free Software Foundation.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
15
See the GNU General Public License for more details.
16
 
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
4541 hendricks2 19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
3834 hendricks2 20
*/
21
//-------------------------------------------------------------------------
22
 
23
#include "compat.h"
24
#include "build.h"
25
 
26
#include "namesdyn.h"
27
#include "sounds.h"
28
#include "soundsdyn.h"
29
#include "global.h"
30
 
31
#ifdef DYNSOUNDREMAP_ENABLE
32
# define DVPTR(x) &x
33
#else
34
# define DVPTR(x) NULL
35
#endif
36
 
37
int16_t DynamicSoundMap[MAXSOUNDS];
38
 
39
struct dynitem
40
{
41
    const char *str;
42
    int32_t *dynvalptr;
43
    const int16_t staticval;
44
};
45
 
46
LUNATIC_EXTERN struct dynitem g_dynSoundList[] =
47
{
7187 terminx 48
    { "ALIEN_SWITCH1",       DVPTR(ALIEN_SWITCH1),      ALIEN_SWITCH1__STATIC },
49
    { "BIGBANG",             DVPTR(BIGBANG),            BIGBANG__STATIC },
50
    { "BONUS_SPEECH1",       DVPTR(BONUS_SPEECH1),      BONUS_SPEECH1__STATIC },
51
    { "BONUS_SPEECH2",       DVPTR(BONUS_SPEECH2),      BONUS_SPEECH2__STATIC },
52
    { "BONUS_SPEECH3",       DVPTR(BONUS_SPEECH3),      BONUS_SPEECH3__STATIC },
53
    { "BONUS_SPEECH4",       DVPTR(BONUS_SPEECH4),      BONUS_SPEECH4__STATIC },
54
    { "BONUSMUSIC",          DVPTR(BONUSMUSIC),         BONUSMUSIC__STATIC },
55
    { "BOS1_RECOG",          DVPTR(BOS1_RECOG),         BOS1_RECOG__STATIC },
56
    { "BOS1_WALK",           DVPTR(BOS1_WALK),          BOS1_WALK__STATIC },
57
    { "BOS2_RECOG",          DVPTR(BOS2_RECOG),         BOS2_RECOG__STATIC },
58
    { "BOS3_RECOG",          DVPTR(BOS3_RECOG),         BOS3_RECOG__STATIC },
59
    { "BOS4_RECOG",          DVPTR(BOS4_RECOG),         BOS4_RECOG__STATIC },
60
    { "BOSS4_DEADSPEECH",    DVPTR(BOSS4_DEADSPEECH),   BOSS4_DEADSPEECH__STATIC },
61
    { "BOSS4_FIRSTSEE",      DVPTR(BOSS4_FIRSTSEE),     BOSS4_FIRSTSEE__STATIC },
62
    { "BOSSTALKTODUKE",      DVPTR(BOSSTALKTODUKE),     BOSSTALKTODUKE__STATIC },
63
    { "CAPT_RECOG",          DVPTR(CAPT_RECOG),         CAPT_RECOG__STATIC },
64
    { "CAT_FIRE",            DVPTR(CAT_FIRE),           CAT_FIRE__STATIC },
65
    { "CHAINGUN_FIRE",       DVPTR(CHAINGUN_FIRE),      CHAINGUN_FIRE__STATIC },
66
    { "COMM_RECOG",          DVPTR(COMM_RECOG),         COMM_RECOG__STATIC },
67
    { "DRON_RECOG",          DVPTR(DRON_RECOG),         DRON_RECOG__STATIC },
68
    { "DUKE_CRACK",          DVPTR(DUKE_CRACK),          DUKE_CRACK__STATIC },
69
    { "DUKE_CRACK_FIRST",    DVPTR(DUKE_CRACK_FIRST),    DUKE_CRACK_FIRST__STATIC },
70
    { "DUKE_CRACK2",         DVPTR(DUKE_CRACK2),         DUKE_CRACK2__STATIC },
71
    { "DUKE_DRINKING",       DVPTR(DUKE_DRINKING),       DUKE_DRINKING__STATIC },
72
    { "DUKE_GASP",           DVPTR(DUKE_GASP),           DUKE_GASP__STATIC },
73
    { "DUKE_GET",            DVPTR(DUKE_GET),            DUKE_GET__STATIC },
74
    { "DUKE_GETWEAPON2",     DVPTR(DUKE_GETWEAPON2),     DUKE_GETWEAPON2__STATIC },
75
    { "DUKE_GETWEAPON6",     DVPTR(DUKE_GETWEAPON6),     DUKE_GETWEAPON6__STATIC },
3834 hendricks2 76
    { "DUKE_GOTHEALTHATLOW", DVPTR(DUKE_GOTHEALTHATLOW), DUKE_GOTHEALTHATLOW__STATIC },
7187 terminx 77
    { "DUKE_GRUNT",          DVPTR(DUKE_GRUNT),          DUKE_GRUNT__STATIC },
78
    { "DUKE_HARTBEAT",       DVPTR(DUKE_HARTBEAT),       DUKE_HARTBEAT__STATIC },
79
    { "DUKE_JETPACK_IDLE",   DVPTR(DUKE_JETPACK_IDLE),   DUKE_JETPACK_IDLE__STATIC },
80
    { "DUKE_JETPACK_OFF",    DVPTR(DUKE_JETPACK_OFF),    DUKE_JETPACK_OFF__STATIC },
81
    { "DUKE_JETPACK_ON",     DVPTR(DUKE_JETPACK_ON),     DUKE_JETPACK_ON__STATIC },
82
    { "DUKE_LAND",           DVPTR(DUKE_LAND),           DUKE_LAND__STATIC },
83
    { "DUKE_LAND_HURT",      DVPTR(DUKE_LAND_HURT),      DUKE_LAND_HURT__STATIC },
84
    { "DUKE_LONGTERM_PAIN",  DVPTR(DUKE_LONGTERM_PAIN),  DUKE_LONGTERM_PAIN__STATIC },
85
    { "DUKE_ONWATER",        DVPTR(DUKE_ONWATER),        DUKE_ONWATER__STATIC },
86
    { "DUKE_PISSRELIEF",     DVPTR(DUKE_PISSRELIEF),     DUKE_PISSRELIEF__STATIC },
87
    { "DUKE_SCREAM",         DVPTR(DUKE_SCREAM),         DUKE_SCREAM__STATIC },
88
    { "DUKE_SEARCH",         DVPTR(DUKE_SEARCH),         DUKE_SEARCH__STATIC },
89
    { "DUKE_SEARCH2",        DVPTR(DUKE_SEARCH2),        DUKE_SEARCH2__STATIC },
90
    { "DUKE_TAKEPILLS",      DVPTR(DUKE_TAKEPILLS),      DUKE_TAKEPILLS__STATIC },
91
    { "DUKE_UNDERWATER",     DVPTR(DUKE_UNDERWATER),     DUKE_UNDERWATER__STATIC },
92
    { "DUKE_URINATE",        DVPTR(DUKE_URINATE),        DUKE_URINATE__STATIC },
93
    { "DUKE_USEMEDKIT",      DVPTR(DUKE_USEMEDKIT),      DUKE_USEMEDKIT__STATIC },
94
    { "DUKE_WALKINDUCTS",    DVPTR(DUKE_WALKINDUCTS),    DUKE_WALKINDUCTS__STATIC },
95
    { "DUKETALKTOBOSS",      DVPTR(DUKETALKTOBOSS),      DUKETALKTOBOSS__STATIC },
96
    { "EARTHQUAKE",          DVPTR(EARTHQUAKE),         EARTHQUAKE__STATIC },
97
    { "EJECT_CLIP",          DVPTR(EJECT_CLIP),         EJECT_CLIP__STATIC },
98
    { "ELEVATOR_OFF",        DVPTR(ELEVATOR_OFF),       ELEVATOR_OFF__STATIC },
99
    { "ELEVATOR_ON",         DVPTR(ELEVATOR_ON),        ELEVATOR_ON__STATIC },
100
    { "END_OF_LEVEL_WARN",   DVPTR(END_OF_LEVEL_WARN),  END_OF_LEVEL_WARN__STATIC },
101
    { "ENDSEQVOL2SND1",      DVPTR(ENDSEQVOL2SND1),     ENDSEQVOL2SND1__STATIC },
102
    { "ENDSEQVOL2SND2",      DVPTR(ENDSEQVOL2SND2),     ENDSEQVOL2SND2__STATIC },
103
    { "ENDSEQVOL2SND3",      DVPTR(ENDSEQVOL2SND3),     ENDSEQVOL2SND3__STATIC },
104
    { "ENDSEQVOL2SND4",      DVPTR(ENDSEQVOL2SND4),     ENDSEQVOL2SND4__STATIC },
105
    { "ENDSEQVOL2SND5",      DVPTR(ENDSEQVOL2SND5),     ENDSEQVOL2SND5__STATIC },
106
    { "ENDSEQVOL2SND6",      DVPTR(ENDSEQVOL2SND6),     ENDSEQVOL2SND6__STATIC },
107
    { "ENDSEQVOL2SND7",      DVPTR(ENDSEQVOL2SND7),     ENDSEQVOL2SND7__STATIC },
108
    { "ENDSEQVOL3SND2",      DVPTR(ENDSEQVOL3SND2),     ENDSEQVOL3SND2__STATIC },
109
    { "ENDSEQVOL3SND3",      DVPTR(ENDSEQVOL3SND3),     ENDSEQVOL3SND3__STATIC },
110
    { "ENDSEQVOL3SND4",      DVPTR(ENDSEQVOL3SND4),     ENDSEQVOL3SND4__STATIC },
111
    { "ENDSEQVOL3SND5",      DVPTR(ENDSEQVOL3SND5),     ENDSEQVOL3SND5__STATIC },
112
    { "ENDSEQVOL3SND6",      DVPTR(ENDSEQVOL3SND6),     ENDSEQVOL3SND6__STATIC },
113
    { "ENDSEQVOL3SND7",      DVPTR(ENDSEQVOL3SND7),     ENDSEQVOL3SND7__STATIC },
114
    { "ENDSEQVOL3SND8",      DVPTR(ENDSEQVOL3SND8),     ENDSEQVOL3SND8__STATIC },
115
    { "ENDSEQVOL3SND9",      DVPTR(ENDSEQVOL3SND9),     ENDSEQVOL3SND9__STATIC },
116
    { "EXITMENUSOUND",       DVPTR(EXITMENUSOUND),      EXITMENUSOUND__STATIC },
117
    { "EXPANDERSHOOT",       DVPTR(EXPANDERSHOOT),      EXPANDERSHOOT__STATIC },
118
    { "FLUSH_TOILET",        DVPTR(FLUSH_TOILET),       FLUSH_TOILET__STATIC },
119
    { "FLY_BY",              DVPTR(FLY_BY),             FLY_BY__STATIC },
120
    { "GENERIC_AMBIENCE17",  DVPTR(GENERIC_AMBIENCE17), GENERIC_AMBIENCE17__STATIC },
121
    { "GLASS_BREAKING",      DVPTR(GLASS_BREAKING),     GLASS_BREAKING__STATIC },
122
    { "GLASS_HEAVYBREAK",    DVPTR(GLASS_HEAVYBREAK),   GLASS_HEAVYBREAK__STATIC },
123
    { "INSERT_CLIP",         DVPTR(INSERT_CLIP),        INSERT_CLIP__STATIC },
124
    { "INTRO4_1",            DVPTR(INTRO4_1),           INTRO4_1__STATIC },
125
    { "INTRO4_2",            DVPTR(INTRO4_2),           INTRO4_2__STATIC },
126
    { "INTRO4_3",            DVPTR(INTRO4_3),           INTRO4_3__STATIC },
127
    { "INTRO4_4",            DVPTR(INTRO4_4),           INTRO4_4__STATIC },
128
    { "INTRO4_5",            DVPTR(INTRO4_5),           INTRO4_5__STATIC },
129
    { "INTRO4_6",            DVPTR(INTRO4_6),           INTRO4_6__STATIC },
130
    { "INTRO4_B",            DVPTR(INTRO4_B),           INTRO4_B__STATIC },
131
    { "ITEM_SPLASH",         DVPTR(ITEM_SPLASH),        ITEM_SPLASH__STATIC },
132
    { "JIBBED_ACTOR5",       DVPTR(JIBBED_ACTOR5),      JIBBED_ACTOR5__STATIC },
133
    { "JIBBED_ACTOR6",       DVPTR(JIBBED_ACTOR6),      JIBBED_ACTOR6__STATIC },
134
    { "KICK_HIT",            DVPTR(KICK_HIT),           KICK_HIT__STATIC },
135
    { "LASERTRIP_ARMING",    DVPTR(LASERTRIP_ARMING),   LASERTRIP_ARMING__STATIC },
136
    { "LASERTRIP_EXPLODE",   DVPTR(LASERTRIP_EXPLODE),  LASERTRIP_EXPLODE__STATIC },
137
    { "LASERTRIP_ONWALL",    DVPTR(LASERTRIP_ONWALL),   LASERTRIP_ONWALL__STATIC },
138
    { "LIGHTNING_SLAP",      DVPTR(LIGHTNING_SLAP),     LIGHTNING_SLAP__STATIC },
139
    { "MONITOR_ACTIVE",      DVPTR(MONITOR_ACTIVE),     MONITOR_ACTIVE__STATIC },
140
    { "NITEVISION_ONOFF",    DVPTR(NITEVISION_ONOFF),   NITEVISION_ONOFF__STATIC },
141
    { "OCTA_RECOG",          DVPTR(OCTA_RECOG),         OCTA_RECOG__STATIC },
142
    { "PIG_RECOG",           DVPTR(PIG_RECOG),          PIG_RECOG__STATIC },
143
    { "PIPEBOMB_BOUNCE",     DVPTR(PIPEBOMB_BOUNCE),    PIPEBOMB_BOUNCE__STATIC },
144
    { "PIPEBOMB_EXPLODE",    DVPTR(PIPEBOMB_EXPLODE),   PIPEBOMB_EXPLODE__STATIC },
145
    { "PISTOL_BODYHIT",      DVPTR(PISTOL_BODYHIT),     PISTOL_BODYHIT__STATIC },
146
    { "PISTOL_FIRE",         DVPTR(PISTOL_FIRE),        PISTOL_FIRE__STATIC },
147
    { "PISTOL_RICOCHET",     DVPTR(PISTOL_RICOCHET),    PISTOL_RICOCHET__STATIC },
148
    { "POOLBALLHIT",         DVPTR(POOLBALLHIT),        POOLBALLHIT__STATIC },
149
    { "PRED_RECOG",          DVPTR(PRED_RECOG),         PRED_RECOG__STATIC },
150
    { "RATTY",               DVPTR(RATTY),              RATTY__STATIC },
151
    { "RECO_ATTACK",         DVPTR(RECO_ATTACK),        RECO_ATTACK__STATIC },
152
    { "RECO_PAIN",           DVPTR(RECO_PAIN),          RECO_PAIN__STATIC },
153
    { "RECO_RECOG",          DVPTR(RECO_RECOG),         RECO_RECOG__STATIC },
154
    { "RECO_ROAM",           DVPTR(RECO_ROAM),          RECO_ROAM__STATIC },
155
    { "RIPHEADNECK",         DVPTR(RIPHEADNECK),        RIPHEADNECK__STATIC },
156
    { "RPG_EXPLODE",         DVPTR(RPG_EXPLODE),        RPG_EXPLODE__STATIC },
157
    { "RPG_SHOOT",           DVPTR(RPG_SHOOT),          RPG_SHOOT__STATIC },
158
    { "SELECT_WEAPON",       DVPTR(SELECT_WEAPON),      SELECT_WEAPON__STATIC },
159
    { "SHORT_CIRCUIT",       DVPTR(SHORT_CIRCUIT),      SHORT_CIRCUIT__STATIC },
160
    { "SHOTGUN_COCK",        DVPTR(SHOTGUN_COCK),       SHOTGUN_COCK__STATIC },
161
    { "SHOTGUN_FIRE",        DVPTR(SHOTGUN_FIRE),       SHOTGUN_FIRE__STATIC },
162
    { "SHRINKER_FIRE",       DVPTR(SHRINKER_FIRE),      SHRINKER_FIRE__STATIC },
163
    { "SHRINKER_HIT",        DVPTR(SHRINKER_HIT),       SHRINKER_HIT__STATIC },
164
    { "SLIM_ATTACK",         DVPTR(SLIM_ATTACK),        SLIM_ATTACK__STATIC },
165
    { "SLIM_DYING",          DVPTR(SLIM_DYING),         SLIM_DYING__STATIC },
166
    { "SLIM_RECOG",          DVPTR(SLIM_RECOG),         SLIM_RECOG__STATIC },
167
    { "SLIM_ROAM",           DVPTR(SLIM_ROAM),          SLIM_ROAM__STATIC },
168
    { "SOMETHING_DRIPPING",  DVPTR(SOMETHING_DRIPPING), SOMETHING_DRIPPING__STATIC },
169
    { "SOMETHINGFROZE",      DVPTR(SOMETHINGFROZE),     SOMETHINGFROZE__STATIC },
170
    { "SOMETHINGHITFORCE",   DVPTR(SOMETHINGHITFORCE),  SOMETHINGHITFORCE__STATIC },
171
    { "SQUISHED",            DVPTR(SQUISHED),           SQUISHED__STATIC },
172
    { "SUBWAY",              DVPTR(SUBWAY),             SUBWAY__STATIC },
173
    { "SWITCH_ON",           DVPTR(SWITCH_ON),          SWITCH_ON__STATIC },
174
    { "TELEPORTER",          DVPTR(TELEPORTER),         TELEPORTER__STATIC },
175
    { "THUD",                DVPTR(THUD),               THUD__STATIC },
176
    { "THUNDER",             DVPTR(THUNDER),            THUNDER__STATIC },
177
    { "TURR_RECOG",          DVPTR(TURR_RECOG),         TURR_RECOG__STATIC },
178
    { "VENT_BUST",           DVPTR(VENT_BUST),          VENT_BUST__STATIC },
179
    { "VOL4ENDSND1",         DVPTR(VOL4ENDSND1),        VOL4ENDSND1__STATIC },
180
    { "VOL4ENDSND2",         DVPTR(VOL4ENDSND2),        VOL4ENDSND2__STATIC },
181
    { "WAR_AMBIENCE2",       DVPTR(WAR_AMBIENCE2),      WAR_AMBIENCE2__STATIC },
182
    { "WHIPYOURASS",         DVPTR(WHIPYOURASS),        WHIPYOURASS__STATIC },
183
    { "WIERDSHOT_FLY",       DVPTR(WIERDSHOT_FLY),      WIERDSHOT_FLY__STATIC },
184
    { "WIND_AMBIENCE",       DVPTR(WIND_AMBIENCE),      WIND_AMBIENCE__STATIC },
185
    { "WIND_REPEAT",         DVPTR(WIND_REPEAT),        WIND_REPEAT__STATIC },
3834 hendricks2 186
 };
187
 
188
#ifdef DYNSOUNDREMAP_ENABLE
189
 
7187 terminx 190
int32_t ALIEN_SWITCH1       = ALIEN_SWITCH1__STATIC;
191
int32_t BIGBANG             = BIGBANG__STATIC;
192
int32_t BONUS_SPEECH1       = BONUS_SPEECH1__STATIC;
193
int32_t BONUS_SPEECH2       = BONUS_SPEECH2__STATIC;
194
int32_t BONUS_SPEECH3       = BONUS_SPEECH3__STATIC;
195
int32_t BONUS_SPEECH4       = BONUS_SPEECH4__STATIC;
196
int32_t BONUSMUSIC          = BONUSMUSIC__STATIC;
197
int32_t BOS1_RECOG          = BOS1_RECOG__STATIC;
198
int32_t BOS1_WALK           = BOS1_WALK__STATIC;
199
int32_t BOS2_RECOG          = BOS2_RECOG__STATIC;
200
int32_t BOS3_RECOG          = BOS3_RECOG__STATIC;
201
int32_t BOS4_RECOG          = BOS4_RECOG__STATIC;
202
int32_t BOSS4_DEADSPEECH    = BOSS4_DEADSPEECH__STATIC;
203
int32_t BOSS4_FIRSTSEE      = BOSS4_FIRSTSEE__STATIC;
204
int32_t BOSSTALKTODUKE      = BOSSTALKTODUKE__STATIC;
205
int32_t CAPT_RECOG          = CAPT_RECOG__STATIC;
206
int32_t CAT_FIRE            = CAT_FIRE__STATIC;
207
int32_t CHAINGUN_FIRE       = CHAINGUN_FIRE__STATIC;
208
int32_t COMM_RECOG          = COMM_RECOG__STATIC;
209
int32_t DRON_RECOG          = DRON_RECOG__STATIC;
210
int32_t DUKE_CRACK          = DUKE_CRACK__STATIC;
211
int32_t DUKE_CRACK_FIRST    = DUKE_CRACK_FIRST__STATIC;
212
int32_t DUKE_CRACK2         = DUKE_CRACK2__STATIC;
213
int32_t DUKE_DRINKING       = DUKE_DRINKING__STATIC;
214
int32_t DUKE_GASP           = DUKE_GASP__STATIC;
215
int32_t DUKE_GET            = DUKE_GET__STATIC;
216
int32_t DUKE_GETWEAPON2     = DUKE_GETWEAPON2__STATIC;
217
int32_t DUKE_GETWEAPON6     = DUKE_GETWEAPON6__STATIC;
3834 hendricks2 218
int32_t DUKE_GOTHEALTHATLOW = DUKE_GOTHEALTHATLOW__STATIC;
7187 terminx 219
int32_t DUKE_GRUNT          = DUKE_GRUNT__STATIC;
220
int32_t DUKE_HARTBEAT       = DUKE_HARTBEAT__STATIC;
221
int32_t DUKE_JETPACK_IDLE   = DUKE_JETPACK_IDLE__STATIC;
222
int32_t DUKE_JETPACK_OFF    = DUKE_JETPACK_OFF__STATIC;
223
int32_t DUKE_JETPACK_ON     = DUKE_JETPACK_ON__STATIC;
224
int32_t DUKE_LAND           = DUKE_LAND__STATIC;
225
int32_t DUKE_LAND_HURT      = DUKE_LAND_HURT__STATIC;
226
int32_t DUKE_LONGTERM_PAIN  = DUKE_LONGTERM_PAIN__STATIC;
227
int32_t DUKE_ONWATER        = DUKE_ONWATER__STATIC;
228
int32_t DUKE_PISSRELIEF     = DUKE_PISSRELIEF__STATIC;
229
int32_t DUKE_SCREAM         = DUKE_SCREAM__STATIC;
230
int32_t DUKE_SEARCH         = DUKE_SEARCH__STATIC;
231
int32_t DUKE_SEARCH2        = DUKE_SEARCH2__STATIC;
232
int32_t DUKE_TAKEPILLS      = DUKE_TAKEPILLS__STATIC;
233
int32_t DUKE_UNDERWATER     = DUKE_UNDERWATER__STATIC;
234
int32_t DUKE_URINATE        = DUKE_URINATE__STATIC;
235
int32_t DUKE_USEMEDKIT      = DUKE_USEMEDKIT__STATIC;
236
int32_t DUKE_WALKINDUCTS    = DUKE_WALKINDUCTS__STATIC;
237
int32_t DUKETALKTOBOSS      = DUKETALKTOBOSS__STATIC;
238
int32_t EARTHQUAKE          = EARTHQUAKE__STATIC;
239
int32_t EJECT_CLIP          = EJECT_CLIP__STATIC;
240
int32_t ELEVATOR_OFF        = ELEVATOR_OFF__STATIC;
241
int32_t ELEVATOR_ON         = ELEVATOR_ON__STATIC;
242
int32_t END_OF_LEVEL_WARN   = END_OF_LEVEL_WARN__STATIC;
243
int32_t ENDSEQVOL2SND1      = ENDSEQVOL2SND1__STATIC;
244
int32_t ENDSEQVOL2SND2      = ENDSEQVOL2SND2__STATIC;
245
int32_t ENDSEQVOL2SND3      = ENDSEQVOL2SND3__STATIC;
246
int32_t ENDSEQVOL2SND4      = ENDSEQVOL2SND4__STATIC;
247
int32_t ENDSEQVOL2SND5      = ENDSEQVOL2SND5__STATIC;
248
int32_t ENDSEQVOL2SND6      = ENDSEQVOL2SND6__STATIC;
249
int32_t ENDSEQVOL2SND7      = ENDSEQVOL2SND7__STATIC;
250
int32_t ENDSEQVOL3SND2      = ENDSEQVOL3SND2__STATIC;
251
int32_t ENDSEQVOL3SND3      = ENDSEQVOL3SND3__STATIC;
252
int32_t ENDSEQVOL3SND4      = ENDSEQVOL3SND4__STATIC;
253
int32_t ENDSEQVOL3SND5      = ENDSEQVOL3SND5__STATIC;
254
int32_t ENDSEQVOL3SND6      = ENDSEQVOL3SND6__STATIC;
255
int32_t ENDSEQVOL3SND7      = ENDSEQVOL3SND7__STATIC;
256
int32_t ENDSEQVOL3SND8      = ENDSEQVOL3SND8__STATIC;
257
int32_t ENDSEQVOL3SND9      = ENDSEQVOL3SND9__STATIC;
258
int32_t EXITMENUSOUND       = EXITMENUSOUND__STATIC;
259
int32_t EXPANDERSHOOT       = EXPANDERSHOOT__STATIC;
260
int32_t FLUSH_TOILET        = FLUSH_TOILET__STATIC;
261
int32_t FLY_BY              = FLY_BY__STATIC;
262
int32_t GENERIC_AMBIENCE17  = GENERIC_AMBIENCE17__STATIC;
263
int32_t GLASS_BREAKING      = GLASS_BREAKING__STATIC;
264
int32_t GLASS_HEAVYBREAK    = GLASS_HEAVYBREAK__STATIC;
265
int32_t INSERT_CLIP         = INSERT_CLIP__STATIC;
266
int32_t INTRO4_1            = INTRO4_1__STATIC;
267
int32_t INTRO4_2            = INTRO4_2__STATIC;
268
int32_t INTRO4_3            = INTRO4_3__STATIC;
269
int32_t INTRO4_4            = INTRO4_4__STATIC;
270
int32_t INTRO4_5            = INTRO4_5__STATIC;
271
int32_t INTRO4_6            = INTRO4_6__STATIC;
272
int32_t INTRO4_B            = INTRO4_B__STATIC;
273
int32_t ITEM_SPLASH         = ITEM_SPLASH__STATIC;
274
int32_t JIBBED_ACTOR5       = JIBBED_ACTOR5__STATIC;
275
int32_t JIBBED_ACTOR6       = JIBBED_ACTOR6__STATIC;
276
int32_t KICK_HIT            = KICK_HIT__STATIC;
277
int32_t LASERTRIP_ARMING    = LASERTRIP_ARMING__STATIC;
278
int32_t LASERTRIP_EXPLODE   = LASERTRIP_EXPLODE__STATIC;
279
int32_t LASERTRIP_ONWALL    = LASERTRIP_ONWALL__STATIC;
280
int32_t LIGHTNING_SLAP      = LIGHTNING_SLAP__STATIC;
281
int32_t MONITOR_ACTIVE      = MONITOR_ACTIVE__STATIC;
282
int32_t NITEVISION_ONOFF    = NITEVISION_ONOFF__STATIC;
283
int32_t OCTA_RECOG          = OCTA_RECOG__STATIC;
284
int32_t PIG_RECOG           = PIG_RECOG__STATIC;
285
int32_t PIPEBOMB_BOUNCE     = PIPEBOMB_BOUNCE__STATIC;
286
int32_t PIPEBOMB_EXPLODE    = PIPEBOMB_EXPLODE__STATIC;
287
int32_t PISTOL_BODYHIT      = PISTOL_BODYHIT__STATIC;
288
int32_t PISTOL_FIRE         = PISTOL_FIRE__STATIC;
289
int32_t PISTOL_RICOCHET     = PISTOL_RICOCHET__STATIC;
290
int32_t POOLBALLHIT         = POOLBALLHIT__STATIC;
291
int32_t PRED_RECOG          = PRED_RECOG__STATIC;
292
int32_t RATTY               = RATTY__STATIC;
293
int32_t RECO_ATTACK         = RECO_ATTACK__STATIC;
294
int32_t RECO_PAIN           = RECO_PAIN__STATIC;
295
int32_t RECO_RECOG          = RECO_RECOG__STATIC;
296
int32_t RECO_ROAM           = RECO_ROAM__STATIC;
297
int32_t RIPHEADNECK         = RIPHEADNECK__STATIC;
298
int32_t RPG_EXPLODE         = RPG_EXPLODE__STATIC;
299
int32_t RPG_SHOOT           = RPG_SHOOT__STATIC;
300
int32_t SELECT_WEAPON       = SELECT_WEAPON__STATIC;
301
int32_t SHORT_CIRCUIT       = SHORT_CIRCUIT__STATIC;
302
int32_t SHOTGUN_COCK        = SHOTGUN_COCK__STATIC;
303
int32_t SHOTGUN_FIRE        = SHOTGUN_FIRE__STATIC;
304
int32_t SHRINKER_FIRE       = SHRINKER_FIRE__STATIC;
305
int32_t SHRINKER_HIT        = SHRINKER_HIT__STATIC;
306
int32_t SLIM_ATTACK         = SLIM_ATTACK__STATIC;
307
int32_t SLIM_DYING          = SLIM_DYING__STATIC;
308
int32_t SLIM_RECOG          = SLIM_RECOG__STATIC;
309
int32_t SLIM_ROAM           = SLIM_ROAM__STATIC;
310
int32_t SOMETHING_DRIPPING  = SOMETHING_DRIPPING__STATIC;
311
int32_t SOMETHINGFROZE      = SOMETHINGFROZE__STATIC;
312
int32_t SOMETHINGHITFORCE   = SOMETHINGHITFORCE__STATIC;
313
int32_t SQUISHED            = SQUISHED__STATIC;
314
int32_t SUBWAY              = SUBWAY__STATIC;
315
int32_t SWITCH_ON           = SWITCH_ON__STATIC;
316
int32_t TELEPORTER          = TELEPORTER__STATIC;
317
int32_t THUD                = THUD__STATIC;
318
int32_t THUNDER             = THUNDER__STATIC;
319
int32_t TURR_RECOG          = TURR_RECOG__STATIC;
320
int32_t VENT_BUST           = VENT_BUST__STATIC;
321
int32_t VOL4ENDSND1         = VOL4ENDSND1__STATIC;
322
int32_t VOL4ENDSND2         = VOL4ENDSND2__STATIC;
323
int32_t WAR_AMBIENCE2       = WAR_AMBIENCE2__STATIC;
324
int32_t WHIPYOURASS         = WHIPYOURASS__STATIC;
325
int32_t WIERDSHOT_FLY       = WIERDSHOT_FLY__STATIC;
326
int32_t WIND_AMBIENCE       = WIND_AMBIENCE__STATIC;
327
int32_t WIND_REPEAT         = WIND_REPEAT__STATIC;
3834 hendricks2 328
 
329
#if !defined LUNATIC
330
static hashtable_t h_names = {512, NULL};
331
 
332
void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue)
333
{
334
    if ((unsigned)lValue >= MAXSOUNDS || !szLabel)
335
        return;
336
 
7187 terminx 337
    int const i = hash_find(&h_names,szLabel);
338
 
3834 hendricks2 339
    if (i>=0)
340
    {
341
        struct dynitem *di = &g_dynSoundList[i];
342
#ifdef DEBUGGINGAIDS
4630 terminx 343
        if (g_scriptDebug && di->staticval != lValue)
3834 hendricks2 344
            OSD_Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
345
#endif
346
        *di->dynvalptr = lValue;
347
    }
348
}
349
 
350
void initsoundhashnames(void)
351
{
352
    hash_init(&h_names);
353
 
7187 terminx 354
    for (int i=0; i < ARRAY_SSIZE(g_dynSoundList); i++)
3834 hendricks2 355
        hash_add(&h_names, g_dynSoundList[i].str, i, 0);
356
}
357
 
358
void freesoundhashnames(void)
359
{
360
    hash_free(&h_names);
361
}
362
#endif
363
#endif
364
 
365
// This is run after all CON define's have been processed to set up the
366
// dynamic->static sound mapping.
367
void G_InitDynamicSounds(void)
368
{
369
    Bmemset(DynamicSoundMap, 0, sizeof(DynamicSoundMap));
370
 
7187 terminx 371
    for (auto & i : g_dynSoundList)
3834 hendricks2 372
#ifdef DYNSOUNDREMAP_ENABLE
7187 terminx 373
        DynamicSoundMap[*(i.dynvalptr)] = i.staticval;
3834 hendricks2 374
#else
7187 terminx 375
        DynamicSoundMap[i.staticval] = i.staticval;
3834 hendricks2 376
#endif
377
 
378
}