update iphone port to new code from Smaxx
authorkoda
Thu, 04 Feb 2010 22:34:21 +0000
changeset 2753 2305bb5dc5f2
parent 2752 df01bbbd0e1a
child 2754 ad4f81fbfb76
update iphone port to new code from Smaxx
cocoaTouch/GameSetup.m
hedgewars/uMisc.pas
hedgewars/uStore.pas
--- a/cocoaTouch/GameSetup.m	Thu Feb 04 22:30:42 2010 +0000
+++ b/cocoaTouch/GameSetup.m	Thu Feb 04 22:34:21 2010 +0000
@@ -108,25 +108,13 @@
 				
 				// various flags
 				[self sendToEngine:@"e$gmflags 256"]; 
-
-				// various flags
 				[self sendToEngine:@"e$damagepct 100"];
-				
-				// various flags
 				[self sendToEngine:@"e$turntime 45000"];
-				
-				// various flags
 				[self sendToEngine:@"e$minestime 3000"];
-				
-				// various flags
 				[self sendToEngine:@"e$landadds 4"];
-				
-				// various flags
 				[self sendToEngine:@"e$sd_turns 15"];
-												
-				// various flags
 				[self sendToEngine:@"e$casefreq 5"];
-				
+
 				// dimension of the map
 				[self sendToEngine:@"e$template_filter 1"];
 								
@@ -145,11 +133,14 @@
 				// team 1 voicepack info
 				[self sendToEngine:@"evoicepack Classic"];
 				
+				// team 1 flag
+				[self sendToEngine:@"eflag hedgewars"];
+
 				// team 1 binds (skipped)			
 				// team 1 members info
 				[self sendToEngine:@"eaddhh 0 100 Snow Leopard"];
 				[self sendToEngine:@"ehat NoHat"];
-				
+
 				// team 1 ammostore
 				[self sendToEngine:@"eammstore 20501090003040000009000000000000000000010404000441400444645644444774776112211144"];
 				//[self sendToEngine:@"eammstore 93919294221991210322351110012010000002110404000441400444645644444774776112211144"];
@@ -165,12 +156,15 @@
 				
 				// team 2 voicepack info
 				[self sendToEngine:@"evoicepack Classic"];
-				
+
+				// team 2 flag
+				[self sendToEngine:@"eflag hedgewars"];
+
 				// team 2 binds (skipped)
 				// team 2 members info
 				[self sendToEngine:@"eaddhh 0 100 Raichu"];
 				[self sendToEngine:@"ehat Bunny"];
-				
+
 				// team 2 ammostore
 				[self sendToEngine:@"eammstore 20501090003040000009000000000000000000010404000441400444645644444774776112211144"];
 				
--- a/hedgewars/uMisc.pas	Thu Feb 04 22:30:42 2010 +0000
+++ b/hedgewars/uMisc.pas	Thu Feb 04 22:34:21 2010 +0000
@@ -695,6 +695,7 @@
 	zoom			:= 2.0;
 	ZoomValue		:= 2.0;
 	cBitsStr		:= '32';
+	WeaponTooltipTex	:= nil;
 
 	// booleans
 	cLaserSighting		:= false;
@@ -730,7 +731,6 @@
 	cHasFocus		:= true;
 	cInactDelay		:= 1250;
 	cAltDamage		:= true;
-
 {$IFDEF DEBUGFILE}
 {$I-}
 {$IFDEF IPHONEOS}
--- a/hedgewars/uStore.pas	Thu Feb 04 22:30:42 2010 +0000
+++ b/hedgewars/uStore.pas	Thu Feb 04 22:34:21 2010 +0000
@@ -38,11 +38,7 @@
     Step: LongInt;
     squaresize : LongInt;
     numsquares : LongInt;
-{$IFDEF SDL13notworking}
-    ProgrTex: TSDL_TextureID;
-{$ELSE}
     ProgrTex: PTexture;
-{$ENDIF}
 
 procedure init_uStore;
 procedure free_uStore;
@@ -1485,18 +1481,16 @@
 end;
 
 procedure RenderWeaponTooltip(atype: TAmmoType);
+{$IFNDEF IPHONEOS}
 var r: TSDL_Rect;
 	i: LongInt;
 	extra: string;
 	extracolor: LongInt;
 begin
-{$IFNDEF IPHONEOS}
 // don't do anything if the window shouldn't be shown
 if not cWeaponTooltips then
 	begin
-{$ENDIF}
 	WeaponTooltipTex:= nil;
-{$IFNDEF IPHONEOS}
 	exit
 	end;
 
@@ -1532,8 +1526,10 @@
 
 // render window and return the texture
 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r)
+end;
+{$ELSE}
+begin end;
 {$ENDIF}
-end;
 
 procedure ShowWeaponTooltip(x, y: LongInt);
 begin
@@ -1564,11 +1560,7 @@
 	cScaleFactor:= 2.0;
 	SupportNPOTT:= false;
 	Step:= 0;
-{$IFDEF SDL13notworking}
-	ProgrTex:= 0;
-{$ELSE}
 	ProgrTex:= nil;
-{$ENDIF}
 end;
 
 procedure free_uStore;