hedgewars/uMisc.pas
changeset 6695 32de8965c62c
parent 6267 be5d40bb1e86
child 6700 e04da46ee43c
equal deleted inserted replaced
6694:48317632b3a9 6695:32de8965c62c
    25 
    25 
    26 procedure movecursor(dx, dy: LongInt);
    26 procedure movecursor(dx, dy: LongInt);
    27 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
    27 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
    28 function  MakeScreenshot(filename: shortstring): boolean;
    28 function  MakeScreenshot(filename: shortstring): boolean;
    29 function  GetTeamStatString(p: PTeam): shortstring;
    29 function  GetTeamStatString(p: PTeam): shortstring;
    30 
    30 {$IFDEF SDL13}
       
    31 function SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect;
       
    32 {$ELSE}
       
    33 function SDL_RectMake(x, y: SmallInt; width, height: Word): TSDL_Rect;
       
    34 {$ENDIF}
    31 procedure initModule;
    35 procedure initModule;
    32 procedure freeModule;
    36 procedure freeModule;
    33 
    37 
    34 implementation
    38 implementation
    35 uses typinfo, sysutils, uVariables, uUtils;
    39 uses typinfo, sysutils, uVariables, uUtils;
   142         end;
   146         end;
   143 
   147 
   144     exit(tmpsurf);
   148     exit(tmpsurf);
   145 end;
   149 end;
   146 
   150 
       
   151 {$IFDEF SDL13}
       
   152 function SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect;
       
   153 {$ELSE}
       
   154 function SDL_RectMake(x, y: SmallInt; width, height: Word): TSDL_Rect;
       
   155 {$ENDIF}
       
   156 var rect: TSDL_Rect;
       
   157 begin
       
   158     rect.x:= x;
       
   159     rect.y:= y;
       
   160     rect.w:= width;
       
   161     rect.h:= height;
       
   162     exit(rect);
       
   163 end;
   147 
   164 
   148 function GetTeamStatString(p: PTeam): shortstring;
   165 function GetTeamStatString(p: PTeam): shortstring;
   149 var s: ansistring;
   166 var s: ansistring;
   150 begin
   167 begin
   151     s:= p^.TeamName + ':' + IntToStr(p^.TeamHealth) + ':';
   168     s:= p^.TeamName + ':' + IntToStr(p^.TeamHealth) + ':';