hedgewars/uUtils.pas
changeset 14895 d4a19bf6687e
parent 14892 444ed0622348
child 14896 63357ed39886
equal deleted inserted replaced
14894:5a6da39c5f2a 14895:d4a19bf6687e
    80 
    80 
    81 function  GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
    81 function  GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
    82 function  GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
    82 function  GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
    83 
    83 
    84 function CalcWorldWrap(X, radius: LongInt): LongInt;
    84 function CalcWorldWrap(X, radius: LongInt): LongInt;
       
    85 
       
    86 procedure updateVolumeDelta(precise: boolean);
    85 
    87 
    86 function read1stLn(filePath: shortstring): shortstring;
    88 function read1stLn(filePath: shortstring): shortstring;
    87 function readValueFromINI(key, filePath: shortstring): shortstring;
    89 function readValueFromINI(key, filePath: shortstring): shortstring;
    88 
    90 
    89 {$IFNDEF PAS2C}
    91 {$IFNDEF PAS2C}
   696         end;
   698         end;
   697 
   699 
   698     sanitizeCharForLog:= r
   700     sanitizeCharForLog:= r
   699 end;
   701 end;
   700 
   702 
       
   703 // helper function for volume change controls
       
   704 procedure updateVolumeDelta(precise: boolean);
       
   705 begin
       
   706 if cVolumeUpKey and (not cVolumeDownKey) then
       
   707     if precise then
       
   708         cVolumeDelta:= 1
       
   709     else
       
   710         cVolumeDelta:= 3
       
   711 else if cVolumeDownKey and (not cVolumeUpKey) then
       
   712     if precise then
       
   713         cVolumeDelta:= -1
       
   714     else
       
   715         cVolumeDelta:= -3
       
   716 else
       
   717     cVolumeDelta:= 0;
       
   718 end;
       
   719 
   701 function read1stLn(filePath: shortstring): shortstring;
   720 function read1stLn(filePath: shortstring): shortstring;
   702 var f: pfsFile;
   721 var f: pfsFile;
   703 begin
   722 begin
   704     read1stLn:= '';
   723     read1stLn:= '';
   705     if pfsExists(filePath) then
   724     if pfsExists(filePath) then