hedgewars/uMisc.pas
changeset 6695 32de8965c62c
parent 6267 be5d40bb1e86
child 6700 e04da46ee43c
--- a/hedgewars/uMisc.pas	Fri Feb 17 09:33:03 2012 +0100
+++ b/hedgewars/uMisc.pas	Fri Feb 17 12:08:01 2012 +0100
@@ -27,7 +27,11 @@
 function  doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
 function  MakeScreenshot(filename: shortstring): boolean;
 function  GetTeamStatString(p: PTeam): shortstring;
-
+{$IFDEF SDL13}
+function SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect;
+{$ELSE}
+function SDL_RectMake(x, y: SmallInt; width, height: Word): TSDL_Rect;
+{$ENDIF}
 procedure initModule;
 procedure freeModule;
 
@@ -144,6 +148,19 @@
     exit(tmpsurf);
 end;
 
+{$IFDEF SDL13}
+function SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect;
+{$ELSE}
+function SDL_RectMake(x, y: SmallInt; width, height: Word): TSDL_Rect;
+{$ENDIF}
+var rect: TSDL_Rect;
+begin
+    rect.x:= x;
+    rect.y:= y;
+    rect.w:= width;
+    rect.h:= height;
+    exit(rect);
+end;
 
 function GetTeamStatString(p: PTeam): shortstring;
 var s: ansistring;