- Replaced water sprite
authorunc0rr
Wed, 25 Jan 2006 19:45:39 +0000
changeset 56 a29135563e94
parent 55 e09f7c952a40
child 57 e1a77ae57065
- Replaced water sprite - Many small ammo fixes - Increased speed of placing land objects - New land template
hedgewars/Data/Graphics/BlueWater.png
hedgewars/HHHandlers.inc
hedgewars/hwengine.dpr
hedgewars/uConsts.pas
hedgewars/uGears.pas
hedgewars/uLandObjects.pas
hedgewars/uLandTemplates.pas
hedgewars/uMisc.pas
hedgewars/uWorld.pas
Binary file hedgewars/Data/Graphics/BlueWater.png has changed
--- a/hedgewars/HHHandlers.inc	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/HHHandlers.inc	Wed Jan 25 19:45:39 2006 +0000
@@ -71,8 +71,8 @@
                          amSkip: TurnTimeLeft:= 0;
                    amPickHammer: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y) + cHHRadius, gtPickHammer, 0);
                          amRope: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y), gtRope, 0, xx, yy);
-                         amMine: AddGear(round(X) + Sign(dX) * 7, round(Y), gtMine, 0, Sign(dX) * 0.01, 0, 3000);
-                     amDynamite: AddGear(round(X) + Sign(dX) * 7, round(Y), gtDynamite, 0, Sign(dX) * 0.01, 0, 5000); 
+                         amMine: AddGear(round(X) + Sign(dX) * 7, round(Y), gtMine, 0, Sign(dX) * 0.02, 0, 3000);
+                     amDynamite: AddGear(round(X) + Sign(dX) * 7, round(Y), gtDynamite, 0, Sign(dX) * 0.035, 0, 5000); 
                   end;
         Power:= 0;
         if CurAmmoGear <> nil then
--- a/hedgewars/hwengine.dpr	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/hwengine.dpr	Wed Jan 25 19:45:39 2006 +0000
@@ -80,6 +80,7 @@
               AssignHHCoords;
               AddMiscGears;
               AdjustColor(cColorNearBlack);
+              AdjustColor(cWaterColor);
               AdjustColor(cWhiteColor);
               StoreLoad;
               AdjustColor(cConsoleSplitterColor);
--- a/hedgewars/uConsts.pas	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/uConsts.pas	Wed Jan 25 19:45:39 2006 +0000
@@ -286,7 +286,7 @@
                                    TimeAfterTurn: 3000),
                                   (Name: 'UFO';
                                    Ammo: (Propz: ammoprop_Power or ammoprop_NeedTarget;
-                                          Count: 4;
+                                          Count: 2;
                                           NumPerTurn: 0;
                                           Timer: 0;
                                           AmmoType: amUFO);
@@ -326,7 +326,7 @@
                                    TimeAfterTurn: 0),
                                   (Name: 'Mine';
                                    Ammo: (Propz: ammoprop_NoCrosshair;
-                                          Count: 5;
+                                          Count: 2;
                                           NumPerTurn: 0;
                                           Timer: 0;
                                           AmmoType: amMine);
@@ -342,7 +342,7 @@
                                    TimeAfterTurn: 3000),
                                    (Name: 'Dynamite';
                                     Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInJump or ammoprop_AttackInFall;
-                                           Count: 5;
+                                           Count: 1;
                                            NumPerTurn: 0;
                                            Timer: 0;
                                            AmmoType: amDynamite);
--- a/hedgewars/uGears.pas	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/uGears.pas	Wed Jan 25 19:45:39 2006 +0000
@@ -204,7 +204,7 @@
                 end;
     gtDynamite: begin
                 Result.Radius:= 3;
-                Result.Elasticity:= 0.03;
+                Result.Elasticity:= 0.55;
                 Result.Friction:= 0.03;
                 Result.Timer:= 5000;
                 end;
--- a/hedgewars/uLandObjects.pas	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/uLandObjects.pas	Wed Jan 25 19:45:39 2006 +0000
@@ -52,6 +52,7 @@
                     outland: array[1..MAXOBJECTRECTS] of TSDL_Rect;
                     rectcnt: Longword;
                     Width, Height: Longword;
+                    Maxcnt: Longword;
                     end;
 
 var Rects: PRectArray;
@@ -255,6 +256,11 @@
 cnt:= 0;
 with Obj do
      begin
+     if Maxcnt = 0 then
+        begin
+        Result:= false;
+        exit
+        end;
      x:= 0;
      repeat
          y:= 0;
@@ -280,7 +286,8 @@
         i:= getrandom(cnt);
         BlitImageAndGenerateCollisionInfo(ar[i].x, ar[i].y, Obj.Surf, Surface);
         AddRect(ar[i].x, ar[i].y, Width, Height);
