Strip trailing spaces
authornemo
Thu, 10 Sep 2009 15:29:28 +0000
changeset 2376 ece7b87f1334
parent 2375 99f05a01a6a3
child 2377 f3fab2b09e0c
Strip trailing spaces
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
hedgewars/SDLh.pas
hedgewars/hwengine.pas
hedgewars/uAI.pas
hedgewars/uAIAmmoTests.pas
hedgewars/uAIMisc.pas
hedgewars/uChat.pas
hedgewars/uConsts.pas
hedgewars/uGears.pas
hedgewars/uLand.pas
hedgewars/uLandGraphics.pas
hedgewars/uLandObjects.pas
hedgewars/uLandTemplates.pas
hedgewars/uLandTexture.pas
hedgewars/uLocale.pas
hedgewars/uMisc.pas
hedgewars/uStore.pas
hedgewars/uTeams.pas
hedgewars/uVisualGears.pas
hedgewars/uWorld.pas
--- a/hedgewars/GSHandlers.inc	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Sep 10 15:29:28 2009 +0000
@@ -100,7 +100,7 @@
 if hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater then DeleteGear(Gear);
 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes)
 if (GameTicks and $1F) = 0 then
-    if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then 
+    if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then
         AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
     else if Random(12) = 0 then
         AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
@@ -496,14 +496,14 @@
     end
 else
     if (GameTicks mod 32) = 0 then
-        if (GameTicks mod 4096) < 2048 then 
+        if (GameTicks mod 4096) < 2048 then
             begin
             if(HHGear^.Angle + 1 <= cMaxAngle) then inc(HHGear^.Angle)
             end
         else
             if(HHGear^.Angle - 1 >= 0) then dec(HHGear^.Angle);
 
-if (TurnTimeLeft > 0) then 
+if (TurnTimeLeft > 0) then
     dec(TurnTimeLeft)
 else
     begin
@@ -677,12 +677,12 @@
 		begin
 		HHGear^.State:= HHGear^.State and not gstAttacking;
 		prevX:= hwRound(HHGear^.X);
-	
-// why the call to HedgehogStep then a further increment of X?	
-        if (prevX = hwRound(HHGear^.X)) and 
+
+// why the call to HedgehogStep then a further increment of X?
+        if (prevX = hwRound(HHGear^.X)) and
            CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), COLOR_INDESTRUCTIBLE) then HedgehogStep(HHGear);
-		
-        if (prevX = hwRound(HHGear^.X)) and 
+
+        if (prevX = hwRound(HHGear^.X)) and
            CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), COLOR_INDESTRUCTIBLE) then HHGear^.X:= HHGear^.X + SignAs(_1, HHGear^.dX);
 		HHGear^.State:= HHGear^.State or gstAttacking
 		end;
@@ -759,7 +759,7 @@
 	Gear^.Y:= HHGear^.Y;
 
 	ApplyAngleBounds(PHedgehog(Gear^.Hedgehog)^, amRope);
-	
+
 	Gear^.dX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX);
 	Gear^.dY:= -AngleCos(HHGear^.Angle);
 	Gear^.Friction:= _450;
@@ -852,7 +852,7 @@
 	len:= _1 / Distance(ropeDx, ropeDy); // old rope pos
 	nx:= ropeDx * len;
 	ny:= ropeDy * len;
-	
+
 	len:= Gear^.Elasticity - _0_3x70;
 	while len > _3 do
 			begin
@@ -873,7 +873,7 @@
 					X:= hwRound(Gear^.X);
 					Y:= hwRound(Gear^.Y);
 					end;
-				
+
 				Gear^.X:= Gear^.X + nx * len;
 				Gear^.Y:= Gear^.Y + ny * len;
 				inc(RopePoints.Count);
@@ -955,7 +955,7 @@
 		end;
 	ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^)
 	end;
-	
+
 begin
 Gear^.X:= Gear^.X - Gear^.dX;
 Gear^.Y:= Gear^.Y - Gear^.dY;
@@ -966,7 +966,7 @@
 	begin
 	if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then SetLittle(HHGear^.dX);
 	if HHGear^.dY.isNegative and TestCollisionYwithGear(HHGear, -1) then HHGear^.dY:= _0;
-	
+
 	HHGear^.X:= HHGear^.X + HHGear^.dX;
 	Gear^.X:= Gear^.X + HHGear^.dX;
 
@@ -993,9 +993,9 @@
 				Gear^.Elasticity:= tt;
 				Gear^.doStep:= @doStepRopeWork;
 				with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump);
-				
+
 				RemoveFromAmmo;
-				
+
 				tt:= _0;
 				exit
 				end;
@@ -1017,7 +1017,7 @@
 		with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump);
 
 		RemoveFromAmmo;
-		
+
 		exit
 		end;
 
@@ -1152,7 +1152,7 @@
 	y:= hwRound(Gear^.Y);
 	k:= Gear^.Kind;
 	DeleteGear(Gear); // <-- delete gear!
-	
+
 	if k = gtCase then
 		begin
 		doMakeExplosion(x, y, 25, EXPLAutoSound);
@@ -1240,10 +1240,10 @@
 
 	Gear^.dY:= Gear^.dY + cGravity;
 	if hwAbs(Gear^.dY) > _0_2 then Gear^.dY:= Gear^.dY * _0_995;
-	
+
 	Gear^.X:= Gear^.X + Gear^.dX + cWindSpeed * 640;
 	Gear^.Y:= Gear^.Y + Gear^.dY;
-	
+
 	if (hwRound(Gear^.Y) > cWaterLine) then
 		begin
 		for i:= 0 to 3 do
@@ -1305,7 +1305,7 @@
 	exit
 	end;
 
-if CheckLandValue(hwRound(HHGear^.X), hwRound(HHGear^.Y + HHGear^.dY + SignAs(_6,Gear^.dY)), COLOR_INDESTRUCTIBLE) then 
+if CheckLandValue(hwRound(HHGear^.X), hwRound(HHGear^.Y + HHGear^.dY + SignAs(_6,Gear^.dY)), COLOR_INDESTRUCTIBLE) then
    HHGear^.Y:= HHGear^.Y + HHGear^.dY
 end;
 
