| 926 | } |
| 927 | |
| 928 | void InitMonsterSND(int monst) |
| 929 | { |
| 930 | TSnd *pSnd; |
| 931 | char name[MAX_PATH]; |
| 932 | char *path; |
| 933 | int mtype, i, j; |
| 934 | |
| 935 | if (!gbSndInited) { |
| 936 | return; |
| 937 | } |
| 938 | |
| 939 | mtype = Monsters[monst].mtype; |
| 940 | for (i = 0; i < 4; i++) { |
| 941 | if (MonstSndChar[i] != 's' || monsterdata[mtype].snd_special) { |
| 942 | for (j = 0; j < 2; j++) { |
| 943 | sprintf(name, monsterdata[mtype].sndfile, MonstSndChar[i], j + 1); |
| 944 | path = (char *)DiabloAllocPtr(strlen(name) + 1); |
| 945 | strcpy(path, name); |
| 946 | pSnd = sound_file_load(path); |
| 947 | Monsters[monst].Snds[i][j] = pSnd; |
| 948 | if (!pSnd) |
| 949 | mem_free_dbg(path); |
| 950 | } |
| 951 | } |
| 952 | } |
| 953 | } |
| 954 | |
| 955 | void FreeEffects() |
| 956 | { |
no test coverage detected