MCPcopy Create free account
hub / github.com/diasurgical/devilution / priv_sound_init

Function priv_sound_init

Source/effects.cpp:1198–1229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1196}
1197
1198void priv_sound_init(BYTE bLoadMask)
1199{
1200 BYTE pc;
1201 DWORD i;
1202
1203 if (!gbSndInited) {
1204 return;
1205 }
1206
1207 pc = bLoadMask & (SFX_ROGUE | SFX_WARRIOR | SFX_SORCEROR);
1208 bLoadMask ^= pc;
1209
1210 for (i = 0; i < sizeof(sgSFX) / sizeof(TSFX); i++) {
1211 if (sgSFX[i].pSnd) {
1212 continue;
1213 }
1214
1215 if (sgSFX[i].bFlags & SFX_STREAM) {
1216 continue;
1217 }
1218
1219 if (bLoadMask && !(sgSFX[i].bFlags & bLoadMask)) {
1220 continue;
1221 }
1222
1223 if (sgSFX[i].bFlags & (SFX_ROGUE | SFX_WARRIOR | SFX_SORCEROR) && !(sgSFX[i].bFlags & pc)) {
1224 continue;
1225 }
1226
1227 sgSFX[i].pSnd = sound_file_load(sgSFX[i].pszName);
1228 }
1229}
1230
1231void sound_init()
1232{

Callers 2

stream_updateFunction · 0.85
sound_initFunction · 0.85

Calls 1

sound_file_loadFunction · 0.85

Tested by

no test coverage detected