@@ -1639,7 +1639,7 @@
 		dY:= Gear^.dY + (GetRandom - _0_5) * _0_03;
 		AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtCluster, 0, dX, dY, 25);
 		end;
-	
+
 	DeleteGear(Gear);
 	exit
 	end;
@@ -1679,16 +1679,16 @@
 if upd > 3 then
 	begin
 	if Gear^.Health < 1500 then Gear^.Pos:= 2;
-	
+
 	AmmoShove(Gear, 30, 40);
-	
+
 	DrawTunnel(HHGear^.X - HHGear^.dX * 10,
 			HHGear^.Y - _2 - HHGear^.dY * 10 + hwAbs(HHGear^.dY) * 2,
 			HHGear^.dX,
 			HHGear^.dY,
 			20 + cHHRadius * 2,
 			cHHRadius * 2 + 6);
-	
+
 	upd:= 0
 	end;
 
@@ -1792,12 +1792,12 @@
 	begin
 	Gear^.Angle:= (LongInt(Gear^.Angle) + 4 - dA) mod 4
 	end;
-	
+
 	procedure NextAngle;
 	begin
 	Gear^.Angle:= (LongInt(Gear^.Angle) + 4 + dA) mod 4
 	end;
-	
+
 begin
 AllInactive:= false;
 
@@ -2045,7 +2045,7 @@
 		DeleteGear(Gear);
 		exit;
 		end;
-	
+
 	Gear^.doStep:= @doStepDrillDrilling;
 	dec(Gear^.Timer)
 	end
@@ -2064,12 +2064,12 @@
 		begin
 		rx:= rndSign(getRandom * _0_1);
 		ry:= rndSign(getRandom * _0_1);
-		
+
 		AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtBall, 0,
 				SignAs(AngleSin(HHGear^.Angle) * _0_8, HHGear^.dX) + rx,
 				AngleCos(HHGear^.Angle) * ( - _0_8) + ry,
 				0);
-		
+
 		PlaySound(sndGun, false, nil);
 		end;
 
@@ -2177,7 +2177,7 @@
 	StopSound(sndRCPlane);
 	StopSound(sndRideOfTheValkyries);
 	ResumeMusic;
-	
+
 	if ((Gear^.State and gstCollision) <> 0) then
 		begin
 		doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 25, EXPLAutoSound);
@@ -2243,7 +2243,7 @@
     Gear^.Timer:= GameTicks
     end;
 
-// erases them all at once :-/ 
+// erases them all at once :-/
 if (Gear^.Timer <> 0) and (GameTicks - Gear^.Timer > 250) then
     begin
     Gear^.Timer:= 0;
@@ -2251,7 +2251,7 @@
     end;
 
 if Gear^.Health < 0 then Gear^.Health:= 0;
-if (GameTicks and $3F) = 0 then 
+if (GameTicks and $3F) = 0 then
        begin
 //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', $FFFFFF, capgrpAmmostate);
        if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
@@ -2260,7 +2260,7 @@
 
 if HHGear^.Message and (gm_Attack or gm_Up or gm_Precise or gm_Left or gm_Right) <> 0 then Gear^.State:= Gear^.State and not gsttmpFlag;
 HHGear^.Message:= HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right);
-HHGear^.State:= HHGear^.State or gstMoving; 
+HHGear^.State:= HHGear^.State or gstMoving;
 
 Gear^.X:= HHGear^.X;
 Gear^.Y:= HHGear^.Y;
@@ -2272,7 +2272,7 @@
 if  (Gear^.Health = 0)
     or (HHGear^.Damage <> 0)
 	or CheckGearDrowning(HHGear)
-    or (TurnTimeLeft = 0) 
+    or (TurnTimeLeft = 0)
     // allow brief ground touches - to be fair on this, might need another counter
     or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and TestCollisionYwithGear(HHGear, 1))
 	or ((Gear^.Message and gm_Attack) <> 0) then
--- a/hedgewars/HHHandlers.inc	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Thu Sep 10 15:29:28 2009 +0000
@@ -25,7 +25,7 @@
 with PHedgehog(Gear^.Hedgehog)^ do
 	begin
 	Gear^.Message:= Gear^.Message and not gm_Slot;
-	
+
 	if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0)
 		or (AttacksNum > 0)
 		or ((Gear^.State and gstHHDriven) = 0) then exit;
@@ -51,7 +51,7 @@
 		while (i <= cMaxSlotAmmoIndex)
 		  and ((Ammo^[slot, i].Count = 0)
 		       or (Team^.Clan^.TurnNumber <= Ammoz[Ammo^[slot, i].AmmoType].SkipTurns)) do inc(i);
-		
+
 		if i <= cMaxSlotAmmoIndex then
 			begin
 			CurSlot:= slot;
@@ -107,9 +107,9 @@
      begin
      if ((State and gstHHDriven) <> 0)and
         ((State and (gstAttacked or gstHHChooseTarget)) = 0) and
-        (((State and gstMoving) = 0) or 
+        (((State and gstMoving) = 0) or
             // Allow attacks while moving on ammo with AltAttack
-            ((CurAmmoGear <> nil) and ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0)) or 
+            ((CurAmmoGear <> nil) and ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0)) or
             ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_AttackInMove) <> 0)) and
         ((TargetPoint.X <> NoPointX) or ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NeedTarget) = 0)) then
         begin
@@ -634,7 +634,7 @@
 if (Gear^.State and gstMoving) <> 0 then
 	begin
 	wasJumping:= ((Gear^.State and gstHHJumping) <> 0);
-	
+
 	if ((Gear^.Message and gm_HJump) <> 0) and
 		wasJumping and
 		((Gear^.State and gstHHHJump) = 0) then
@@ -645,7 +645,7 @@
 			if not cArtillery then Gear^.dX:= -SignAs(_0_02, Gear^.dX);
 			PlaySound(sndJump2, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
 			end;
-	
+
 	Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump);
 
 	if (not cArtillery) and wasJumping and
