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

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityType.pas

    r530 r531  
    2323    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    2424    procedure DeleteBtnClick(Sender: TObject);
    25   public
    26     procedure ShowNewContent(NewMode: TWindowMode);
    2725  protected
    2826    procedure OffscreenPaint; override;
     
    3028    nPool, dragiix, ctype: Integer;
    3129    Pooliix: array [0 .. nImp - 1] of Integer;
    32     listed: Set of 0 .. nImp;
     30    Listed: set of 0 .. nImp;
    3331    Changed: Boolean;
    3432    procedure LoadType(NewType: Integer);
    3533    procedure SaveType;
     34  public
     35    procedure ShowNewContent(NewMode: TWindowMode);
    3636  end;
    3737
     
    158158  nPool := 0;
    159159  for iix := nWonder to nImp - 1 do
    160     if not(iix in listed) and (Imp[iix].Kind = ikCommon) and (iix <> imTrGoods)
     160    if not(iix in Listed) and (Imp[iix].Kind = ikCommon) and (iix <> imTrGoods)
    161161      and (Imp[iix].Preq <> preNA) and
    162162      ((Imp[iix].Preq = preNone) or (MyRO.Tech[Imp[iix].Preq] >= tsApplicable))
     
    195195begin
    196196  ctype := NewType;
    197   listed := [];
     197  Listed := [];
    198198  I := 0;
    199199  while MyData.ImpOrder[ctype, I] >= 0 do
    200200  begin
    201     Include(listed, MyData.ImpOrder[ctype, I]);
     201    Include(Listed, MyData.ImpOrder[ctype, I]);
    202202    Inc(I);
    203203  end;
     
    295295    Assert(MyData.ImpOrder[ctype, I] = iix);
    296296    Move(MyData.ImpOrder[ctype, I + 1], MyData.ImpOrder[ctype, I], nImp - I);
    297     Exclude(listed, iix);
     297    Exclude(Listed, iix);
    298298  end;
    299299
     
    308308      (Y < yList + nListRow * 32) then
    309309    begin
    310       if dragiix in listed then
     310      if dragiix in Listed then
    311311        UnList(dragiix);
    312312      I := (X - xList) div 42 + (Y - yList) div 32 * nListCol;
     
    316316        nImp - I - 1);
    317317      MyData.ImpOrder[ctype, I] := dragiix;
    318       Include(listed, dragiix);
     318      Include(Listed, dragiix);
    319319      Changed := True;
    320320    end
    321     else if (dragiix in listed) and (X >= xPool) and (X < xPool + nPoolCol * 42)
     321    else if (dragiix in Listed) and (X >= xPool) and (X < xPool + nPoolCol * 42)
    322322      and (Y >= yPool) and (Y < yPool + nPoolRow * 32) then
    323323    begin
     
    340340begin
    341341  FillChar(MyData.ImpOrder[ctype], SizeOf(MyData.ImpOrder[ctype]), Byte(-1));
    342   listed := [];
     342  Listed := [];
    343343  Changed := True;
    344344  SmartUpdateContent;
Note: See TracChangeset for help on using the changeset viewer.