MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / InitAmbientSoundSystem

Function InitAmbientSoundSystem

Descent3/ambient.cpp:173–188  ·  view source on GitHub ↗

Initialize the ambient sound system

Source from the content-addressed store, hash-verified

171
172// Initialize the ambient sound system
173void InitAmbientSoundSystem() {
174 atexit(FreeAmbientSoundData);
175
176 ReadAmbientData();
177
178 // Get rid of deleted patterns
179 for (int p = 0; p < Num_ambient_sound_patterns; p++) {
180
181 asp *asp = &Ambient_sound_patterns[p];
182
183 if (!asp->name[0]) {
184 Ambient_sound_patterns[p] = Ambient_sound_patterns[Num_ambient_sound_patterns - 1];
185 Num_ambient_sound_patterns--;
186 }
187 }
188}
189
190// Return the index of a named ambient sound pattern
191// Returns number, or -1 if can't find

Callers 1

InitD3Systems2Function · 0.85

Calls 1

ReadAmbientDataFunction · 0.85

Tested by

no test coverage detected