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/AI/StdAI/ToolAI.pas

    r522 r531  
    355355  UnitsToAssign: Boolean;
    356356  Adjacent: TVicinity8Loc;
    357   SettlerOfJobLoc, DistToLoc: array[0..lxmax * lymax - 1] of smallint;
     357  SettlerOfJobLoc, DistToLoc: array[0..lxmax * lymax - 1] of SmallInt;
    358358  // DistToLoc is only defined where SettlerOfJobLoc>=0
    359359  TileChecked: array[0..lxmax * lymax - 1] of Boolean;
     
    471471  I, J, Loc, Loc1, V8, Count, Kind, MostIndex: Integer;
    472472  Adjacent: TVicinity8Loc;
    473   IndexOfID: array[0..lxmax * lymax - 1] of smallint;
    474   IDOfIndex: array[0..lxmax * lymax div 2 - 1] of smallint;
     473  IndexOfID: array[0..lxmax * lymax - 1] of SmallInt;
     474  IDOfIndex: array[0..lxmax * lymax div 2 - 1] of SmallInt;
    475475begin
    476476  FillChar(District, MapSize * 4, $FF);
     
    11071107  nSelectedLoad, F, OriginContinent, A, B: Integer;
    11081108  CompleteFlag, NotReachedFlag, ContinueUnit: Cardinal;
    1109   IsComplete, ok, IsFirstLoc: Boolean;
     1109  IsComplete, Ok, IsFirstLoc: Boolean;
    11101110  StartLocPtr, ArrivedEnd: pinteger;
    11111111  Adjacent: TVicinity8Loc;
     
    11131113  tuixSelectedLoad: array[0..15] of Integer;
    11141114  Arrived: array[0..lxmax * lymax] of Cardinal;
    1115   ResponsibleTransport: array[0..lxmax * lymax - 1] of smallint;
     1115  ResponsibleTransport: array[0..lxmax * lymax - 1] of SmallInt;
    11161116  TurnsBeforeLoad: array[0..lxmax * lymax - 1] of ShortInt;
    11171117  GroupComplete: array[0..lxmax * lymax - 1] of Boolean;
     
    11911191    FillChar(ResponsibleTransport, MapSize * 2, $FF); // -1
    11921192    FillChar(TurnsBeforeLoad, MapSize, $FF); // -1
    1193     ok := False;
     1193    Ok := False;
    11941194    for uix := 0 to RO.nUn - 1 do
    11951195      if TransportAvailable[uix] > 0 then
    11961196      begin
    1197         ok := True;
     1197        Ok := True;
    11981198        Pile.Put(MyUnit[uix].Loc, ($800 - MyUnit[uix].Movement) shl 12 + uix);
    11991199      end;
    1200     if not ok then // no transports
     1200    if not Ok then // no transports
    12011201    begin
    12021202      TransportPlan.LoadLoc := -1;
     
    13921392            begin
    13931393              Arrived[Loc0] := (Arrived[Loc0] or CompleteFlag) and not NotReachedFlag;
    1394               continue;
     1394              Continue;
    13951395            end;
    13961396            IsComplete := True;
     
    14001400              if Loc1 >= 0 then
    14011401              begin
    1402                 ok := False;
     1402                Ok := False;
    14031403                case CheckStep(MoveStyle, Time0, V8 and 1, ArriveTime,
    14041404                    RecoverTurns, Map[Loc0], Map[Loc1], False) of
    1405                   csOk: ok := True;
     1405                  csOk: Ok := True;
    14061406                  csForbiddenTile:
    14071407                    ;// !!! don't check moving there again
    14081408                  csCheckTerritory:
    1409                     ok := RO.Territory[Loc1] = RO.Territory[Loc0];
     1409                    Ok := RO.Territory[Loc1] = RO.Territory[Loc0];
    14101410                end;
    1411                 if ok and Pile.TestPut(Loc1, ArriveTime) then
     1411                if Ok and Pile.TestPut(Loc1, ArriveTime) then
    14121412                  if ArriveTime < $2000 then
    14131413                    Pile.Put(Loc1, ArriveTime)
Note: See TracChangeset for help on using the changeset viewer.