--- a/hedgewars/SDLh.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/SDLh.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -219,7 +219,7 @@
                           state: Byte;
                           keysym: TSDL_KeySym;
                           end;
-                          
+
      TSDL_GLattr = ( SDL_GL_RED_SIZE,
                      SDL_GL_GREEN_SIZE,
                      SDL_GL_BLUE_SIZE,
@@ -239,7 +239,7 @@
                      SDL_GL_RETAINED_BACKING,
                      SDL_GL_CONTEXT_MAJOR_VERSION,
                      SDL_GL_CONTEXT_MINOR_VERSION );
-	  
+
 {$IFDEF SDL13}
      TSDL_MouseMotionEvent = record
                              type_: byte;
--- a/hedgewars/hwengine.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/hwengine.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -275,14 +275,14 @@
   2: begin
 		PathPrefix:= ParamStr(1);
 		recordFileName:= ParamStr(2);
-	 
+
 		for p:= Succ(Low(TPathType)) to High(TPathType) do
 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
 	end;
   6: begin
 		PathPrefix:= ParamStr(1);
 		recordFileName:= ParamStr(2);
-	 
+
 		if ParamStr(3) = '--set-video'	then
 		begin
 			val(ParamStr(4), cScreenWidth);
@@ -311,14 +311,14 @@
 				else DisplayUsage;
 			end
 		end;
-		
+
 		for p:= Succ(Low(TPathType)) to High(TPathType) do
 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
 	end;
  11: begin
 		PathPrefix:= ParamStr(1);
 		recordFileName:= ParamStr(2);
-	
+
 		if ParamStr(3) = '--set-multimedia' then
 		begin
 			val(ParamStr(4), cScreenWidth);
@@ -334,7 +334,7 @@
 			cFullScreen:= ParamStr(11) = '1';
 		end
 		else DisplayUsage;
-		
+
 		for p:= Succ(Low(TPathType)) to High(TPathType) do
 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
 	end;
@@ -360,7 +360,7 @@
 			cReducedQuality:= ParamStr(15) = '1';
 		end
 		else DisplayUsage;
-		
+
 		for p:= Succ(Low(TPathType)) to High(TPathType) do
 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
 	end;
--- a/hedgewars/uAI.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uAI.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -290,7 +290,7 @@
 if ((Me^.State and (gstAttacking or gstHHJumping or gstMoving)) <> 0)
    or isInMultiShoot then exit;
 
-//DeleteCI(Me); // this might break demo 
+//DeleteCI(Me); // this might break demo
 Me^.State:= Me^.State or gstHHThinking;
 Me^.Message:= 0;
 
--- a/hedgewars/uAIAmmoTests.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uAIAmmoTests.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -220,7 +220,7 @@
 		x:= Me^.X;
 		y:= Me^.Y;
 		dY:= -Vy;
-		
+
 		repeat
 			x:= x + Vx;
 			y:= y + dY;
@@ -228,7 +228,7 @@
 			EX:= hwRound(x);
 			EY:= hwRound(y);
 		until TestColl(EX, EY, 5) or (EY > 1000);
-		
+
 		if (EY < 1000) and not dY.isNegative then
 			begin
 			Result:= RateExplosion(Me, EX, EY, 91);
--- a/hedgewars/uAIMisc.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uAIMisc.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -296,7 +296,7 @@
                  end else exit(Result)
               end
     end;
-    
+
 repeat
 if not (hwRound(Gear^.Y) + cHHRadius < cWaterLine) then exit(Result);
 if (Gear^.State and gstMoving) <> 0 then
@@ -439,6 +439,6 @@
 begin
 if random(2) = 0 then AIrndSign:=   num
                  else AIrndSign:= - num
-end;  
+end;
 
 end.
--- a/hedgewars/uChat.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uChat.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -42,7 +42,7 @@
 var Strs: array[0 .. MaxStrIndex] of TChatLine;
 	lastStr: Longword = 0;
 	visibleCount: Longword = 0;
-	
+
 	InputStr: TChatLine;
 	InputStrL: array[0..260] of char; // for full str + 4-byte utf-8 char
 
@@ -120,7 +120,7 @@
 	DrawFillRect(r);
 	DrawTexture(8 - cScreenWidth div 2, (visibleCount - t) * 16 - 6, Strs[i].Tex);
 	dec(r.y, 16);
-	
+
 	if i = 0 then i:= MaxStrIndex else dec(i);
 	inc(cnt);
 	inc(t)
@@ -134,7 +134,7 @@
 
 begin
 // "Make hedgehog say something"
-if (s[1] = '"') and (s[Length(s)] = '"') then 
+if (s[1] = '"') and (s[Length(s)] = '"') then
     begin
     if CurrentTeam^.ExtDriven then
         ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
@@ -143,7 +143,7 @@
     exit
     end;
 // 'Make hedgehog think something'
