some whitespace fixes
authorsheepluva
Mon, 17 Nov 2014 15:25:24 +0100
changeset 10510 9329dab04490
parent 10509 d62d3c706947
child 10511 c33b2f001730
some whitespace fixes
hedgewars/uAI.pas
hedgewars/uAIMisc.pas
hedgewars/uCommandHandlers.pas
hedgewars/uGears.pas
hedgewars/uGearsHandlersMess.pas
hedgewars/uIO.pas
hedgewars/uInputHandler.pas
hedgewars/uLandGenPerlin.pas
hedgewars/uLandGenTemplateBased.pas
hedgewars/uLandGraphics.pas
hedgewars/uLandOutline.pas
hedgewars/uSound.pas
hedgewars/uStore.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt
--- a/hedgewars/uAI.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uAI.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -133,7 +133,7 @@
             if (Score > BadTurn) and (Actions.Score + Score > BestActions.Score) then
                 if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then
                     begin
-                    if useThisActions then 
+                    if useThisActions then
                         begin
                         BestActions.Count:= Actions.Count
                         end
@@ -161,9 +161,9 @@
                             AddAction(BestActions, aia_Weapon, Longword(amExtraDamage), 80, 0, 0);
                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
-                            end; 
+                            end;
                         end;
-    
+
                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
 
                     if (ap.Angle > 0) then
@@ -463,7 +463,7 @@
             BestActions.Count:= 0;
 
             FillBonuses(false);
-            
+
             if not bonuses.activity then
                 AddAction(BestActions, aia_Skip, 0, 250, 0, 0);
             end;
--- a/hedgewars/uAIMisc.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uAIMisc.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -236,7 +236,7 @@
 // avoid mines unless they are very likely to be duds, or are duds. also avoid if they are about to blow
             gtMine: begin
                 if (Gear^.State and gstMoving) <> 0 then bonuses.activity:= true;
-                
+
                 if ((Gear^.State and gstAttacking) = 0) and (((cMineDudPercent < 90) and (Gear^.Health <> 0))
                 or (isAfterAttack and (Gear^.Health = 0) and (Gear^.Damage > 30))) then
                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -50)
@@ -266,14 +266,14 @@
 
             gtHedgehog:
                 begin
-                if (ThinkingHH <> Gear) 
-                    and (((Gear^.State and (gstMoving or gstDrowning or gstHHDeath)) <> 0) 
+                if (ThinkingHH <> Gear)
+                    and (((Gear^.State and (gstMoving or gstDrowning or gstHHDeath)) <> 0)
                         or (Gear^.Health = 0)
-                        or (Gear^.Damage >= Gear^.Health)) 
+                        or (Gear^.Damage >= Gear^.Health))
                     then begin
                     bonuses.activity:= true;
                     end;
-                
+
                 if Gear^.Damage >= Gear^.Health then
                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)
                 else
--- a/hedgewars/uCommandHandlers.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uCommandHandlers.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -54,9 +54,9 @@
         GameState:= gsConfirm;
         end
     else
-        if GameState = gsConfirm then            
-            GameState:= prevGState;            
-            
+        if GameState = gsConfirm then
+            GameState:= prevGState;
+
     updateCursorVisibility;
 end;
 
--- a/hedgewars/uGears.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uGears.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -581,7 +581,7 @@
     Gear:= AddGear(0, 0, gtMine, 0, _0, _0, 0);
     FindPlace(Gear, false, 0, LAND_WIDTH);
 
-    if Gear = nil then 
+    if Gear = nil then
         inc(unplaced)
     else
         unplaced:= 0;
@@ -596,7 +596,7 @@
     Gear:= AddGear(0, 0, gtExplosives, 0, _0, _0, 0);
     FindPlace(Gear, false, 0, LAND_WIDTH);
 
-    if Gear = nil then 
+    if Gear = nil then
         inc(unplaced)
     else
         unplaced:= 0;
