Skip to content

Commit 4f78dee

Browse files
committed
fix sound effects filename case, fpc 0.3.1
1 parent 125d5e3 commit 4f78dee

File tree

5 files changed

+16
-19
lines changed

5 files changed

+16
-19
lines changed

Documents/changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
v 0.3.1
2+
- fix sound effects filename case
13
v 0.3.0
24
- 32-bit compilation fixes (now works on i386 too)
35
- document location of manual in manpage

c_utils.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ void play_sound(const fpc_pchar_t filename, const fpc_word_t rate)
10031003
int8_t *sound_raw, chan;
10041004
float k;
10051005
int16_t *sound, smp;
1006-
char *fn, *s, *s1;
1006+
char *fn, *s1;
10071007

10081008
if (!audio_open)
10091009
return;
@@ -1012,11 +1012,6 @@ void play_sound(const fpc_pchar_t filename, const fpc_word_t rate)
10121012
assert(fn != NULL);
10131013
s1 = strdup(filename);
10141014
assert(s1 != NULL);
1015-
s = s1;
1016-
while (*s) {
1017-
*s = (char) toupper(*s); // toupper(3) works with int, but only defined on char
1018-
s++;
1019-
}
10201015
strcpy(fn, s1);
10211016
f = fopen(fn, "rb");
10221017
if (f == NULL) {

combat.pas

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ procedure firingweapon(n: integer);
227227
begin
228228
c:=ship.gunnodes[n]; // c = our current weapon index
229229
case weapons[c].dmgtypes[DMGTYP_ENERGY] of
230-
0..23: if weapons[c].dmgtypes[DMGTYP_PARTICLE]>weapons[c].dmgtypes[DMGTYP_INERTIAL] then soundeffect(loc_sound()+'gun4.sam',7000)
231-
else soundeffect(loc_sound()+'gun1.sam',7000);
232-
24..34: soundeffect(loc_sound()+'laser1.sam',7000);
233-
35..45: soundeffect(loc_sound()+'laser2.sam',7000);
234-
46..56: soundeffect(loc_sound()+'laser3.sam',7000);
235-
57..67: soundeffect(loc_sound()+'laser4.sam',7000);
236-
68..78: soundeffect(loc_sound()+'laser5.sam',7000);
237-
79..89: soundeffect(loc_sound()+'laser6.sam',7000);
238-
90..100: soundeffect(loc_sound()+'laser7.sam',7000);
230+
0..23: if weapons[c].dmgtypes[DMGTYP_PARTICLE]>weapons[c].dmgtypes[DMGTYP_INERTIAL] then soundeffect(loc_sound()+'GUN4.SAM',7000)
231+
else soundeffect(loc_sound()+'GUN1.SAM',7000);
232+
24..34: soundeffect(loc_sound()+'LASER1.SAM',7000);
233+
35..45: soundeffect(loc_sound()+'LASER2.SAM',7000);
234+
46..56: soundeffect(loc_sound()+'LASER3.SAM',7000);
235+
57..67: soundeffect(loc_sound()+'LASER4.SAM',7000);
236+
68..78: soundeffect(loc_sound()+'LASER5.SAM',7000);
237+
79..89: soundeffect(loc_sound()+'LASER6.SAM',7000);
238+
90..100: soundeffect(loc_sound()+'LASER7.SAM',7000);
239239
end;
240240
delay(tslice);
241241
{if (skillcheck(4)) or ((scanning) and (random(100)<20)) then}
@@ -610,7 +610,7 @@ procedure takedamage(n,d: integer);
610610
begin
611611
//writeln (' takedamage(type=',n,', damage=', d, ')');
612612
if dead then exit;
613-
soundeffect(loc_sound()+'explode'+chr(49+random(2))+'.sam',9000);
613+
soundeffect(loc_sound()+'EXPLODE'+chr(49+random(2))+'.SAM',9000);
614614
delay(tslice div 2);
615615
if d<1 then d:=1;
616616
case n of

version.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ implementation
3535
begin
3636
versionstring :=
3737
{12345678901234567890}
38-
'v1.30.0001 fpc 0.3.0';
38+
'v1.30.0001 fpc 0.3.1';
3939
end.

weird.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,11 @@ procedure easteregg6;
840840
fading;
841841
mousehide;
842842
loadscreen(loc_data()+'intro3',@screen);
843-
soundeffect(loc_sound()+'explode3.sam',9500);
843+
soundeffect(loc_sound()+'EXPLODE3.SAM',9500);
844844
fadein;
845845
mouseshow;
846846
repeat
847-
if mouse.getstatus then soundeffect(loc_sound()+'explode3.sam',9500);
847+
if mouse.getstatus then soundeffect(loc_sound()+'EXPLODE3.SAM',9500);
848848
until fastkeypressed;
849849
stopmod;
850850
fading;

0 commit comments

Comments
 (0)