diff -r 1a8308265fdd -r 4987f6f83cdf hedgewars/uSound.pas --- a/hedgewars/uSound.pas Wed Nov 07 13:31:58 2012 +0000 +++ b/hedgewars/uSound.pas Wed Nov 07 14:41:35 2012 +0000 @@ -170,7 +170,7 @@ procedure InitSound; const channels: LongInt = {$IFDEF MOBILE}1{$ELSE}2{$ENDIF}; begin - if not isSoundEnabled then + if (not isSoundEnabled) then exit; WriteToConsole('Init sound...'); isSoundEnabled:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; @@ -268,7 +268,7 @@ if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; - if not FileExists(s) then + if (not FileExists(s)) then s:= Pathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); voicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -284,7 +284,7 @@ if (defVoicepack^.chunks[snd] = nil) and (Soundz[snd].Path <> ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; - if not FileExists(s) then + if (not FileExists(s)) then s:= Pathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -368,7 +368,7 @@ if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; - if not FileExists(s) then + if (not FileExists(s)) then s:= Pathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); voicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -384,7 +384,7 @@ if (defVoicepack^.chunks[snd] = nil) and (Soundz[snd].Path <> ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; - if not FileExists(s) then + if (not FileExists(s)) then s:= Pathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -400,7 +400,7 @@ procedure StopSound(snd: TSound); begin - if not isSoundEnabled then + if (not isSoundEnabled) then exit; if (lastChan[snd] <> -1) and (Mix_Playing(lastChan[snd]) <> 0) then @@ -412,7 +412,7 @@ procedure StopSoundChan(chn: LongInt); begin - if not isSoundEnabled then + if (not isSoundEnabled) then exit; if (chn <> -1) and (Mix_Playing(chn) <> 0) then @@ -421,7 +421,7 @@ procedure StopSoundChan(chn, fadems: LongInt); begin - if not isSoundEnabled then + if (not isSoundEnabled) then exit; if (chn <> -1) and (Mix_Playing(chn) <> 0) then @@ -435,7 +435,7 @@ exit; s:= UserPathPrefix + '/Data/Music/' + MusicFN; - if not FileExists(s) then + if (not FileExists(s)) then s:= PathPrefix + '/Music/' + MusicFN; WriteToConsole(msgLoading + s + ' '); @@ -454,7 +454,7 @@ function ChangeVolume(voldelta: LongInt): LongInt; begin ChangeVolume:= 0; - if (not isSoundEnabled) or ((voldelta = 0) and not (cInitVolume = 0)) then + if (not isSoundEnabled) or ((voldelta = 0) and (not (cInitVolume = 0))) then exit; inc(Volume, voldelta);