Changeset 531 for trunk/Database.pas


Ignore:
Timestamp:
Mar 27, 2024, 12:31:14 PM (8 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Database.pas

    r522 r531  
    559559procedure V21_to_Loc(Loc0: Integer; var VicinityLoc: TVicinity21Loc);
    560560var
    561   dx, dy, bit, y0, xComp, yComp, xComp0, xCompSwitch: Integer;
    562   dst: ^Integer;
     561  dx, dy, Bit, y0, xComp, yComp, xComp0, xCompSwitch: Integer;
     562  Dst: ^Integer;
    563563begin
    564564  y0 := Loc0 div lx;
     
    571571  xCompSwitch := xCompSwitch xor xComp0;
    572572  yComp := lx * (y0 - 3);
    573   dst := @VicinityLoc;
    574   bit := 1;
     573  Dst := @VicinityLoc;
     574  Bit := 1;
    575575  for dy := 0 to 6 do
    576576  begin
     
    579579    for dx := 0 to 3 do
    580580    begin
    581       if bit and $67F7F76 <> 0 then
    582         dst^ := xComp + yComp
     581      if Bit and $67F7F76 <> 0 then
     582        Dst^ := xComp + yComp
    583583      else
    584         dst^ := -1;
     584        Dst^ := -1;
    585585      Inc(xComp);
    586586      if xComp >= lx then
    587587        Dec(xComp, lx);
    588       Inc(dst);
    589       bit := bit shl 1;
     588      Inc(Dst);
     589      Bit := Bit shl 1;
    590590    end;
    591591    Inc(yComp, lx);
     
    13171317  Radius: TVicinity21Loc;
    13181318  Adjacent: TVicinity8Loc;
    1319   ok: Boolean;
     1319  Ok: Boolean;
    13201320
    13211321begin
     
    14141414    end;
    14151415
    1416     ok := True;
     1416    Ok := True;
    14171417    for C := 1 to nsc do
    14181418      if nCityLoc[C] < sccount[C] * (8 - MinGood) div (7 - MinGood) then
    1419         ok := False;
    1420   until ok;
     1419        Ok := False;
     1420  until Ok;
    14211421
    14221422  FineDistSQR := MapSize * LandMass * 9 div (nAlive * 100);
     
    14781478      end;
    14791479    end;
    1480     p1 := p1 + sccount[C]
     1480    p1 := p1 + sccount[C];
    14811481  end;
    14821482
     
    16031603  I, p1, Loc1, nAlive, nStartLoc0, nPrefStartLoc0, imax: Integer;
    16041604  StartLoc0: array [0 .. lxmax * lymax - 1] of Integer;
    1605   ishuman: Boolean;
     1605  IsHuman: Boolean;
    16061606begin
    16071607  nAlive := 0;
     
    16361636
    16371637  StartLoc[0] := 0;
    1638   for ishuman := True downto False do
     1638  for IsHuman := True downto False do
    16391639    for p1 := 0 to nPl - 1 do
    1640       if (1 shl p1 and GAlive <> 0) and ((1 shl p1 and Human <> 0) = ishuman)
     1640      if (1 shl p1 and GAlive <> 0) and ((1 shl p1 and Human <> 0) = IsHuman)
    16411641      then
    16421642      begin
     
    17901790
    17911791  TerritoryCount[nPl] := MapSize;
    1792   // fillchar(NewContact, sizeof(NewContact), false);
     1792  // FillChar(NewContact, SizeOf(NewContact), False);
    17931793end;
    17941794
     
    34873487  I: Integer;
    34883488  miSender, miTarget: TModelInfo;
    3489   ok: Boolean;
     3489  Ok: Boolean;
    34903490begin
    34913491  // only if target doesn't already have a model like this
    3492   ok := RW[pTarget].nModel < nmmax;
     3492  Ok := RW[pTarget].nModel < nmmax;
    34933493  MakeModelInfo(pSender, mix, RW[pSender].Model[mix], miSender);
    34943494  for I := 0 to RW[pTarget].nModel - 1 do
     
    34963496    MakeModelInfo(pTarget, I, RW[pTarget].Model[I], miTarget);
    34973497    if IsSameModel(miSender, miTarget) then
    3498       ok := False;
    3499   end;
    3500   if ok then
     3498      Ok := False;
     3499  end;
     3500  if Ok then
    35013501  begin
    35023502    RW[pTarget].Model[RW[pTarget].nModel] := RW[pSender].Model[mix];
Note: See TracChangeset for help on using the changeset viewer.