hedgewars/uRandom.pas
changeset 130 19e3c16fb9f0
parent 124 75b892eff74d
child 136 89970b70b076
--- a/hedgewars/uRandom.pas	Sun Aug 27 13:38:05 2006 +0000
+++ b/hedgewars/uRandom.pas	Sun Aug 27 13:47:30 2006 +0000
@@ -40,7 +40,6 @@
 function  GetRandom(m: LongWord): LongWord; overload;
 
 implementation
-uses uMisc;
 var cirbuf: array[0..63] of Longword;
     n: byte = 54;
 
@@ -51,7 +50,6 @@
            (cirbuf[(n + 40) and $3F] +           {n - 24 mod 64}
             cirbuf[(n +  9) and $3F])            {n - 55 mod 64}
             and $7FFFFFFF;                       {mod 2^31}
-            
 Result:= cirbuf[n]
 end;
 
@@ -64,7 +62,9 @@
     cirbuf[i]:= byte(Seed[i + 1]) * (i + 1);
 
 for i:= Length(Seed) to 54 do
-    cirbuf[i]:= i * 7 + 1
+    cirbuf[i]:= i * 7 + 1;
+
+for i:= 0 to 1023 do GetNext
 end;
 
 function GetRandom: Double;