hedgewars/uMisc.pas
changeset 14808 9443dc6663ba
parent 12621 d972b31f8881
child 14889 9b292184d793
equal deleted inserted replaced
14807:b2beb784e4b5 14808:9443dc6663ba
    24 uses SDLh, uConsts, GLunit, uTypes;
    24 uses SDLh, uConsts, GLunit, uTypes;
    25 
    25 
    26 procedure initModule;
    26 procedure initModule;
    27 procedure freeModule;
    27 procedure freeModule;
    28 
    28 
    29 procedure movecursor(dx, dy: LongInt);
       
    30 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
    29 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
    31 function MakeScreenshot(filename: shortstring; k: LongInt; dump: LongWord): boolean;
    30 function MakeScreenshot(filename: shortstring; k: LongInt; dump: LongWord): boolean;
    32 function  GetTeamStatString(p: PTeam): shortstring;
    31 function  GetTeamStatString(p: PTeam): shortstring;
    33 function  SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect; inline;
    32 function  SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect; inline;
    34 
    33 
    43          width, height: LongInt;
    42          width, height: LongInt;
    44          size: QWord;
    43          size: QWord;
    45          end;
    44          end;
    46 
    45 
    47 var conversionFormat : PSDL_PixelFormat;
    46 var conversionFormat : PSDL_PixelFormat;
    48 
       
    49 procedure movecursor(dx, dy: LongInt);
       
    50 var x, y: LongInt;
       
    51 begin
       
    52 if (dx = 0) and (dy = 0) then exit;
       
    53 
       
    54 SDL_GetMouseState(@x, @y);
       
    55 Inc(x, dx);
       
    56 Inc(y, dy);
       
    57 SDL_WarpMouse(x, y);
       
    58 end;
       
    59 
    47 
    60 {$IFDEF PNG_SCREENSHOTS}
    48 {$IFDEF PNG_SCREENSHOTS}
    61 // this funtion will be executed in separate thread
    49 // this funtion will be executed in separate thread
    62 function SaveScreenshot(screenshot: pointer): LongInt; cdecl; export;
    50 function SaveScreenshot(screenshot: pointer): LongInt; cdecl; export;
    63 var i: LongInt;
    51 var i: LongInt;