hedgewars/uMisc.pas
changeset 2671 7e0f88013fe8
parent 2670 1b327b7515ed
child 2690 8e83c7e31720
equal deleted inserted replaced
2670:1b327b7515ed 2671:7e0f88013fe8
    32 	isCursorVisible : boolean = false;
    32 	isCursorVisible : boolean = false;
    33 	isTerminated    : boolean = false;
    33 	isTerminated    : boolean = false;
    34 	isInLag         : boolean = false;
    34 	isInLag         : boolean = false;
    35 	isPaused        : boolean = false;
    35 	isPaused        : boolean = false;
    36 	isSoundEnabled  : boolean = true;
    36 	isSoundEnabled  : boolean = true;
    37 	isSoundHardware : boolean = false;
       
    38 	isMusicEnabled  : boolean = false;
    37 	isMusicEnabled  : boolean = false;
    39 	isSEBackup      : boolean = true;
    38 	isSEBackup      : boolean = true;
    40 	isInMultiShoot  : boolean = false;
    39 	isInMultiShoot  : boolean = false;
    41 	isSpeed         : boolean = false;
    40 	isSpeed         : boolean = false;
    42 
    41 
    58 	cCloudsNumber    : LongInt = 9;
    57 	cCloudsNumber    : LongInt = 9;
    59 	cScreenWidth     : LongInt = 1024;
    58 	cScreenWidth     : LongInt = 1024;
    60 	cScreenHeight    : LongInt = 768;
    59 	cScreenHeight    : LongInt = 768;
    61 	cInitWidth       : LongInt = 1024;
    60 	cInitWidth       : LongInt = 1024;
    62 	cInitHeight      : LongInt = 768;
    61 	cInitHeight      : LongInt = 768;
       
    62 	cVSyncInUse	 : boolean = true;	
    63 	cBits            : LongInt = 32;
    63 	cBits            : LongInt = 32;
    64 	cBitsStr         : string[2] = '32';
    64 	cBitsStr         : string[2] = '32';
    65 	cTagsMaskIndex   : byte = Low(cTagsMasks);
    65 	cTagsMaskIndex   : byte = Low(cTagsMasks);
    66 	zoom             : GLfloat = 2.0;
    66 	zoom             : GLfloat = 2.0;
    67 	ZoomValue        : GLfloat = 2.0;
    67 	ZoomValue        : GLfloat = 2.0;
   109 {$WARNINGS OFF}
   109 {$WARNINGS OFF}
   110 	cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
   110 	cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
   111 	cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
   111 	cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
   112 {$WARNINGS ON}
   112 {$WARNINGS ON}
   113 
   113 
   114 var
       
   115 	cSendCursorPosTime   : LongWord = 50;
   114 	cSendCursorPosTime   : LongWord = 50;
   116 	ShowCrosshair : boolean;
   115 	ShowCrosshair : boolean;
   117 	CursorMovementX : Integer = 0;
   116 	CursorMovementX : Integer = 0;
   118 	CursorMovementY : Integer = 0;
   117 	CursorMovementY : Integer = 0;
   119 	cDrownSpeed,
   118 	cDrownSpeed,
   190 
   189 
   191 procedure movecursor(dx, dy: Integer);
   190 procedure movecursor(dx, dy: Integer);
   192 var x, y: LongInt;
   191 var x, y: LongInt;
   193 begin
   192 begin
   194 if (dx = 0) and (dy = 0) then exit;
   193 if (dx = 0) and (dy = 0) then exit;
   195 {$IFDEF SDL13}
   194 
   196 SDL_GetMouseState(0, @x, @y);
       
   197 {$ELSE}
       
   198 SDL_GetMouseState(@x, @y);
   195 SDL_GetMouseState(@x, @y);
   199 {$ENDIF}
       
   200 Inc(x, dx);
   196 Inc(x, dx);
   201 Inc(y, dy);
   197 Inc(y, dy);
   202 SDL_WarpMouse(x, y);
   198 SDL_WarpMouse(x, y);
   203 end;
   199 end;
   204 
   200