hedgewars/uSound.pas
changeset 14014 f09276eb0c27
parent 14011 3c40754f6cfe
child 14015 544b32038664
equal deleted inserted replaced
14013:caf7a86214bd 14014:f09276eb0c27
   304             (FileName:              'landgun.ogg'; Path: ptSounds; AltPath: ptNone),// sndLandGun
   304             (FileName:              'landgun.ogg'; Path: ptSounds; AltPath: ptNone),// sndLandGun
   305             (FileName:          'graveimpact.ogg'; Path: ptSounds; AltPath: ptNone),// sndCaseImpact
   305             (FileName:          'graveimpact.ogg'; Path: ptSounds; AltPath: ptNone),// sndCaseImpact
   306             // TODO: New Extra Damage sound
   306             // TODO: New Extra Damage sound
   307             (FileName:             'hell_ugh.ogg'; Path: ptSounds; AltPath: ptNone),// sndExtraDamage
   307             (FileName:             'hell_ugh.ogg'; Path: ptSounds; AltPath: ptNone),// sndExtraDamage
   308             (FileName:        'firepunch_hit.ogg'; Path: ptSounds; AltPath: ptNone),// sndFirePunchHit
   308             (FileName:        'firepunch_hit.ogg'; Path: ptSounds; AltPath: ptNone),// sndFirePunchHit
   309             (FileName:              'Grenade.ogg'; Path: ptVoices; AltPath: ptNone) // sndGrenade
   309             (FileName:              'Grenade.ogg'; Path: ptVoices; AltPath: ptNone),// sndGrenade
       
   310             (FileName:        'Thisoneismine.ogg'; Path: ptVoices; AltPath: ptNone),// sndThisOneIsMine
       
   311             (FileName:              'Whatthe.ogg'; Path: ptVoices; AltPath: ptNone),// sndWhatThe
       
   312             (FileName:               'Solong.ogg'; Path: ptVoices; AltPath: ptNone),// sndSoLong
       
   313             (FileName:               'Ohdear.ogg'; Path: ptVoices; AltPath: ptNone),// sndOhDear
       
   314             (FileName:          'Gonnagetyou.ogg'; Path: ptVoices; AltPath: ptNone),// sndGonnaGetYou
       
   315             (FileName:                 'Drat.ogg'; Path: ptVoices; AltPath: ptNone),// sndDrat
       
   316             (FileName:               'Bugger.ogg'; Path: ptVoices; AltPath: ptNone) // sndBugger
   310             );
   317             );
   311 
   318 
   312 
   319 
   313 function  AskForVoicepack(name: shortstring): Pointer;
   320 function  AskForVoicepack(name: shortstring): Pointer;
   314 var i: Longword;
   321 var i: Longword;
   510                     snd := sndFirePunch1
   517                     snd := sndFirePunch1
   511                 else if (snd in [sndOw2, sndOw3, sndOw4]) then
   518                 else if (snd in [sndOw2, sndOw3, sndOw4]) then
   512                     snd := sndOw1
   519                     snd := sndOw1
   513                 else if (snd in [sndOoff2, sndOoff3]) then
   520                 else if (snd in [sndOoff2, sndOoff3]) then
   514                     snd := sndOoff1
   521                     snd := sndOoff1
       
   522                 // Other fallback sounds
   515                 else if (snd = sndGrenade) then
   523                 else if (snd = sndGrenade) then
   516                     if random(2) = 0 then
   524                     if random(2) = 0 then
   517                         snd := sndNooo
   525                         snd := sndNooo
   518                     else
   526                     else
   519                         snd := sndUhOh;
   527                         snd := sndUhOh
       
   528                 else if (snd in [sndDrat, sndBugger]) then
       
   529                     snd := sndStupid
       
   530                 else if (snd = sndGonnaGetYou) then
       
   531                     snd := sndRegret
       
   532                 else if (snd in [sndOhDear, sndSoLong]) then
       
   533                     snd := sndByeBye
       
   534                 else if (snd = sndWhatThe) then
       
   535                     snd := sndNooo
       
   536                 else if (snd = sndThisOneIsMine) then
       
   537                     snd := sndReinforce;
       
   538 
   520                 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
   539                 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
   521                 end;
   540                 end;
   522             WriteToConsole(msgLoading + s + ' ');
   541             WriteToConsole(msgLoading + s + ' ');
   523             rwops := rwopsOpenRead(s);
   542             rwops := rwopsOpenRead(s);
   524 
   543