Ignore:
Timestamp:
Nov 30, 2023, 10:16:14 PM (12 months ago)
Author:
chronos
Message:
  • Modified: Updated high dpi branch from trunk.
  • Modified: Use generics.collections instead of fgl.
  • Modified: Compile with Delphi syntax.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/AI/StdAI/StdAI.lpr

    r303 r465  
    1212var
    1313  AIList: array[0..nPl - 1] of TCustomAI;
    14   Defender: integer;
     14  Defender: Integer;
    1515
    1616
    17   procedure Client(Command, Player: integer; var Data); stdcall;
     17  procedure Client(Command, Player: Integer; var Data); stdcall;
    1818  var
    19     p, y0, ToLoc: integer;
     19    P, y0, ToLoc: Integer;
    2020    UnitInfo: TUnitInfo;
    2121  begin
     
    3232{$ENDIF}
    3333        CustomAI.Init(TNewGameData(Data));
    34         for p := nPl - 1 downto 0 do
    35           if G.RO[p] <> nil then
     34        for P := nPl - 1 downto 0 do
     35          if G.RO[P] <> nil then
    3636          begin
    37             AIList[p] := TAI.Create(p);
    38             AIList[p].SetDataDefaults;
     37            AIList[P] := TAI.Create(P);
     38            AIList[P].SetDataDefaults;
    3939          end
    4040          else
    41             AIList[p] := nil;
     41            AIList[P] := nil;
    4242        Defender := -1;
    4343      end;
    4444      cGetReady:
    45         for p := nPl - 1 downto 0 do
    46           if AIList[p] <> nil then
    47             AIList[p].SetDataRandom;
     45        for P := nPl - 1 downto 0 do
     46          if AIList[P] <> nil then
     47            AIList[P].SetDataRandom;
    4848      cBreakGame:
    49         for p := 0 to nPl - 1 do
    50           if AIList[p] <> nil then
    51             AIList[p].Free;
     49        for P := 0 to nPl - 1 do
     50          if AIList[P] <> nil then
     51            AIList[P].Free;
    5252
    5353      cTurn, cContinue, scContact..scDipBreak, cShowEndContact:
Note: See TracChangeset for help on using the changeset viewer.