-if (s[1] = '''') and (s[Length(s)] = '''') then 
+if (s[1] = '''') and (s[Length(s)] = '''') then
     begin
     if CurrentTeam^.ExtDriven then
         ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
@@ -152,7 +152,7 @@
     exit
     end;
 // -Make hedgehog yell something-
-if (s[1] = '-') and (s[Length(s)] = '-') then 
+if (s[1] = '-') and (s[Length(s)] = '-') then
     begin
     if CurrentTeam^.ExtDriven then
         ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
@@ -194,7 +194,7 @@
 if (s[1] = '/') and (copy(s, 1, 4) <> '/me ') then
 	begin
 	if CurrentTeam^.ExtDriven then exit;
-	
+
 	for i:= Low(TWave) to High(TWave) do
 		if (s = Wavez[i].cmd) then
 			begin
@@ -251,7 +251,7 @@
 	else if (Key < $800) then btw:= 2
 	else if (Key < $10000) then btw:= 3
 	else btw:= 4;
-	
+
 	utf8:= '';
 
 	for i:= btw downto 2 do
@@ -259,7 +259,7 @@
 		utf8:= char((Key or $80) and $BF) + utf8;
 		Key:= Key shr 6
 		end;
-	
+
 	utf8:= char(Key or firstByteMark[btw]) + utf8;
 
 	if byte(InputStr.s[0]) + btw > 240 then exit;
--- a/hedgewars/uConsts.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uConsts.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -19,7 +19,7 @@
 unit uConsts;
 interface
 
-uses 
+uses
 	SDLh,
 {$IFDEF GLES11}
 	gles11,
@@ -59,9 +59,9 @@
 			sprCakeWalk, sprCakeDown, sprAMAmmosBW, sprWatermelon,
 			sprEvilTrace, sprHellishBomb, sprSeduction, sprDress,
 			sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls,
-			sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder, 
-            sprSpeechCorner, sprSpeechEdge, sprSpeechTail, 
-            sprThoughtCorner, sprThoughtEdge, sprThoughtTail, 
+			sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder,
+            sprSpeechCorner, sprSpeechEdge, sprSpeechTail,
+            sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
             sprShoutCorner, sprShoutEdge, sprShoutTail,
             sprSniperRifle, sprBubbles, sprJetpack);
 
@@ -92,14 +92,14 @@
 			sndCake, sndOw1, sndOw4, sndFirePunch1, sndFirePunch2,
 			sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6,
 			sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
-			sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat, 
+			sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
 			sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter);
 
 	TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
 			amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
 			amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch,
 			amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake,
-			amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, 
+			amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun,
             		amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime,
             		amLaserSight, amVampiric, amSniperRifle, amJetpack);
 
@@ -133,7 +133,7 @@
 	TVertex2f = record
 		X, Y: GLfloat;
 		end;
-			
+
 	TVertex2i = record
 		X, Y: GLint;
 		end;
@@ -168,7 +168,7 @@
     ifTransparent = $00000004; // image uses transparent pixels (color keying)
     ifIgnoreCaps  = $00000008; // ignore hardware capabilities when loading (i.e. image will not be drawn using OpenGL)
     ifLowRes      = $00000010; // try loading a low resolution image when it is critical
-    
+
 const	cMaxPower     = 1500;
 	cMaxAngle     = 2048;
 	cPowerDivisor = 1500;
@@ -669,7 +669,7 @@
 			(FileName:                 'warp.ogg'; Path: ptSounds),// sndWarp
 			(FileName:          'suddendeath.ogg'; Path: ptSounds),// sndSuddenDeath
 			(FileName:               'mortar.ogg'; Path: ptSounds),// sndMortar
-			(FileName:         'shutterclick.ogg'; Path: ptSounds) // sndShutter			
+			(FileName:         'shutterclick.ogg'; Path: ptSounds) // sndShutter
 			);
 
 	Ammoz: array [TAmmoType] of record
--- a/hedgewars/uGears.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uGears.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -79,7 +79,7 @@
 
 implementation
 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions,
-	uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos, uTriggers, 
+	uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos, uTriggers,
 {$IFDEF GLES11}
 	gles11,
 {$ELSE}
