Differences From Artifact [cf457c80d7]:
- File sound.c — part of check-in [d15195a921] at 2022-01-29 05:55:37 on branch trunk — Implement the Sound instruction. (There are still a few problems such as clicks at the end of some sound effects, and a few problems with the sound test menu. However, it mostly works, now.) (user: user, size: 14537) [annotate] [blame] [check-ins using]
To Artifact [c96a0bb6e3]:
- File sound.c — part of check-in [19bbb1f4aa] at 2022-05-05 20:33:06 on branch trunk — Lump name suffixes in the sound file can be case-insensitive. (user: user, size: 14703) [annotate] [blame] [check-ins using]
| ︙ | |||
189 190 191 192 193 194 195 196 197 198 199 200 201 202 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | + + + + + |
nam[i++]=j=fgetc(fp);
if(j==(Uint32)EOF) goto done;
if(!j) break;
}
i--;
j=fgetc(fp)<<16; j|=fgetc(fp)<<24; j|=fgetc(fp)<<0; j|=fgetc(fp)<<8;
l_offset=ftell(fp); l_size=j;
if(i>4 && nam[i-4]=='.') {
if(nam[i-3]>='a') nam[i-3]+='A'-'a';
if(nam[i-2]>='a') nam[i-2]+='A'-'a';
if(nam[i-1]>='a') nam[i-1]+='A'-'a';
}
if(i>4 && nam[i-4]=='.' && nam[i-3]=='W' && nam[i-1]=='V' && (nam[i-2]=='A' || nam[i-2]=='Z')) {
j=nam[i-2];
nam[i-4]=0;
if(is_user) {
if(nusersounds>255) goto done;
i=nusersounds++;
usersounds=realloc(usersounds,nusersounds*sizeof(WaveSound));
|
| ︙ |