This commit changes many aspect of our cmake build system
authorkoda
Mon, 17 Jun 2013 17:40:01 +0200
changeset 9234 2bf3796c5855
parent 9195 e653e96b0ec3 (diff)
parent 9233 a6ae0286787c (current diff)
child 9235 1c1580c37876
This commit changes many aspect of our cmake build system - shared libraries are compiled by default: * this modifies RPATH of unix executables; * this will prevent a lot of linking issues, esp. from pascal world; * the old behaviour (static libs) is still available with -DBUILD_SHARED_LIBS=off; * of course in this case you have to provide the full list of dependencies with FPFLAGS and CMAKE_C_FLAGS; - pascal is now fully integrated with cmake, meaning you can just do add_sources and use CMAKE_Pascal_FLAGS: * some of the language features are only partially implemented, for example .inc files will not get rebuilt if you modify them; * target_link_libraries for pascal targets is just dummy as linking is determined within pascal files; * universal builds for osx are not available any more; - bundled libraries and system libraries are addressed using the target name: * this avoids depedency tracking; * this allows to name output as we wish.
cmake_modules/FindFreePascal.cmake
cmake_modules/FindGMP.cmake
cmake_modules/FindLibraryWithDebug.cmake
hedgewars/SDLMain.h
hedgewars/SDLMain.m
hedgewars/avwrapper.c
--- a/gameServer/Actions.hs	Fri Jun 14 15:58:58 2013 +0200
+++ b/gameServer/Actions.hs	Mon Jun 17 17:40:01 2013 +0200
@@ -174,8 +174,12 @@
 
     chans <- liftM (map sendChan) $ roomClientsS ri
     clNick <- client's nick
+    allClientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS
 
-    processAction $ AnswerClients chans ["JOINED", clNick]
+    mapM_ processAction [
+        AnswerClients chans ["JOINED", clNick]
+        , AnswerClients allClientsChans ["CLIENT_FLAGS", "+i", clNick]
+        ]
 
 
 processAction (MoveToLobby msg) = do
@@ -196,6 +200,9 @@
         else
         mapM_ processAction [RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]]
 
+    allClientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS
+    processAction $ AnswerClients allClientsChans ["CLIENT_FLAGS", "-i", clNick]
+
     -- when not removing room
     ready <- client's isReady
     when (not master || playersNum > 1) . io $ do
--- a/hedgewars/uGearsList.pas	Fri Jun 14 15:58:58 2013 +0200
+++ b/hedgewars/uGearsList.pas	Mon Jun 17 17:40:01 2013 +0200
@@ -265,7 +265,7 @@
                         end;
                     State:= State or gstInvisible;
                     Health:= random(vobFrameTicks);
-                    Timer:= random(vobFramesCount);
+                    if gear^.Timer = 0 then Timer:= random(vobFramesCount);
                     Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8;
                     end
                 end;
@@ -277,7 +277,7 @@
                 end;
          gtBee: begin
                 gear^.Radius:= 5;
-                gear^.Timer:= 500;
+                if gear^.Timer = 0 then gear^.Timer:= 500;
                 gear^.RenderTimer:= true;
                 gear^.Elasticity:= _0_9;
                 gear^.Tag:= 0;
@@ -286,16 +286,16 @@
                 gear^.Radius:= 250;
                 end;
  gtShotgunShot: begin
-                gear^.Timer:= 900;
+                if gear^.Timer = 0 then gear^.Timer:= 900;
                 gear^.Radius:= 2
                 end;
   gtPickHammer: begin
                 gear^.Radius:= 10;
-                gear^.Timer:= 4000
+                if gear^.Timer = 0 then gear^.Timer:= 4000
                 end;
    gtHammerHit: begin
                 gear^.Radius:= 8;
-                gear^.Timer:= 125
+                if gear^.Timer = 0 then gear^.Timer:= 125
                 end;
         gtRope: begin
                 gear^.Radius:= 3;
@@ -311,10 +311,13 @@
                 gear^.Elasticity:= _0_55;
                 gear^.Friction:= _0_995;
                 gear^.Density:= _1;
-                if cMinesTime < 0 then
-                    gear^.Timer:= getrandom(51)*100
-                else
-                    gear^.Timer:= cMinesTime;
+                if gear^.Timer = 0 then
+                    begin
+                    if cMinesTime < 0 then
+                        gear^.Timer:= getrandom(51)*100
+                    else
+                        gear^.Timer:= cMinesTime
+                    end
                 end;
        gtSMine: begin
                 gear^.Health:= 10;
@@ -323,7 +326,7 @@
                 gear^.Elasticity:= _0_55;
                 gear^.Friction:= _0_995;
                 gear^.Density:= _1_6;