@@ -436,11 +436,11 @@
 			AddGear(hwRound(Gear^.X), min(hwRound(Gear^.Y),cWaterLine+cVisibleWater+32), gtHealthTag, t, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog;
 			uStats.HedgehogDamaged(Gear)
 			end;
-	
+
 		team:= PHedgehog(Gear^.Hedgehog)^.Team;
 		if CurrentHedgehog^.Gear = Gear then
 			FreeActionsList; // to avoid ThinkThread on drawned gear
-		
+
 		PHedgehog(Gear^.Hedgehog)^.Gear:= nil;
 		inc(KilledHHs);
 		RecountTeamHealth(team)
@@ -528,11 +528,11 @@
 	begin
 	Gear:= t;
 	t:= Gear^.NextGear;
-	if Gear^.Active then 
+	if Gear^.Active then
         begin
         if Gear^.RenderTimer and (Gear^.Timer > 500) and ((Gear^.Timer mod 1000) = 0) then
             begin
-            if Gear^.Tex <> nil then FreeTexture(Gear^.Tex); 
+            if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
             Gear^.Tex:= RenderStringTex(inttostr(Gear^.Timer div 1000), $FFFFFFFF, fntSmall);
             end;
         Gear^.doStep(Gear);
@@ -617,9 +617,9 @@
 			if isInMultiShoot then isInMultiShoot:= false
 			else begin
 			ResetUtilities;
-			
+
 			FreeActionsList; // could send -left, -right and similar commands, so should be called before /nextturn
-			
+
 			ParseCommand('/nextturn', true);
 			SwitchHedgehog;
 
@@ -720,13 +720,13 @@
                 RecountTeamHealth(CurrentHedgehog^.Team);
                 end
             end;
-        if ((GameFlags and gfKarma) <> 0) and 
+        if ((GameFlags and gfKarma) <> 0) and
            ((GameFlags and gfInvulnerable) = 0) and
            not CurrentHedgehog^.Gear^.Invulnerable then
            begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid
            inc(CurrentHedgehog^.Gear^.Karma, tmpDmg);
-           AddGear(hwRound(CurrentHedgehog^.Gear^.X), 
-                   hwRound(CurrentHedgehog^.Gear^.Y), 
+           AddGear(hwRound(CurrentHedgehog^.Gear^.X),
+                   hwRound(CurrentHedgehog^.Gear^.Y),
                    gtHealthTag, tmpDmg, _0, _0, 0)^.Hedgehog:= CurrentHedgehog;
            end;
         end;
@@ -788,7 +788,7 @@
 			0);
 	defaultPos:= false
 	end else
-if ((Gear^.State and gstWinner) <> 0) and 
+if ((Gear^.State and gstWinner) <> 0) and
    ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
 	begin
 	DrawHedgehog(sx, sy,
@@ -810,14 +810,14 @@
 
 if (Gear^.State and gstHHDriven) <> 0 then
 	begin
-	if ((Gear^.State and gstHHThinking) = 0) and 
-       ShowCrosshair and 
+	if ((Gear^.State and gstHHThinking) = 0) and
+       ShowCrosshair and
        ((Gear^.State and (gstAttacked or gstAnimation)) = 0) then
 		begin
 (* These calculations are a little complex for a few reasons:
    1: I need to draw the laser from weapon origin to nearest land
-   2: I need to start the beam outside the hedgie for attractiveness. 
-   3: I need to extend the beam beyond land. 
+   2: I need to start the beam outside the hedgie for attractiveness.
+   3: I need to extend the beam beyond land.
    This routine perhaps should be pushed into uStore or somesuch instead of continuuing the increase in size of this function.
 *)
 		dx:= hwSign(Gear^.dX) * m * Sin(Gear^.Angle * pi / cMaxAngle);
@@ -851,20 +851,20 @@
 				tx:= round(lx + ax * (LAND_WIDTH div 4));
 				ty:= round(ly + ay * (LAND_WIDTH div 4));
 				end;
-			
+
 			//if (abs(lx-tx)>8) or (abs(ly-ty)>8) then
 				begin
 				glDisable(GL_TEXTURE_2D);
 				glEnable(GL_LINE_SMOOTH);
 
 				glLineWidth(1.0);
-				
+
 				glColor4ub($FF, $00, $00, $C0);
 				VertexBuffer[0].X:= hx + WorldDx;
 				VertexBuffer[0].Y:= hy + WorldDy;
 				VertexBuffer[1].X:= tx + WorldDx;
 				VertexBuffer[1].Y:= ty + WorldDy;
-				
+
 				glEnableClientState(GL_VERTEX_ARRAY);
 				glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
 				glDrawArrays(GL_LINES, 0, Length(VertexBuffer));
@@ -1062,11 +1062,11 @@
 				defaultPos:= false
 				end;
 			amGirder: begin
-                DrawSpriteClipped(sprGirder, 
-                                  sx-256, 
-                                  sy-256, 
-                                  LongInt(topY)+WorldDy, 
-                                  LongInt(rightX)+WorldDx, 
+                DrawSpriteClipped(sprGirder,
+                                  sx-256,
+                                  sy-256,
+                                  LongInt(topY)+WorldDy,
+                                  LongInt(rightX)+WorldDx,
                                   cWaterLine+WorldDy,
                                   LongInt(leftX)+WorldDx);
                 end;
@@ -1103,7 +1103,7 @@
 				0,
 				4,
 				0);
-			
+
 			HatVisible:= true;
 			with PHedgehog(Gear^.Hedgehog)^ do
 				if (HatTex <> nil)
@@ -1170,7 +1170,7 @@
 	else
 		if HatVisibility > 0.0 then
 			HatVisibility:= HatVisibility - 0.2;
-	
+
 	if (HatTex <> nil)
 	and (HatVisibility > 0) then
 		if DefaultPos then
@@ -1252,7 +1252,7 @@
     DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
     end;
 if cVampiric and
-   (CurrentHedgehog^.Gear <> nil) and 
+   (CurrentHedgehog^.Gear <> nil) and
    (CurrentHedgehog^.Gear = Gear) then
     begin
     DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
@@ -1277,7 +1277,7 @@
 	glPushMatrix;
 
 	glTranslatef(WorldDx, WorldDy, 0);
-	
+
 	glLineWidth(4.0);
 
 	glColor3ub($B0, $B0, $B0);
@@ -1288,7 +1288,7 @@
 	glColor4f(1, 1, 1, 1);
 
 	glPopMatrix;
-	
+
 	glEnable(GL_TEXTURE_2D);
 	//glDisable(GL_LINE_SMOOTH)
 	end
@@ -1406,21 +1406,21 @@
                      DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, -1,  DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
                   else
                      DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,0,DxDy2Angle(Gear^.dY, Gear^.dX));
-       
+
        gtBall: DrawRotatedf(sprBalls, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tag,0, DxDy2Angle(Gear^.dY, Gear^.dX));
-       
+
        gtDrill: DrawRotated(sprDrill, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-        
+
         gtHedgehog: DrawHH(Gear);
-    
+
     gtAmmo_Grenade: DrawRotated(sprGrenade, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-       
+
        gtHealthTag: if Gear^.Tex <> nil then DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex);
 
            gtGrave: DrawSurfSprite(hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 32, (GameTicks shr 7) and 7, PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex);
-             
+
              gtUFO: DrawSprite(sprUFO, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, (GameTicks shr 7) mod 4);
-      
+
       gtPickHammer: DrawSprite(sprPHammer, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 50 + LongInt(((GameTicks shr 5) and 1) * 2) + WorldDy, 0);
             gtRope: DrawRope(Gear);
       gtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
@@ -1668,7 +1668,7 @@
 						if not (TestCollisionXwithXYShift(t^.ar[i], _0, -1, hwSign(t^.ar[i]^.dX))
 							or TestCollisionYwithGear(t^.ar[i], -1)) then t^.ar[i]^.Y:= t^.ar[i]^.Y - _1;
 						end;
-					
+
 					FollowGear:= t^.ar[i]
 					end;
 		end
@@ -1878,7 +1878,7 @@
 if (FollowGear <> nil) then
 	begin
 	FindPlace(FollowGear, true, 0, LAND_WIDTH);
-	
+
 	if (FollowGear <> nil) then
 		PlaySound(sndReinforce, false, CurrentTeam^.voicepack)
 	end
@@ -1913,20 +1913,20 @@
 		cnt:= 0;
         if topY > 1024 then
 		    y:= 1024-Gear^.Radius * 2
-        else 
+        else
 		    y:= topY-Gear^.Radius * 2;
 		while y < LAND_HEIGHT do
 			begin
 			repeat
 				inc(y, 2);
 			until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1) = 0);
-			
+
 			sy:= y;
 
 			repeat
 				inc(y);
 			until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1) <> 0);
-			
+
 			if (y - sy > Gear^.Radius * 2)
 				and (y < LAND_HEIGHT)
 				and (CheckGearsNear(x, y - Gear^.Radius, [gtHedgehog, gtMine, gtCase], 110, 110) = nil) then
@@ -1936,10 +1936,10 @@
 							else ar[cnt].Y:= y - Gear^.Radius;
 				inc(cnt)
 				end;