--- a/hedgewars/uGearsHandlersMess.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -3511,7 +3511,7 @@
             TurnTimeLeft:= 14 * 125;
             end;
 
-        if HHGear <> nil then 
+        if HHGear <> nil then
             HHGear^.Message := 0;
         ParseCommand('/taunt ' + #1, true)
         end
@@ -5555,9 +5555,9 @@
                         Power := GameTicks;
                         end
                     end
-                else if (Target.Y >= cWaterLine) or 
-                        ((Target.X and LAND_WIDTH_MASK = 0) and 
-                         (Target.Y+iceHeight+4 >= cWaterLine) and 
+                else if (Target.Y >= cWaterLine) or
+                        ((Target.X and LAND_WIDTH_MASK = 0) and
+                         (Target.Y+iceHeight+4 >= cWaterLine) and
                          (Land[Target.Y, Target.X] = lfIce)) then
                     begin
                     if Timer = iceWaitCollision then
--- a/hedgewars/uIO.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uIO.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -157,11 +157,11 @@
      'I': ParseCommand('pause server', true);
      's': if gameType = gmtNet then
              ParseChatCommand('chatmsg ', s, 2)
-          else 
+          else
              isProcessed:= false;
      'b': if gameType = gmtNet then
              ParseChatCommand('chatmsg ' + #4, s, 2)
-          else 
+          else
              isProcessed:= false;
      else
         isProcessed:= false;
--- a/hedgewars/uInputHandler.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uInputHandler.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -172,7 +172,7 @@
     if KeyDown then
         begin
         Trusted:= Trusted and (not isPaused); //releasing keys during pause should be allowed on the other hand
-                              
+
         if CurrentBinds[code] = 'switch' then
             LocalMessage:= LocalMessage or gmSwitch
         else if CurrentBinds[code] = '+precise' then
@@ -472,7 +472,7 @@
     b: byte;
 begin
     if cOnlyStats then exit;
-    
+
     AddFileLog('[BINDS] Loading binds from: ' + s);
 
     l:= '';
--- a/hedgewars/uLandGenPerlin.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uLandGenPerlin.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -15,7 +15,7 @@
 
 var p: array[0..511] of LongInt;
 
-const fadear: array[byte] of LongInt = 
+const fadear: array[byte] of LongInt =
 (0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 3, 4, 6, 7, 9, 10, 12,
 14, 17, 19, 22, 25, 29, 32, 36, 40, 45, 49, 54, 60, 65, 71,
 77, 84, 91, 98, 105, 113, 121, 130, 139, 148, 158, 167, 178,
@@ -44,7 +44,7 @@
 begin
     t0:= fadear[t shr 8];
 
-    if t0 = fadear[255] then 
+    if t0 = fadear[255] then
         t1:= t0
     else
         t1:= fadear[t shr 8 + 1];
@@ -176,7 +176,7 @@
             else if param1 = 0 then
                 Land[y, x]:= lfObjMask
             else
-                Land[y, x]:= lfBasic 
+                Land[y, x]:= lfBasic
         end;
     end;
 
--- a/hedgewars/uLandGenTemplateBased.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uLandGenTemplateBased.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -128,7 +128,7 @@
 
     // don't process too short segments or those which are too close to map borders
     if (p1.x = NTPX)
-            or (dab < minDistance * 3) 
+            or (dab < minDistance * 3)
             or (mp.x < LongInt(leftX) + mapBorderMargin)
             or (mp.x > LongInt(rightX) - mapBorderMargin)
             or (mp.y < LongInt(topY) + mapBorderMargin)
@@ -343,7 +343,7 @@
     for y:= 0 to LAND_HEIGHT - 1 do
         for x:= 0 to LAND_WIDTH - 1 do
             Land[y, x]:= lfBasic;
-    
+
     minDistance:= sqr(cFeatureSize) div 8 + 10;
     //dabDiv:= getRandom(41)+60;
     //dabDiv:= getRandom(31)+70;
@@ -355,7 +355,7 @@
     leftX:= (LAND_WIDTH - playWidth) div 2;
     rightX:= Pred(leftX + playWidth);
     topY:= LAND_HEIGHT - playHeight;
-    
+
     {$HINTS OFF}
     SetPoints(Template, pa, @fps);
     {$HINTS ON}
--- a/hedgewars/uLandGraphics.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uLandGraphics.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -660,14 +660,14 @@
         begin
         for x:= 0 to Pred(w) do
             if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then
-                if (outOfMap and 
+                if (outOfMap and
                    ((cpY + y) < LAND_HEIGHT) and ((cpY + y) >= 0) and
                    ((cpX + x) < LAND_WIDTH) and ((cpX + x) >= 0) and
                    ((not force) and (Land[cpY + y, cpX + x] <> 0))) or
 
                    (not outOfMap and
                        (((cpY + y) <= Longint(topY)) or ((cpY + y) >= LAND_HEIGHT) or
-                       ((cpX + x) <= Longint(leftX)) or ((cpX + x) >= Longint(rightX)) or 
+                       ((cpX + x) <= Longint(leftX)) or ((cpX + x) >= Longint(rightX)) or
                        ((not force) and (Land[cpY + y, cpX + x] <> 0)))) then
                    begin
                    if SDL_MustLock(Image) then
@@ -1095,21 +1095,21 @@
 begin
     DrawDots:= 0;
 
-    if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x + xx] <> Color) then 
+    if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x + xx] <> Color) then
         begin inc(DrawDots); Land[y + yy, x + xx]:= Color; end;
-    if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y - yy) and LAND_HEIGHT_MASK) = 0) and (Land[y - yy, x + xx] <> Color) then 
+    if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y - yy) and LAND_HEIGHT_MASK) = 0) and (Land[y - yy, x + xx] <> Color) then
         begin inc(DrawDots); Land[y - yy, x + xx]:= Color; end;
