hedgewars/uSound.pas
changeset 14041 44f20c9e6861
parent 14037 bf8b7c166b3c
child 14042 006f97a6f6a7
equal deleted inserted replaced
14040:128fbd36eee4 14041:44f20c9e6861
   325             (FileName:                 'Fire.ogg'; Path: ptVoices; AltPath: ptNone),// sndFire
   325             (FileName:                 'Fire.ogg'; Path: ptVoices; AltPath: ptNone),// sndFire
   326             (FileName:            'Watchthis.ogg'; Path: ptVoices; AltPath: ptNone),// sndWatchThis
   326             (FileName:            'Watchthis.ogg'; Path: ptVoices; AltPath: ptNone),// sndWatchThis
   327             (FileName:              'Runaway.ogg'; Path: ptVoices; AltPath: ptNone),// sndRunAway
   327             (FileName:              'Runaway.ogg'; Path: ptVoices; AltPath: ptNone),// sndRunAway
   328             (FileName:              'Revenge.ogg'; Path: ptVoices; AltPath: ptNone),// sndRevenge
   328             (FileName:              'Revenge.ogg'; Path: ptVoices; AltPath: ptNone),// sndRevenge
   329             (FileName:             'Cutitout.ogg'; Path: ptVoices; AltPath: ptNone),// sndCutItOut
   329             (FileName:             'Cutitout.ogg'; Path: ptVoices; AltPath: ptNone),// sndCutItOut
   330             (FileName:         'Leavemealone.ogg'; Path: ptVoices; AltPath: ptNone) // sndLeaveMeAlone
   330             (FileName:         'Leavemealone.ogg'; Path: ptVoices; AltPath: ptNone),// sndLeaveMeAlone
       
   331             (FileName:                 'Ouch.ogg'; Path: ptVoices; AltPath: ptNone) // sndOuch
   331             );
   332             );
   332 
   333 
   333 
   334 
   334 function  AskForVoicepack(name: shortstring): Pointer;
   335 function  AskForVoicepack(name: shortstring): Pointer;
   335 var i: Longword;
   336 var i: Longword;
   474 function GetFallbackV(snd: TSound): TSound;
   475 function GetFallbackV(snd: TSound): TSound;
   475 begin
   476 begin
   476     // Fallback to sndFirePunch1 / sndOw1 / sndOoff1 if a “higher-numbered” sound is missing
   477     // Fallback to sndFirePunch1 / sndOw1 / sndOoff1 if a “higher-numbered” sound is missing
   477     if (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then
   478     if (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then
   478         GetFallbackV := sndFirePunch1
   479         GetFallbackV := sndFirePunch1
   479     else if (snd in [sndOw2, sndOw3, sndOw4]) then
   480     else if (snd in [sndOw2, sndOw3, sndOw4, sndOuch]) then
   480         GetFallbackV := sndOw1
   481         GetFallbackV := sndOw1
   481     else if (snd in [sndOoff2, sndOoff3]) then
   482     else if (snd in [sndOoff2, sndOoff3]) then
   482         GetFallbackV := sndOoff1
   483         GetFallbackV := sndOoff1
   483     // Other fallback sounds
   484     // Other fallback sounds
   484     else if (snd = sndGrenade) then
   485     else if (snd = sndGrenade) then