-                gear^.Timer:= 500;
+                if gear^.Timer = 0 then gear^.Timer:= 500;
                 end;
        gtKnife: begin
                 gear^.Density:= _4;
@@ -334,7 +337,7 @@
                 gear^.nImpactSounds:= 1;
                 gear^.Radius:= 16;
                 gear^.Elasticity:= _0_3;
-                gear^.Timer:= 500
+                if gear^.Timer = 0 then gear^.Timer:= 500
                 end;
   gtExplosives: begin
                 gear^.ImpactSound:= sndGrenadeImpact;
@@ -359,7 +362,7 @@
                 gear^.Elasticity:= _0_55;
                 gear^.Friction:= _0_03;
                 gear^.Density:= _2;
-                gear^.Timer:= 5000;
+                if gear^.Timer = 0 then gear^.Timer:= 5000;
                 end;
      gtCluster: begin
                 gear^.Radius:= 2;
@@ -389,7 +392,7 @@
                 end;
    gtBlowTorch: begin
                 gear^.Radius:= cHHRadius + cBlowTorchC;
-                gear^.Timer:= 7500
+                if gear^.Timer = 0 then gear^.Timer:= 7500
                 end;
     gtSwitcher: begin
                 gear^.Z:= cCurrHHZ
@@ -399,10 +402,8 @@
                 gear^.nImpactSounds:= 1;
                 gear^.Radius:= 10;
                 gear^.Elasticity:= _0_3;
-                gear^.Timer:= 0
                 end;
       gtTardis: begin
-                gear^.Timer:= 0;
                 gear^.Pos:= 1;
                 gear^.Z:= cCurrHHZ+1;
                 end;
@@ -438,7 +439,7 @@
                 gear^.Friction:= _0_96;
                 gear^.Density:= _1_5;
                 gear^.RenderTimer:= true;
-                gear^.Timer:= 5000
+                if gear^.Timer = 0 then gear^.Timer:= 5000
                 end;
        gtDrill: begin
                 if gear^.Timer = 0 then
@@ -454,23 +455,23 @@
                 gear^.AdvBounce:= 1;
                 gear^.Radius:= 5;
                 gear^.Tag:= random(8);
-                gear^.Timer:= 5000;
+                if gear^.Timer = 0 then gear^.Timer:= 5000;
                 gear^.Elasticity:= _0_7;
                 gear^.Friction:= _0_995;
                 gear^.Density:= _1_5;
                 end;
      gtBallgun: begin
-                gear^.Timer:= 5001;
+                if gear^.Timer = 0 then gear^.Timer:= 5001;
                 end;
      gtRCPlane: begin
-                gear^.Timer:= 15000;
+                if gear^.Timer = 0 then gear^.Timer:= 15000;
                 gear^.Health:= 3;
                 gear^.Radius:= 8
                 end;
      gtJetpack: begin
                 gear^.Health:= 2000;
                 gear^.Damage:= 100;
-                gear^.State:= gstSubmersible
+                gear^.State:= Gear^.State or gstSubmersible
                 end;
      gtMolotov: begin
                 gear^.Radius:= 6;
@@ -478,7 +479,6 @@
                 end;
        gtBirdy: begin
                 gear^.Radius:= 16; // todo: check
-                gear^.Timer:= 0;
                 gear^.Health := 2000;
                 gear^.FlightTime := 2;
                 end;
@@ -511,18 +511,18 @@
                 end;
 gtFlamethrower: begin
                 gear^.Tag:= 10;
-                gear^.Timer:= 10;
+                if gear^.Timer = 0 then gear^.Timer:= 10;
                 gear^.Health:= 500;
                 gear^.Damage:= 100;
                 end;
      gtLandGun: begin
                 gear^.Tag:= 10;
-                gear^.Timer:= 10;
+                if gear^.Timer = 0 then gear^.Timer:= 10;
                 gear^.Health:= 1000;
                 gear^.Damage:= 100;
                 end;
  gtPoisonCloud: begin
-                gear^.Timer:= 5000;
+                if gear^.Timer = 0 then gear^.Timer:= 5000;
                 gear^.dY:= int2hwfloat(-4 + longint(getRandom(8))) / 1000;
                 end;
  gtResurrector: begin
@@ -533,7 +533,7 @@
                 gear^.Tag := 47;
                 end;
   gtNapalmBomb: begin
-                gear^.Timer:= 1000;
+                if gear^.Timer = 0 then gear^.Timer:= 1000;
                 gear^.Radius:= 5;
                 gear^.Density:= _1_5;
                 end;