-    if (((x - xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x - xx] <> Color) then 
+    if (((x - xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x - xx] <> Color) then
         begin inc(DrawDots); Land[y + yy, x - xx]:= Color; end;
-    if (((x - xx) and LAND_WIDTH_MASK) = 0) and (((y - yy) and LAND_HEIGHT_MASK) = 0) and (Land[y - yy, x - xx] <> Color) then 
+    if (((x - xx) and LAND_WIDTH_MASK) = 0) and (((y - yy) and LAND_HEIGHT_MASK) = 0) and (Land[y - yy, x - xx] <> Color) then
         begin inc(DrawDots); Land[y - yy, x - xx]:= Color; end;
-    if (((x + yy) and LAND_WIDTH_MASK) = 0) and (((y + xx) and LAND_HEIGHT_MASK) = 0) and (Land[y + xx, x + yy] <> Color) then 
+    if (((x + yy) and LAND_WIDTH_MASK) = 0) and (((y + xx) and LAND_HEIGHT_MASK) = 0) and (Land[y + xx, x + yy] <> Color) then
         begin inc(DrawDots); Land[y + xx, x + yy]:= Color; end;
-    if (((x + yy) and LAND_WIDTH_MASK) = 0) and (((y - xx) and LAND_HEIGHT_MASK) = 0) and (Land[y - xx, x + yy] <> Color) then 
+    if (((x + yy) and LAND_WIDTH_MASK) = 0) and (((y - xx) and LAND_HEIGHT_MASK) = 0) and (Land[y - xx, x + yy] <> Color) then
         begin inc(DrawDots); Land[y - xx, x + yy]:= Color; end;
-    if (((x - yy) and LAND_WIDTH_MASK) = 0) and (((y + xx) and LAND_HEIGHT_MASK) = 0) and (Land[y + xx, x - yy] <> Color) then 
+    if (((x - yy) and LAND_WIDTH_MASK) = 0) and (((y + xx) and LAND_HEIGHT_MASK) = 0) and (Land[y + xx, x - yy] <> Color) then
         begin inc(DrawDots); Land[y + xx, x - yy]:= Color; end;
-    if (((x - yy) and LAND_WIDTH_MASK) = 0) and (((y - xx) and LAND_HEIGHT_MASK) = 0) and (Land[y - xx, x - yy] <> Color) then 
+    if (((x - yy) and LAND_WIDTH_MASK) = 0) and (((y - xx) and LAND_HEIGHT_MASK) = 0) and (Land[y - xx, x - yy] <> Color) then
         begin inc(DrawDots); Land[y - xx, x - yy]:= Color; end;
 end;
 
--- a/hedgewars/uLandOutline.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uLandOutline.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -124,14 +124,14 @@
         begin
         d:= DistanceI(p2.X - p1.X, p2.Y - p1.Y);
         d1:= DistanceI(p2.X - p3.X, p2.Y - p3.Y);
-        
+
         if d1 < d then
             d:= d1;
         if d2 < d then
             d:= d2;
 
         d2:= d * _1div3 / d2;
-        
+
         Vx:= Vx * d2;
         Vy:= Vy * d2
         end
--- a/hedgewars/uSound.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uSound.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -558,7 +558,7 @@
 begin
     if (MusicFN = '') or (not isMusicEnabled) then
         exit;
-    if SuddenDeath and (SDMusicFN <> '') then 
+    if SuddenDeath and (SDMusicFN <> '') then
          s:= '/Music/' + SDMusicFN
     else s:= '/Music/' + MusicFN;
     WriteToConsole(msgLoading + s + ' ');
--- a/hedgewars/uStore.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uStore.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -360,7 +360,7 @@
             WriteLnToConsole(msgOK)
             end;
 
-if not cOnlyStats then 
+if not cOnlyStats then
     begin
     MakeCrossHairs;
     LoadGraves;
@@ -368,7 +368,7 @@
     ChefHatTexture:= Surface2Tex(tmpHatSurf, true);
     freeTmpHatSurf();
     end;
-    
+
 if not reload then
     AddProgress;
 
@@ -377,10 +377,10 @@
         // FIXME - add a sprite attribute to match on rq flags?
         if (((cReducedQuality and (rqNoBackground or rqLowRes)) = 0) or   // why rqLowRes?
                 (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR])))