-			
+
 			inc(y, 45)
 			end;
-		
+
 		if cnt > 0 then
 			with ar[GetRandom(cnt)] do
 				begin
@@ -1948,7 +1948,7 @@
 				inc(cnt2)
 				end
 	until (x + Delta > Right);
-	
+
 	dec(Delta, 60)
 until (cnt2 > 0) or (Delta < 70);
 
--- a/hedgewars/uLand.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLand.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -18,7 +18,7 @@
 
 unit uLand;
 interface
-uses SDLh, uLandTemplates, uFloat, 
+uses SDLh, uLandTemplates, uFloat,
 {$IFDEF GLES11}
 	gles11,
 {$ELSE}
@@ -112,7 +112,7 @@
 
 x:= X1;
 y:= Y1;
- 
+
 for i:= 0 to d do
     begin
     inc(eX, dX);
@@ -333,16 +333,16 @@
 	yd:= LAND_HEIGHT - 1;
 	repeat
 		while (yd > 0) and (Land[yd, x] =  0) do dec(yd);
-		
+
 		if (yd < 0) then yd:= 0;
 
 		while (yd < LAND_HEIGHT) and (Land[yd, x] <> 0) do inc(yd);
 		dec(yd);
 		yu:= yd;
-		
+
 		while (yu > 0  ) and (Land[yu, x] <> 0) do dec(yu);
 		while (yu < yd ) and (Land[yu, x] =  0) do inc(yu);
-		
+
 		if (yd < LAND_HEIGHT - 1) and ((yd - yu) >= 16) then
 			begin
 			rr.x:= x;
@@ -393,7 +393,7 @@
            end;
 
 (*  Experiment in making this option more useful
-     if ((not isNegative) and (cTemplateFilter = 4)) or 
+     if ((not isNegative) and (cTemplateFilter = 4)) or
         (canFlip and (getrandom(2) = 0)) then
            begin
            for i:= 0 to pred(BasePointsCount) do
@@ -409,7 +409,7 @@
                    FillPoints^[i].y:= LAND_HEIGHT - 1;
                end;
            end;
-     end 
+     end
 *)
 // template recycling.  Pull these off the floor a bit
      if (not isNegative) and (cTemplateFilter = 4) then
@@ -552,9 +552,9 @@
 topY:= LAND_HEIGHT - playHeight;
 
 // force to only cavern even if a cavern map is invertable if cTemplateFilter = 4 ?
-if (cTemplateFilter = 4) or 
+if (cTemplateFilter = 4) or
    (Template.canInvert and (getrandom(2) = 0)) or
-    (not Template.canInvert and Template.isNegative) then 
+    (not Template.canInvert and Template.isNegative) then
     begin
     hasBorder:= true;
     for y:= 0 to LAND_HEIGHT - 1 do
@@ -610,7 +610,7 @@
 	begin
 	for x:= 0 to LAND_WIDTH - 1 do
 		if Land[y, x] <> 0 then LandPixels[y, x]:= p^[x] or $FF000000;
-		
+
 	p:= @(p^[Surface^.pitch div 4]);
 	end;
 
@@ -679,7 +679,7 @@
 	cpY:= LAND_HEIGHT - tmpsurf^.h;
     if SDL_MustLock(tmpsurf) then
        SDLTry(SDL_LockSurface(tmpsurf) >= 0, true);
-  
+
     p:= tmpsurf^.pixels;
     for y:= 0 to Pred(tmpsurf^.h) do
         begin
@@ -687,7 +687,7 @@
             begin
             if (($FF000000 and p^[x]) = 0) then  // Tiy was having trouble generating transparent black
                 Land[cpY + y, cpX + x]:= 0
-            else if p^[x] = $FF0000FF then  
+            else if p^[x] = $FF0000FF then
                 Land[cpY + y, cpX + x]:= COLOR_INDESTRUCTIBLE
             else if p^[x] = $FFFFFFFF then
                 Land[cpY + y, cpX + x]:= COLOR_LAND;
@@ -695,7 +695,7 @@
             end;
         p:= @(p^[tmpsurf^.pitch div 4]);
         end;
-  
+
     if SDL_MustLock(tmpsurf) then
        SDL_UnlockSurface(tmpsurf);
     SDL_FreeSurface(tmpsurf);
--- a/hedgewars/uLandGraphics.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLandGraphics.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -44,19 +44,19 @@
 var i: LongInt;
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do 
+    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
         if Land[y + dy, i] <> COLOR_INDESTRUCTIBLE then
             Land[y + dy, i]:= Value;
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
-   for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do 
+   for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
         if Land[y - dy, i] <> COLOR_INDESTRUCTIBLE then
             Land[y - dy, i]:= Value;
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do 
+    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
         if Land[y + dx, i] <> COLOR_INDESTRUCTIBLE then
             Land[y + dx, i]:= Value;
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do 
+    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
         if Land[y - dx, i] <> COLOR_INDESTRUCTIBLE then
             Land[y - dx, i]:= Value;
 end;
@@ -81,11 +81,11 @@
    end else
    begin
    if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
-      for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do 
+      for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
           if (Land[y + dy, i] < 256) then
               inc(Land[y + dy, i]);
    if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
-      for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do 
+      for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
           if (Land[y - dy, i] < 256) then
               inc(Land[y - dy, i]);
    if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
@@ -143,19 +143,19 @@
 var i: LongInt;
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do 
+    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
         if Land[y + dy, i] = COLOR_LAND then
             LandPixels[y + dy, i]:= 0;
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do 
+    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
         if Land[y - dy, i] = COLOR_LAND then
              LandPixels[y - dy, i]:= 0;
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do 
+    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
         if Land[y + dx, i] = COLOR_LAND then
             LandPixels[y + dx, i]:= 0;
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
-    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do 
+    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
         if Land[y - dx, i] = COLOR_LAND then
              LandPixels[y - dx, i]:= 0;
 end;
@@ -165,7 +165,7 @@
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if Land[y + dy, i] = COLOR_LAND then 
+       if Land[y + dy, i] = COLOR_LAND then
           begin
           LandPixels[y + dy, i]:= cExplosionBorderColor;
 //          Despeckle(y + dy, i);
