Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | /* |
2 | * Portions of this file are copyright Rebirth contributors and licensed as |
||
3 | * described in COPYING.txt. |
||
4 | * Portions of this file are copyright Parallax Software and licensed |
||
5 | * according to the Parallax license below. |
||
6 | * See COPYING.txt for license details. |
||
7 | |||
8 | THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX |
||
9 | SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO |
||
10 | END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A |
||
11 | ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS |
||
12 | IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS |
||
13 | SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE |
||
14 | FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE |
||
15 | CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS |
||
16 | AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. |
||
17 | COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. |
||
18 | */ |
||
19 | |||
20 | /* |
||
21 | * |
||
22 | * Numbering system for the sounds. |
||
23 | * |
||
24 | */ |
||
25 | |||
26 | |||
27 | #ifndef _SOUNDS_H |
||
28 | #define _SOUNDS_H |
||
29 | |||
30 | #include "digi.h" |
||
31 | |||
32 | #ifdef dsx |
||
33 | #if defined(DXX_BUILD_DESCENT_I) |
||
34 | #define SOUND_GOOD_SELECTION_PRIMARY (PCSharePig ? SOUND_ALREADY_SELECTED : SOUND_GOOD_SELECTION_PRIMARY_FULL_DATA) |
||
35 | #define SOUND_GOOD_SELECTION_SECONDARY (PCSharePig ? SOUND_ALREADY_SELECTED : SOUND_GOOD_SELECTION_SECONDARY_FULL_DATA) // Adam: New sound number here! MK, 01/30/95 |
||
36 | #define SOUND_CHEATER (PCSharePig ? SOUND_BAD_SELECTION : SOUND_CHEATER_FULL_DATA) // moved by Victor Rachels |
||
37 | #elif defined(DXX_BUILD_DESCENT_II) |
||
38 | #define SOUND_GOOD_SELECTION_PRIMARY SOUND_GOOD_SELECTION_PRIMARY_FULL_DATA |
||
39 | #define SOUND_GOOD_SELECTION_SECONDARY SOUND_GOOD_SELECTION_SECONDARY_FULL_DATA |
||
40 | #define SOUND_CHEATER SOUND_CHEATER_FULL_DATA |
||
41 | #endif |
||
42 | //------------------- List of sound effects -------------------- |
||
43 | namespace dcx { |
||
44 | |||
45 | /* The games do not use exactly the same sounds, but every sound can |
||
46 | * be classified as: |
||
47 | * - Used in both games, with the same value |
||
48 | * - Used only in Descent 1 |
||
49 | * - Used only in Descent 2 |
||
50 | * Therefore, this can be in dcx without causing ambiguity. Sounds |
||
51 | * used only for one game are unnecessarily defined in the other, |
||
52 | * and then ignored. |
||
53 | * |
||
54 | * The values of sound_effect are used to index Sounds. A uint8_t |
||
55 | * would be sufficient to hold all values, but unsigned is used |
||
56 | * since a uint8_t would need to be zero-extended before it could be |
||
57 | * used in an array lookup. |
||
58 | */ |
||
59 | enum sound_effect : unsigned |
||
60 | { |
||
61 | SOUND_LASER_FIRED = 10, |
||
62 | SOUND_BADASS_EXPLOSION = 11, // need something different for this if possible |
||
63 | SOUND_WEAPON_HIT_BLASTABLE = 11, |
||
64 | SOUND_ROBOT_HIT_PLAYER = 17, |
||
65 | SOUND_ROBOT_HIT = 20, |
||
66 | SOUND_VOLATILE_WALL_HIT = 21, |
||
67 | SOUND_DROP_BOMB = 26, |
||
68 | SOUND_WEAPON_HIT_DOOR = 27, |
||
69 | SOUND_CONTROL_CENTER_HIT = 30, |
||
70 | SOUND_LASER_HIT_CLUTTER = 30, |
||
71 | SOUND_CONTROL_CENTER_DESTROYED = 31, |
||
72 | SOUND_EXPLODING_WALL = 31, // one long sound |
||
73 | SOUND_CONTROL_CENTER_WARNING_SIREN = 32, |
||
74 | SOUND_MINE_BLEW_UP = 33, |
||
75 | SOUND_FUSION_WARMUP = 34, |
||
76 | SOUND_REFUEL_STATION_GIVING_FUEL = 62, |
||
77 | SOUND_PLAYER_HIT_WALL = 70, |
||
78 | SOUND_PLAYER_GOT_HIT = 71, |
||
79 | SOUND_HOSTAGE_RESCUED = 91, |
||
80 | SOUND_COUNTDOWN_0_SECS = 100, // countdown 100..114 |
||
81 | SOUND_COUNTDOWN_13_SECS = 113, |
||
82 | SOUND_COUNTDOWN_29_SECS = 114, |
||
83 | SOUND_HUD_MESSAGE = 117, |
||
84 | SOUND_HUD_KILL = 118, |
||
85 | SOUND_HOMING_WARNING = 122, // Warning beep: You are being tracked by a missile! Borrowed from old repair center sounds. |
||
86 | SOUND_VOLATILE_WALL_HISS = 151, // need a hiss sound here. |
||
87 | SOUND_GOOD_SELECTION_PRIMARY_FULL_DATA = 153, |
||
88 | SOUND_GOOD_SELECTION_SECONDARY_FULL_DATA = 154, // Adam: New sound number here! MK, 01/30/95 |
||
89 | SOUND_ALREADY_SELECTED = 155, // Adam: New sound number here! MK, 01/30/95 |
||
90 | SOUND_BAD_SELECTION = 156, |
||
91 | SOUND_CLOAK_OFF = 161, // sound when cloak goes away |
||
92 | SOUND_INVULNERABILITY_OFF = 163, // sound when invulnerability goes away |
||
93 | ROBOT_SEE_SOUND_DEFAULT = 170, |
||
94 | ROBOT_ATTACK_SOUND_DEFAULT = 171, |
||
95 | SOUND_BOSS_SHARE_SEE = 183, |
||
96 | SOUND_BOSS_SHARE_DIE = 185, |
||
97 | ROBOT_CLAW_SOUND_DEFAULT = 190, |
||
98 | SOUND_CHEATER_FULL_DATA = 200, |
||
99 | |||
100 | /* if DXX_BUILD_DESCENT_I */ |
||
101 | /* Not used even there */ |
||
102 | #if 0 |
||
103 | SOUND_BOSS_SHARE_ATTACK = 184, |
||
104 | |||
105 | SOUND_NASTY_ROBOT_HIT_1 = 190, // ding.raw ; tearing metal 1 |
||
106 | SOUND_NASTY_ROBOT_HIT_2 = 191, // ding.raw ; tearing metal 2 |
||
107 | #endif |
||
108 | /* endif */ |
||
109 | /* if DXX_BUILD_DESCENT_II */ |
||
110 | SOUND_LASER_HIT_WATER = 232, |
||
111 | SOUND_MISSILE_HIT_WATER = 233, |
||
112 | SOUND_DROP_WEAPON = 39, |
||
113 | |||
114 | SOUND_FORCEFIELD_BOUNCE_PLAYER = 40, |
||
115 | SOUND_FORCEFIELD_BOUNCE_WEAPON = 41, |
||
116 | SOUND_FORCEFIELD_HUM = 42, |
||
117 | SOUND_FORCEFIELD_OFF = 43, |
||
118 | |||
119 | SOUND_MARKER_HIT = 50, |
||
120 | SOUND_BUDDY_MET_GOAL = 51, |
||
121 | |||
122 | SOUND_BRIEFING_HUM = 94, |
||
123 | SOUND_BRIEFING_PRINTING = 95, |
||
124 | SOUND_HUD_JOIN_REQUEST = 123, |
||
125 | SOUND_HUD_BLUE_GOT_FLAG = 124, |
||
126 | SOUND_HUD_RED_GOT_FLAG = 125, |
||
127 | SOUND_HUD_YOU_GOT_FLAG = 126, |
||
128 | SOUND_HUD_BLUE_GOT_GOAL = 127, |
||
129 | SOUND_HUD_RED_GOT_GOAL = 128, |
||
130 | SOUND_HUD_YOU_GOT_GOAL = 129, |
||
131 | |||
132 | SOUND_LAVAFALL_HISS = 150, // under a lavafall |
||
133 | SOUND_SHIP_IN_WATER = 152, // sitting (or moving though) water |
||
134 | SOUND_SHIP_IN_WATERFALL = 158, // under a waterfall |
||
135 | |||
136 | SOUND_CLOAK_ON = 160, // USED FOR WALL CLOAK |
||
137 | |||
138 | SOUND_AMBIENT_LAVA = 222, |
||
139 | SOUND_AMBIENT_WATER = 223, |
||
140 | |||
141 | SOUND_CONVERT_ENERGY = 241, |
||
142 | SOUND_WEAPON_STOLEN = 244, |
||
143 | |||
144 | SOUND_LIGHT_BLOWNUP = 157, |
||
145 | |||
146 | SOUND_WALL_REMOVED = 246, // Wall removed, probably due to a wall switch. |
||
147 | SOUND_AFTERBURNER_IGNITE = 247, |
||
148 | SOUND_AFTERBURNER_PLAY = 248, |
||
149 | |||
150 | SOUND_SECRET_EXIT = 249, |
||
151 | |||
152 | SOUND_SEISMIC_DISTURBANCE_START = 251, |
||
153 | |||
154 | SOUND_YOU_GOT_ORB = 84, |
||
155 | SOUND_FRIEND_GOT_ORB = 85, |
||
156 | SOUND_OPPONENT_GOT_ORB = 86, |
||
157 | SOUND_OPPONENT_HAS_SCORED = 87, |
||
158 | /* endif */ |
||
159 | }; |
||
160 | |||
161 | } |
||
162 | #endif |
||
163 | |||
164 | #define SOUND_BIG_ENDLEVEL_EXPLOSION SOUND_EXPLODING_WALL |
||
165 | #define SOUND_TUNNEL_EXPLOSION SOUND_EXPLODING_WALL |
||
166 | |||
167 | #if defined(DXX_BUILD_DESCENT_I) |
||
168 | constexpr std::integral_constant<unsigned, 250> MAX_SOUNDS{}; |
||
169 | #elif defined(DXX_BUILD_DESCENT_II) |
||
170 | #define SOUND_WALL_CLOAK_ON SOUND_CLOAK_ON |
||
171 | #define SOUND_WALL_CLOAK_OFF SOUND_CLOAK_OFF |
||
172 | |||
173 | //-------------------------------------------------------------- |
||
174 | // bad to have sound 255! |
||
175 | constexpr std::integral_constant<unsigned, 254> MAX_SOUNDS{}; |
||
176 | #endif |
||
177 | |||
178 | // I think it would be nice to have a scrape sound... |
||
179 | //#define SOUND_PLAYER_SCRAPE_WALL 72 |
||
180 | |||
181 | #if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II) |
||
182 | #include "dxxsconf.h" |
||
183 | #include <array> |
||
184 | |||
185 | extern std::array<ubyte, MAX_SOUNDS> Sounds, AltSounds; |
||
186 | |||
187 | constexpr std::integral_constant<int, -1> sound_none{}; |
||
188 | #endif |
||
189 | |||
190 | #endif /* _SOUNDS_H */ |