hedgewars/uMisc.pas
changeset 2697 75880595a9f1
parent 2693 3207e0eacd43
child 2698 90585aba87ad
equal deleted inserted replaced
2696:41aa7b56c17b 2697:75880595a9f1
    31 {$IFDEF IPHONEOS}
    31 {$IFDEF IPHONEOS}
    32 	, PascalExports
    32 	, PascalExports
    33 {$ENDIF}
    33 {$ENDIF}
    34 	;
    34 	;
    35 
    35 
       
    36 type HwColor4f = record
       
    37 	r, g, b, a: byte
       
    38 	end;
       
    39 
    36 var
    40 var
    37 	isCursorVisible : boolean = false;
    41 	isCursorVisible : boolean = false;
    38 	isTerminated    : boolean = false;
    42 	isTerminated    : boolean = false;
    39 	isInLag         : boolean = false;
    43 	isInLag         : boolean = false;
    40 	isPaused        : boolean = false;
    44 	isPaused        : boolean = false;
    62 	cCloudsNumber    : LongInt = 9;
    66 	cCloudsNumber    : LongInt = 9;
    63 	cScreenWidth     : LongInt = 1024;
    67 	cScreenWidth     : LongInt = 1024;
    64 	cScreenHeight    : LongInt = 768;
    68 	cScreenHeight    : LongInt = 768;
    65 	cInitWidth       : LongInt = 1024;
    69 	cInitWidth       : LongInt = 1024;
    66 	cInitHeight      : LongInt = 768;
    70 	cInitHeight      : LongInt = 768;
    67 	cVSyncInUse	 : boolean = true;	
    71 	cVSyncInUse		 : boolean = true;	
    68 	cBits            : LongInt = 32;
    72 	cBits            : LongInt = 32;
    69 	cBitsStr         : string[2] = '32';
    73 	cBitsStr         : string[2] = '32';
    70 	cTagsMaskIndex   : byte = Low(cTagsMasks);
    74 	cTagsMaskIndex   : byte = Low(cTagsMasks);
    71 	zoom             : GLfloat = 2.0;
    75 	zoom             : GLfloat = 2.0;
    72 	ZoomValue        : GLfloat = 2.0;
    76 	ZoomValue        : GLfloat = 2.0;
   136 	RealTicks: Longword = 0;
   140 	RealTicks: Longword = 0;
   137 
   141 
   138 	AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP
   142 	AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP
   139 
   143 
   140 	i: LongInt;
   144 	i: LongInt;
   141 
   145 	
   142 type HwColor4f = record
   146 	cWaterOpacity: byte = $80;
   143 	r, g, b, a: byte
   147 	WaterColorArray: array[0..3] of HwColor4f;
   144 	end;
   148 
   145 
   149 	CursorPoint: TPoint;
   146 var cWaterOpacity: byte = $80;
   150     TargetPoint: TPoint = (X: NoPointX; Y: 0);
   147 
       
   148 var WaterColorArray: array[0..3] of HwColor4f;
       
   149 
   151 
   150 procedure movecursor(dx, dy: Integer);
   152 procedure movecursor(dx, dy: Integer);
   151 function hwSign(r: hwFloat): LongInt;
   153 function hwSign(r: hwFloat): LongInt;
   152 function Min(a, b: LongInt): LongInt;
   154 function Min(a, b: LongInt): LongInt;
   153 function Max(a, b: LongInt): LongInt;
   155 function Max(a, b: LongInt): LongInt;
   177 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
   179 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
   178 function  endian(independent: LongWord): LongWord;
   180 function  endian(independent: LongWord): LongWord;
   179 {$IFNDEF IPHONEOS}
   181 {$IFNDEF IPHONEOS}
   180 procedure MakeScreenshot(s: shortstring);
   182 procedure MakeScreenshot(s: shortstring);
   181 {$ENDIF}
   183 {$ENDIF}
   182 
       
   183 function modifyDamage(dmg: Longword): Longword;
   184 function modifyDamage(dmg: Longword): Longword;
   184 
   185 
   185 var CursorPoint: TPoint;
       
   186     TargetPoint: TPoint = (X: NoPointX; Y: 0);
       
   187 
   186 
   188 implementation
   187 implementation
   189 uses uConsole, uStore, uIO, Math, uRandom, uSound;
   188 uses uConsole, uStore, uIO, Math, uRandom, uSound;
   190 var KBnum: Longword = 0;
   189 var KBnum: Longword = 0;
   191 {$IFDEF DEBUGFILE}
   190 {$IFDEF DEBUGFILE}