@@ -450,7 +450,7 @@
 
 for y:= 0 to LAND_HEIGHT div 32 - 1 do
 	begin
-	
+
 	for x:= 0 to LAND_WIDTH div 32 - 1 do
 		begin
 		if LandDirty[y, x] <> 0 then
--- a/hedgewars/uLandObjects.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLandObjects.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -27,7 +27,7 @@
 procedure AddOnLandObjects(Surface: PSDL_Surface);
 
 implementation
-uses uLand, uStore, uConsts, uMisc, uConsole, uRandom, uVisualGears, uFloat, 
+uses uLand, uStore, uConsts, uMisc, uConsole, uRandom, uVisualGears, uFloat,
 {$IFDEF GLES11}
 	gles11,
 {$ELSE}
@@ -162,7 +162,7 @@
 	inc(y, 24);
 	x1:= gX;
 	x2:= gX;
-	
+
 	while (x1 > Longint(leftX)+150) and (CountNonZeroz(x1, y) = 0) do dec(x1, 2);
 
 	i:= x1 - 12;
@@ -170,7 +170,7 @@
 		dec(x1, 2);
 		k:= CountNonZeroz(x1, y)
 	until (x1 < Longint(leftX)+150) or (k = 0) or (k = 16) or (x1 < i);
-	
+
 	inc(x1, 2);
 	if k = 16 then
 		begin
@@ -191,7 +191,7 @@
 	Result:= true;
 	tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Girder', ifTransparent or ifIgnoreCaps);
 	if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptGraphics] + '/Girder', ifCritical or ifTransparent or ifIgnoreCaps);
-	
+
 	rr.x:= x1;
 	while rr.x < x2 do
 		begin
@@ -199,7 +199,7 @@
 		inc(rr.x, tmpsurf^.w);
 		end;
 	SDL_FreeSurface(tmpsurf);
-	
+
 	AddRect(x1 - 8, y - 32, x2 - x1 + 16, 80);
 	end else Result:= false;
 
--- a/hedgewars/uLandTemplates.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLandTemplates.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -1913,7 +1913,7 @@
 const MediumTemplates: array[0..17] of Longword =
       ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 );
 const LargeTemplates: array[0..19] of Longword =
-      ( 
+      (
         18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
         28, 29, 30, 31, 32, 33, 34, 35, 37, 38
       );
--- a/hedgewars/uLandTexture.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLandTexture.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -25,7 +25,7 @@
 procedure FreeLand;
 
 implementation
-uses uMisc, uLand, uStore, 
+uses uMisc, uLand, uStore,
 {$IFDEF GLES11}
 	gles11,
 {$ELSE}
@@ -51,7 +51,7 @@
 begin
 for ty:= 0 to TEXSIZE - 1 do
 	Move(LandPixels[y * TEXSIZE + ty, x * TEXSIZE], tmpPixels[ty, 0], sizeof(Longword) * TEXSIZE);
-	
+
 Pixels:= @tmpPixels
 end;
 
@@ -61,7 +61,7 @@
 for ty:= 0 to TEXSIZE - 1 do
 	for tx:= 0 to TEXSIZE - 1 do
 		tmpPixels[ty, tx]:= Land[y * TEXSIZE + ty, x * TEXSIZE + tx] or $FF000000;
-	
+
 Pixels2:= @tmpPixels
 end;
 
--- a/hedgewars/uLocale.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLocale.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -24,13 +24,13 @@
 			sidParachute, sidAirAttack, sidMineStrike, sidBlowTorch,
 			sidGirder, sidTeleport, sidSwitch, sidMortar, sidWhip,
 			sidKamikaze, sidCake, sidSeduction, sidWatermelon,
-			sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane, 
-            sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime, 
+			sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane,
+            sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack);
 
 	TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
 			sidConfirm, sidSuddenDeath, sidRemaining, sidFuel);
-			
+
 	TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
 			eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf);
 
--- a/hedgewars/uMisc.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uMisc.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -360,7 +360,7 @@
 Surface2Tex^.w:= surf^.w;
 Surface2Tex^.h:= surf^.h;
 
-if (surf^.format^.BytesPerPixel = 3) then 
+if (surf^.format^.BytesPerPixel = 3) then
 	begin
 		modeIntFormat:= GL_RGB;
 		modeFormat:= modeIntFormat;
@@ -392,7 +392,7 @@
 
 	Surface2Tex^.rx:= Surf^.w / tw;
 	Surface2Tex^.ry:= Surf^.h / th;
-	
+
 	GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel);
 
 	if surf^.format^.BytesPerPixel = 4 then
@@ -454,9 +454,9 @@
 
 //	legacy resizing function
 //	gluScaleImage(mode, Surf^.w, Surf^.h, GL_UNSIGNED_BYTE, Surf^.pixels, tw, th, GL_UNSIGNED_BYTE, tmpp);
-	
+
 	glTexImage2D(GL_TEXTURE_2D, 0, modeIntFormat, tw, th, 0, modeFormat, GL_UNSIGNED_BYTE, tmpp);
-	
+
 	FreeMem(tmpp, tw * th * surf^.format^.BytesPerPixel)
 	end else
 	begin
--- a/hedgewars/uStore.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uStore.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -316,7 +316,7 @@
 		NameTex:= Surface2Tex(tmpsurf, false);
 		SDL_FreeSurface(tmpsurf)
 		end;
-		
+
 for i:= Low(CountTexz) to High(CountTexz) do
 	begin
 	tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(IntToStr(i) + 'x'), $FFFFFF);
@@ -699,17 +699,17 @@
 begin
 
 case SpeechType of
-    1: begin; 
-       edge:= sprSpeechEdge; 
+    1: begin;
+       edge:= sprSpeechEdge;
        corner:= sprSpeechCorner;
        tail:= sprSpeechTail;
        end;
-    2: begin; 
+    2: begin;
        edge:= sprThoughtEdge;
-       corner:= sprThoughtCorner; 
+       corner:= sprThoughtCorner;
        tail:= sprThoughtTail;
        end;
