| 1196 | } |
| 1197 | |
| 1198 | void 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 | |
| 1231 | void sound_init() |
| 1232 | { |
no test coverage detected