Changeset 591 for trunk/Database.pas


Ignore:
Timestamp:
Jul 24, 2024, 11:02:31 PM (8 weeks ago)
Author:
chronos
Message:
  • Modified: Draw graphical preview for maps which doesn't have associated image.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Database.pas

    r590 r591  
    598598}
    599599var
    600   primitive: Integer;
     600  Primitive: Integer;
    601601  StartLoc, StartLoc2: array [0 .. nPl - 1] of Integer; { starting coordinates }
    602602  Elevation: array [0 .. lxmax * lymax - 1] of Byte; { map elevation }
     
    607607  I, J: Integer;
    608608begin
    609   primitive := 1;
     609  Primitive := 1;
    610610  I := 2;
    611611  while I * I <= MapSize + 1 do // test whether prime
    612612  begin
    613613    if (MapSize + 1) mod I = 0 then
    614       primitive := 0;
     614      Primitive := 0;
    615615    Inc(I);
    616616  end;
    617617
    618   if primitive > 0 then
     618  if Primitive > 0 then
    619619    repeat
    620       Inc(primitive);
     620      Inc(Primitive);
    621621      I := 1;
    622622      J := 0;
    623623      repeat
    624624        Inc(J);
    625         I := I * primitive mod (MapSize + 1);
     625        I := I * Primitive mod (MapSize + 1);
    626626      until (I = 1) or (J = MapSize + 1);
    627627    until J = MapSize;
     
    630630function MapGeneratorAvailable: Boolean;
    631631begin
    632   Result := (primitive > 0) and (lx >= 20) and (ly >= 40);
     632  Result := (Primitive > 0) and (lx >= 20) and (ly >= 40);
    633633end;
    634634
     
    11551155        (Loc0 < MapSize - lx) then
    11561156        RunRiver(Loc0);
    1157       Loc0 := (Loc0 + 1) * primitive mod (MapSize + 1) - 1;
     1157      Loc0 := (Loc0 + 1) * Primitive mod (MapSize + 1) - 1;
    11581158    end;
    11591159  end;
     
    14131413        end;
    14141414      end;
    1415       Loc := (Loc + 1) * primitive mod (MapSize + 1) - 1;
     1415      Loc := (Loc + 1) * Primitive mod (MapSize + 1) - 1;
    14161416    end;
    14171417
Note: See TracChangeset for help on using the changeset viewer.