-           and (((cReducedQuality and rqPlainSplash) = 0) or ((not (ii in [sprSplash, sprDroplet, sprSDSplash, sprSDDroplet])))) 
+           and (((cReducedQuality and rqPlainSplash) = 0) or ((not (ii in [sprSplash, sprDroplet, sprSDSplash, sprSDDroplet]))))
            and (((cReducedQuality and rqKillFlakes) = 0) or cSnow or ((not (ii in [sprFlake, sprSDFlake]))))
            and ((cCloudsNumber > 0) or (ii <> sprCloud))
-           and ((vobCount > 0) or (ii <> sprFlake)) 
+           and ((vobCount > 0) or (ii <> sprFlake))
            and (savesurf or (not cOnlyStats)) // in stats-only only load those which are needed later
             then
             begin
--- a/hedgewars/uWorld.pas	Sun Nov 16 22:23:28 2014 +0100
+++ b/hedgewars/uWorld.pas	Mon Nov 17 15:25:24 2014 +0100
@@ -2041,7 +2041,7 @@
 end;
 
 procedure updateCursorVisibility;
-begin       
+begin
     if isPaused or isAFK then
         SDL_ShowCursor(1)
     else
--- a/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt	Sun Nov 16 22:23:28 2014 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt	Mon Nov 17 15:25:24 2014 +0100
@@ -5,5 +5,5 @@
 install(FILES
     ${luafiles}
     ${cfgfiles}
-	${hwpfiles}
+    ${hwpfiles}
     DESTINATION ${SHAREPATH}Data/Scripts/Multiplayer)