Changeset 120 for trunk/LocalPlayer


Ignore:
Timestamp:
Feb 3, 2018, 5:03:31 PM (7 years ago)
Author:
chronos
Message:
  • Added: Special Delphi random number generator algorithm. It is needed to correctly open stored books. Saved games depends on stored randseed and random generator algorithm which is pretty bad design.
Location:
trunk/LocalPlayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Diagram.pas

    r113 r120  
    6868
    6969    // stars
    70     RandSeed := Player * 11111;
     70    DelphiRandSeed := Player * 11111;
    7171    for i := 1 to Width - 16 do
    7272    begin
    73       x := Random((Width - 16) * 200);
    74       r := Random(13) + 28;
     73      x := DelphiRandom((Width - 16) * 200);
     74      r := DelphiRandom(13) + 28;
    7575      Canvas.Pixels[x div 200 + 8, x mod 200 + Top] :=
    7676        (r * r * r * r div 10001) * $10101;
  • trunk/LocalPlayer/Term.pas

    r118 r120  
    13221322      begin
    13231323        inc(CountBest);
    1324         if random(CountBest) = 0 then
     1324        if DelphiRandom(CountBest) = 0 then
    13251325          result := j
    13261326      end
     
    35023502    AILogo[i] := nil;
    35033503  Canvas.Font.Assign(UniFont[ftSmall]);
    3504   InitButtons();
     3504  InitButtons;
    35053505  EOT.Template := Templates;
    35063506end;
Note: See TracChangeset for help on using the changeset viewer.