hedgewars/uMisc.pas
changeset 2648 415a75d45693
parent 2647 0e1208e92dfe
child 2664 949c189ba568
equal deleted inserted replaced
2647:0e1208e92dfe 2648:415a75d45693
   172 function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
   172 function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
   173 {$IFNDEF IPHONEOS}
   173 {$IFNDEF IPHONEOS}
   174 procedure MakeScreenshot(s: shortstring);
   174 procedure MakeScreenshot(s: shortstring);
   175 {$ENDIF}
   175 {$ENDIF}
   176 
   176 
   177 function ToggleLongInt(t: Boolean; a, b: LongInt): LongInt;
       
   178 function ToggleString(t: Boolean; a, b: string): string;
       
   179 
       
   180 function modifyDamage(dmg: Longword): Longword;
   177 function modifyDamage(dmg: Longword): Longword;
   181 
   178 
   182 var CursorPoint: TPoint;
   179 var CursorPoint: TPoint;
   183     TargetPoint: TPoint = (X: NoPointX; Y: 0);
   180     TargetPoint: TPoint = (X: NoPointX; Y: 0);
   184 
   181 
   561 	end
   558 	end
   562 	else doSurfaceConversion:= tmpsurf;
   559 	else doSurfaceConversion:= tmpsurf;
   563 end;
   560 end;
   564 
   561 
   565 
   562 
   566 {$inline on}
       
   567 function ToggleLongInt(t: Boolean; a, b: LongInt): LongInt;
       
   568 begin
       
   569     if t then
       
   570 	    ToggleLongInt:= a
       
   571     else
       
   572         ToggleLongInt:= b;
       
   573 end;
       
   574 
       
   575 function ToggleString(t: Boolean; a, b: string): string;
       
   576 begin
       
   577     if t then
       
   578 	    ToggleString:= a
       
   579     else
       
   580         ToggleString:= b;
       
   581 end;
       
   582 {$inline off}
       
   583 
       
   584 initialization
   563 initialization
   585 cDrownSpeed.QWordValue:= 257698038;// 0.06
   564 cDrownSpeed.QWordValue:= 257698038;// 0.06
   586 cMaxWindSpeed.QWordValue:= 2147484;// 0.0005
   565 cMaxWindSpeed.QWordValue:= 2147484;// 0.0005
   587 cWindSpeed.QWordValue:= 429496;// 0.0001
   566 cWindSpeed.QWordValue:= 429496;// 0.0001
   588 cGravity:= cMaxWindSpeed;
   567 cGravity:= cMaxWindSpeed;