-        end
+        dec(Maxcnt)
+        end else Maxcnt:= 0
      end
 end;
 
@@ -310,6 +317,7 @@
          Read(f, rectcnt);
          for ii:= 1 to rectcnt do
              with outland[ii] do Read(f, x, y, w, h);
+         Maxcnt:= 2;
          ReadLn(f)
          end;
     end;
--- a/hedgewars/uLandTemplates.pas	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/uLandTemplates.pas	Wed Jan 25 19:45:39 2006 +0000
@@ -325,13 +325,46 @@
        (x: 1608; y:  342),
        (x: 1641; y:  819),
        (x: 1719; y:  864),
-       (x: 1746; y: 1440)      );
+       (x: 1746; y: 1440)
+      );
       Template8FPoints: array[0..0] of TPoint =
       (
        (x: 1023; y:    0)
       );
 
-const EdgeTemplates: array[0..8] of TEdgeTemplate =
+const Template9Points: array[0..23] of TPoint =
+      (
+       (x:  384; y: 1488),
+       (x:  210; y: 1023),
+       (x:  213; y:  891),
+       (x:  501; y:  861),
+       (x:  228; y:  657),
+       (x:  558; y:  676),
+       (x:  561; y:  513),
+       (x:  246; y:  354),
+       (x:  609; y:  393),
+       (x:  876; y:  309),
+       (x:  759; y:  576),
+       (x:  759; y:  762),
+       (x: 1113; y:  750),
+       (x: 1128; y:  873),
+       (x: 1488; y:  870),
+       (x: 1473; y:  678),
+       (x: 1182; y:  501),
+       (x: 1515; y:  507),
+       (x: 1776; y:  393),
+       (x: 1668; y:  630),
+       (x: 1833; y:  714),
+       (x: 1674; y:  837),
+       (x: 1800; y: 1020),
+       (x: 1632; y: 1491)
+      );
+      Template9FPoints: array[0..0] of TPoint =
+      (
+       (x: 1023; y:    0)
+      );
+
+const EdgeTemplates: array[0..9] of TEdgeTemplate =
       (
        (BasePoints: @Template0Points;
         BasePointsCount: Succ(High(Template0Points));
@@ -422,6 +455,16 @@
        FillPoints: @Template8FPoints;
        FillPointsCount: Succ(High(Template8FPoints));
        canMirror: true; canFlip: false;
+      ),
+      (BasePoints: @Template9Points;
+       BasePointsCount: Succ(High(Template8Points));
+       BezPassCnt: 4;
+       PassMin: 17; PassDelta: 3;
+       WaveAmplMin:    10; WaveAmplDelta: 10;
+       WaveFreqMin: 0.010; WaveFreqDelta: 0.002;
+       FillPoints: @Template9FPoints;
+       FillPointsCount: Succ(High(Template9FPoints));
+       canMirror: true; canFlip: false;
       )
       );
 
--- a/hedgewars/uMisc.pas	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/uMisc.pas	Wed Jan 25 19:45:39 2006 +0000
@@ -63,7 +63,7 @@
     GameTicks     : LongWord = 0;
 
     cSkyColor     : Cardinal = 0;
-    cWaterColor   : Cardinal = $32397A;
+    cWaterColor   : Cardinal = $005ACE;
     cMapBackColor : Cardinal = $FFFFFF;
     cWhiteColor   : Cardinal = $FFFFFF;
     cConsoleSplitterColor : Cardinal = $FF0000;
--- a/hedgewars/uWorld.pas	Sat Jan 21 16:18:19 2006 +0000
+++ b/hedgewars/uWorld.pas	Wed Jan 25 19:45:39 2006 +0000
@@ -99,8 +99,8 @@
 
 // Waves
 {$WARNINGS OFF}
-for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy - 40, (((GameTicks shr 7) + 2) mod 12), Surface);
-for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 192) and $FF), cWaterLine + WorldDy - 30, (((GameTicks shr 7) + 8) mod 12), Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy - 64, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 192) and $FF), cWaterLine + WorldDy - 48, 0, Surface);
 {$WARNINGS ON}
 
 DrawLand(WorldDx, WorldDy, Surface);
@@ -150,9 +150,9 @@
 
 // Waves
 {$WARNINGS OFF}
-for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6) +  64) and $FF), cWaterLine + WorldDy - 20, (((GameTicks shr 7) + 4 ) mod 12), Surface);
-for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 128) and $FF), cWaterLine + WorldDy - 10, (((GameTicks shr 7) + 10) mod 12), Surface);
-for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy     , (((GameTicks shr 7) + 6 ) mod 12), Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6) +  64) and $FF), cWaterLine + WorldDy - 32, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 128) and $FF), cWaterLine + WorldDy - 16, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy     , 0, Surface);
 {$WARNINGS ON}
 
 if TurnTimeLeft <> 0 then