fix iphone build
authorkoda
Thu, 05 Nov 2009 20:40:31 +0000
changeset 2601 21ed7cec1fa2
parent 2600 7b21daf84933
child 2602 3deb9ff104da
fix iphone build
hedgewars/CMakeLists.txt
hedgewars/SDLh.pas
hedgewars/hwengine.pas
hedgewars/uStore.pas
--- a/hedgewars/CMakeLists.txt	Thu Nov 05 19:50:16 2009 +0000
+++ b/hedgewars/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
@@ -101,7 +101,7 @@
 		set(pascal_compiler_flags "-fPIC" "-CfSSE2" ${pascal_compiler_flags})	#instruction set for ppc is 7400
 	endif()			
 else(OPTIMIZATIONS)
-	set(pascal_compiler_flags "-O-" "-gl" "-dDEBUGFILE" "-pg" "-va" ${pascal_compiler_flags})
+	set(pascal_compiler_flags "-O-" "-gl" "-dDEBUGFILE" "-pg" "-vv" ${pascal_compiler_flags})
 endif(OPTIMIZATIONS)
 
 if(LOWRES)
--- a/hedgewars/SDLh.pas	Thu Nov 05 19:50:16 2009 +0000
+++ b/hedgewars/SDLh.pas	Thu Nov 05 20:40:31 2009 +0000
@@ -36,7 +36,7 @@
 {$ENDIF}
 
 {$IFDEF FPC}
-{$PACKRECORDS C}
+  {$PACKRECORDS C}
 {$ENDIF}
 
 {$IFDEF DARWIN}
@@ -88,8 +88,8 @@
 	SDL_INIT_AUDIO    = $00000010;
 	SDL_INIT_JOYSTICK = $00000200;
 
-	SDL_APPINPUTFOCUS = 2;
-	SDL_BUTTON_WHEELDUP = 4;
+	SDL_APPINPUTFOCUS    = 2;
+	SDL_BUTTON_WHEELDUP  = 4;
 	SDL_BUTTON_WHEELDOWN = 5;
 		
 {*begin sdl_event binding*}
--- a/hedgewars/hwengine.pas	Thu Nov 05 19:50:16 2009 +0000
+++ b/hedgewars/hwengine.pas	Thu Nov 05 20:40:31 2009 +0000
@@ -196,7 +196,9 @@
 		//SDL_VIDEORESIZE: Resize(max(event.resize.w, 600), max(event.resize.h, 450));
 {$IFDEF TOUCHINPUT}
                 SDL_MOUSEMOTION: begin
-                        WriteLnToConsole('*********************************************       motion');
+{$IFDEF DEBUGFILE}
+                        AddFileLog('*********************************************       motion');
+{$ENDIF}
                         mouseState:= SDL_GetMouseState(0, @x, @y);
                         SDL_GetRelativeMouseState(0, @dx, @dy);
                         
@@ -231,8 +233,9 @@
                 end;
         {*MoveCamera is in uWord.pas -- conflicts with other commands*}
                 SDL_MOUSEBUTTONDOWN: begin
-                        WriteLnToConsole('*********************************************       touch down');
-
+{$IFDEF DEBUGFILE}
+                        AddFileLog('*********************************************       touch down');
+{$ENDIF}
                         mouseState:= SDL_GetMouseState(0, @x, @y);                       
 
                         {* attack *}
@@ -267,7 +270,9 @@
                         end;
                 end;
                 SDL_MOUSEBUTTONUP: begin
+{$IFDEF DEBUGFILE}
                         AddFileLog('*********************************************       touch up');
+{$ENDIF}
 
                         mouseState:= SDL_GetMouseState(0, @x, @y);
                         uKeys.leftClick:= true;
@@ -435,7 +440,7 @@
 		cAltDamage:= false;
 		cShowFPS:= true;
 		val('8', cTimerInterval);
-		cReducedQuality:= true;
+		cReducedQuality:= false;
 
         for p:= Succ(Low(TPathType)) to High(TPathType) do
 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
--- a/hedgewars/uStore.pas	Thu Nov 05 19:50:16 2009 +0000
+++ b/hedgewars/uStore.pas	Thu Nov 05 20:40:31 2009 +0000
@@ -361,6 +361,8 @@
 ConfirmTexture:= RenderStringTex(trmsg[sidConfirm], $FFFF00, fntBig);
 SyncTexture:= RenderStringTex(trmsg[sidSync], $FFFF00, fntBig);
 
+AddProgress;
+
 for ai:= Low(TAmmoType) to High(TAmmoType) do
 	with Ammoz[ai] do
 		begin
@@ -377,8 +379,9 @@
 	end;
 
 {$IFDEF DUMP}
-SDL_SaveBMP_RW(LandSurface, SDL_RWFromFile('LandSurface.bmp', 'wb'), 1);
-SDL_SaveBMP_RW(StoreSurface, SDL_RWFromFile('StoreSurface.bmp', 'wb'), 1);
+//not working anymore, where are LandSurface and StoreSurface defined?
+//SDL_SaveBMP_RW(LandSurface, SDL_RWFromFile('LandSurface.bmp', 'wb'), 1);
+//SDL_SaveBMP_RW(StoreSurface, SDL_RWFromFile('StoreSurface.bmp', 'wb'), 1);
 {$ENDIF}
 AddProgress;
 end;