-    3: begin; 
+    3: begin;
        edge:= sprShoutEdge;
        corner:= sprShoutCorner;
        tail:= sprShoutTail;
@@ -885,23 +885,23 @@
 {$IFDEF IPHONEOS}
     convertedSurf: PSDL_Surface;
 const TestFormat: TSDL_PixelFormat = (
-            palette: nil; 
+            palette: nil;
             BitsPerPixel : 32;
             BytesPerPixel: 4;
-            Rloss : 0; 
-            Gloss : 0; 
-            Bloss : 0; 
-            Aloss : 0; 
-			Rshift: 0; 
-            Gshift: 8; 
-            Bshift: 16; 
-            Ashift: 24; 
-            RMask : $000000FF; 
-            GMask : $0000FF00; 
-            BMask : $00FF0000; 
-            AMask : $FF000000; 
+            Rloss : 0;
+            Gloss : 0;
+            Bloss : 0;
+            Aloss : 0;
+			Rshift: 0;
+            Gshift: 8;
+            Bshift: 16;
+            Ashift: 24;
+            RMask : $000000FF;
+            GMask : $0000FF00;
+            BMask : $00FF0000;
+            AMask : $FF000000;
             colorkey: 0;
-            alpha : 255); 
+            alpha : 255);
 {$ENDIF}
 begin
 WriteToConsole(msgLoading + filename + '... ');
@@ -918,7 +918,7 @@
 	begin
 		s:= filename + '-lowres.png';
 		if (tmpsurf <> nil) then
-		begin 
+		begin
 			if ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then
 			begin
 				WriteLnToConsole('Image too big, trying to load lowres version: ' + s);
@@ -931,7 +931,7 @@
 			tmpsurf:= IMG_Load(Str2PChar(s))
 		end;
 	end;
-	
+
 if tmpsurf = nil then
 	begin
 	OutError(msgFailed, (imageFlags and ifCritical) <> 0);
--- a/hedgewars/uTeams.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uTeams.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -18,7 +18,7 @@
 
 unit uTeams;
 interface
-uses SDLh, uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears, 
+uses SDLh, uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears,
 {$IFDEF GLES11}
 	gles11,
 {$ELSE}
@@ -33,7 +33,7 @@
 	PHedgehog = ^THedgehog;
 	PTeam     = ^TTeam;
 	PClan     = ^TClan;
-	
+
 	THedgehog = record
 			Name: string[MAXNAMELEN];
 			Gear: PGear;
@@ -52,7 +52,7 @@
 			stats: TStatistics;
 			Hat: String;
 			end;
-			
+
 	TTeam = record
 			Clan: PClan;
 			TeamName: string[MAXNAMELEN];
@@ -75,7 +75,7 @@
 			hasGone: boolean;
 			voicepack: PVoicepack;
 			end;
-			
+
 	TClan = record
 			Color: Longword;
 			Teams: array[0..Pred(cMaxTeams)] of PTeam;
@@ -150,7 +150,7 @@
 					with Hedgehogs[i] do
 						if (Gear <> nil) then
 							Gear^.State:= gstWinner;
-		
+
 		AddCaption(s, $FFFFFF, capgrpGameState);
 		SendStat(siGameResult, s);
 		AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
@@ -295,7 +295,7 @@
 
 procedure RecountAllTeamsHealth;
 var t: LongInt;
-begin 
+begin
 for t:= 0 to Pred(TeamsCount) do
     RecountTeamHealth(TeamsArray[t])
 end;
@@ -344,7 +344,7 @@
 with team^ do
 	begin
 	NewTeamHealthBarWidth:= 0;
-	
+
 	if not hasGone then
 		for i:= 0 to cMaxHHIndex do
 			if Hedgehogs[i].Gear <> nil then
@@ -384,7 +384,7 @@
 	AddChatString('** '+ TeamName + ' is gone');
 	hasGone:= true
 	end;
-	
+
 RecountTeamHealth(TeamsArray[t])
 end;
 
--- a/hedgewars/uVisualGears.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uVisualGears.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -166,7 +166,7 @@
 begin
 	Gear^.X:= Gear^.X + (cWindSpeed * 100 + Gear^.dX) * Steps;
 	Gear^.Y:= Gear^.Y - cDrownSpeed * Steps;
-	
+
 	if (Gear^.FrameTicks <= Steps) or (hwRound(Gear^.Y) < cWaterLine) then
 		DeleteVisualGear(Gear)
 	else
@@ -334,9 +334,9 @@
 		exit
 		end;
 
-if cReducedQuality and 
-   (Kind <> vgtTeamHealthSorter) and 
-   (Kind <> vgtSmallDamageTag) and 
+if cReducedQuality and
+   (Kind <> vgtTeamHealthSorter) and
+   (Kind <> vgtSmallDamageTag) and
    (Kind <> vgtSpeechBubble) then
 	begin
 	AddVisualGear:= nil;
--- a/hedgewars/uWorld.pas	Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uWorld.pas	Thu Sep 10 15:29:28 2009 +0000
@@ -164,10 +164,10 @@
 		if (Ammo^[Slot, Pos].Count > 0) and (Ammo^[Slot, Pos].AmmoType <> amNothing) then
 		begin
 		DrawTexture(cScreenWidth div 2 - 200 + AMxShift, cScreenHeight - 68, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex);
-		
+
 		if Ammo^[Slot, Pos].Count < AMMO_INFINITE then
 			DrawTexture(cScreenWidth div 2 + AMxShift - 35, cScreenHeight - 68, CountTexz[Ammo^[Slot, Pos].Count]);
-		
+
 		if bSelected and (Ammoz[Ammo^[Slot, Pos].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber < 0) then
 			begin
 			bShowAmmoMenu:= false;
@@ -306,7 +306,7 @@
 	zoom:= zoom + 0.001 * Lag;
 	if ZoomValue < zoom then zoom:= ZoomValue
 	end;
-	
+
 // Sky
 glClear(GL_COLOR_BUFFER_BIT);
 glEnable(GL_BLEND);