- One more land template
authorunc0rr
Sun, 27 May 2007 17:33:06 +0000
changeset 527 e23490ce1f06
parent 526 e3689572bb15
child 528 54fd6924de4e
- One more land template - Random number generator is initialized also by protocol version - Better loading progress sprite
hedgewars/uLandTemplates.pas
hedgewars/uRandom.pas
share/hedgewars/Data/Graphics/Progress.png
--- a/hedgewars/uLandTemplates.pas	Sun May 27 13:53:41 2007 +0000
+++ b/hedgewars/uLandTemplates.pas	Sun May 27 17:33:06 2007 +0000
@@ -324,7 +324,25 @@
        (x: 1023; y:    0)
       );
 
-const EdgeTemplates: array[0..10] of TEdgeTemplate =
+const Template11Points: array[0..9] of TSDL_Rect =
+      (
+       (x:  274; y: 1024; w:  166; h:    1),
+       (x:  330; y:  862; w:   96; h:   92),
+       (x:  492; y:  690; w:  152; h:  250),
+       (x:  746; y:  646; w:   36; h:  270),
+       (x:  938; y:  626; w:   54; h:  224),
+       (x: 1134; y:  646; w:   44; h:  216),
+       (x: 1292; y:  630; w:   46; h:  300),
+       (x: 1448; y:  664; w:  158; h:  272),
+       (x: 1584; y: 1024; w:  136; h:    1),
+       (x: NTPX; y:    0; w:    1; h:    1)
+      );
+      Template11FPoints: array[0..0] of TPoint =
+      (
+       (x: 1023; y:    0)
+      );
+
+const EdgeTemplates: array[0..11] of TEdgeTemplate =
       (
        (BasePoints: @Template0Points;
         BasePointsCount: Succ(High(Template0Points));
@@ -413,6 +431,14 @@
         BezierizeCount: 3;
         RandPassesCount: 2;
         canMirror: true; canFlip: false;
+       ),
+       (BasePoints: @Template11Points;
+        BasePointsCount: Succ(High(Template11Points));
+        FillPoints: @Template11FPoints;
+        FillPointsCount: Succ(High(Template11FPoints));
+        BezierizeCount: 2;
+        RandPassesCount: 5;
+        canMirror: true; canFlip: false;
        )
       );
 
--- a/hedgewars/uRandom.pas	Sun May 27 13:53:41 2007 +0000
+++ b/hedgewars/uRandom.pas	Sun May 27 17:33:06 2007 +0000
@@ -20,6 +20,7 @@
 interface
 uses uFloat;
 {$INCLUDE options.inc}
+{$INCLUDE proto.inc}
 
 procedure SetRandomSeed(Seed: shortstring);
 function  GetRandom: hwFloat; overload;
@@ -47,11 +48,11 @@
 
 if Length(Seed) > 54 then Seed:= copy(Seed, 1, 54); // not 55 to ensure we have odd numbers in cirbuf
 
-for i:= 1 to Length(Seed) do
-    cirbuf[i - 1]:= byte(Seed[i]) * (i * 2 + 7);
+for i:= 0 to Pred(Length(Seed)) do
+    cirbuf[i]:= byte(Seed[i + 1]);
 
 for i:= Length(Seed) to 54 do
-    cirbuf[i]:= i * 7 + 1;
+    cirbuf[i]:= $A98765 + (cNetProtoVersion * 2); // odd number
 
 for i:= 0 to 1023 do GetNext
 end;
Binary file share/hedgewars/Data/Graphics/Progress.png has changed