fix a binding that was preveting to display anything else besides hogs on iphone
authorkoda
Fri, 10 Jul 2009 19:10:29 +0000
changeset 2251 bf0b59d3536a
parent 2250 70f344c911ea
child 2252 03fd99dff989
fix a binding that was preveting to display anything else besides hogs on iphone
hedgewars/CMakeLists.txt
hedgewars/SDLh.pas
hedgewars/uConsts.pas
hedgewars/uLand.pas
--- a/hedgewars/CMakeLists.txt	Fri Jul 10 16:56:37 2009 +0000
+++ b/hedgewars/CMakeLists.txt	Fri Jul 10 19:10:29 2009 +0000
@@ -93,6 +93,9 @@
 		else()
 			set(pascal_compiler_flags ${noexecstack_flags} "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi" "-O-" "-gl" "-dDEBUGFILE" ${hwengine_project})
 		endif()
+		if(LOWRES)
+			set(pascal_compiler_flags "-dLOWRES" ${pascal_compiler_flags} ${hwengine_project})
+		endif(LOWRES)
 	endif (fpc_ver LESS "020200")
 endif (fpc_version)
 
--- a/hedgewars/SDLh.pas	Fri Jul 10 16:56:37 2009 +0000
+++ b/hedgewars/SDLh.pas	Fri Jul 10 19:10:29 2009 +0000
@@ -110,8 +110,12 @@
 
 type PSDL_Rect = ^TSDL_Rect;
      TSDL_Rect = record
+		    {$IFDEF SDL13}
+                 x, y, w, h: LongInt;
+		    {$ELSE}
                  x, y: SmallInt;
                  w, h: Word;
+            {$ENDIF}
                  end;
 
      TPoint = record
--- a/hedgewars/uConsts.pas	Fri Jul 10 16:56:37 2009 +0000
+++ b/hedgewars/uConsts.pas	Fri Jul 10 19:10:29 2009 +0000
@@ -177,7 +177,13 @@
       1024 -> $FFFFFC00
        512 -> $FFFFFE00  *}
 
-{$IFDEF IPHONEOS or LOWRES}
+{$IFDEF IPHONEOS}
+    LAND_WIDTH  = 2048;
+    LAND_HEIGHT = 1024;
+    LAND_WIDTH_MASK  = $FFFFF800;
+    LAND_HEIGHT_MASK = $FFFFFC00;
+{$ELSE}
+{$IFDEF LOWRES}
     LAND_WIDTH  = 2048;
     LAND_HEIGHT = 1024;
     LAND_WIDTH_MASK  = $FFFFF800;
@@ -188,6 +194,7 @@
     LAND_WIDTH_MASK  = $FFFFF000;
     LAND_HEIGHT_MASK = $FFFFF800;
 {$ENDIF}
+{$ENDIF}
 
     COLOR_LAND           = $FFFF;  // white
     COLOR_INDESTRUCTIBLE = $88FF;  // red
--- a/hedgewars/uLand.pas	Fri Jul 10 16:56:37 2009 +0000
+++ b/hedgewars/uLand.pas	Fri Jul 10 19:10:29 2009 +0000
@@ -320,12 +320,7 @@
 	r.x:= 0;
 	while r.x < LAND_WIDTH do
 		begin
-		{$IFDEF IPHONEOS}
-		//does not draw border with SDL_UpperBlit function, so we will use our own copy
-		copyToXY(tmpsurf, Surface, r.x, r.y);
-		{$ELSE}
 		SDL_UpperBlit(tmpsurf, nil, Surface, @r);
-		{$ENDIF}
 		inc(r.x, tmpsurf^.w)
 		end;
 	inc(r.y, tmpsurf^.h)