Ignore:
Timestamp:
Mar 23, 2021, 10:49:30 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r324 r325  
    55
    66uses
    7   {$IFDEF LINUX}
    8   LMessages,
    9   {$ENDIF}
     7  {$IFDEF LINUX}LMessages,{$ENDIF}
    108  Protocol, ClientTools, Term, ScreenTools, IsoEngine, BaseWin,
    119  LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls,
     
    5351    procedure PageUpBtnClick(Sender: TObject);
    5452    procedure PageDownBtnClick(Sender: TObject);
    55 
     53  private
     54    c: TCity;
     55    Report: TCityReportNew;
     56    cOwner: Integer;
     57    cGov: Integer;
     58    emix: Integer; { enemy model index of produced unit }
     59    cix: Integer;
     60    cLoc: Integer;
     61    Mode: Integer;
     62    ZoomArea: Integer;
     63    Page: Integer;
     64    PageCount: Integer;
     65    BlinkTime: Integer;
     66    OpenSoundEvent: Integer;
     67    SizeClass: Integer;
     68    AgePrepared: Integer;
     69    Optimize_cixTileChange: Integer;
     70    Optimize_TilesBeforeChange: Integer;
     71    Happened: cardinal;
     72    imix: array [0 .. 15] of integer;
     73    CityAreaInfo: TCityAreaInfo;
     74    AreaMap: TIsoMap;
     75    CityMapTemplate: TBitmap;
     76    SmallCityMapTemplate: TBitmap;
     77    Back: TBitmap;
     78    SmallCityMap: TBitmap;
     79    ZoomCityMap: TBitmap;
     80    Template: TBitmap;
     81    IsPort: Boolean;
     82    ProdHint: Boolean;
     83    AllowChange: Boolean;
     84    procedure InitSmallCityMap;
     85    procedure InitZoomCityMap;
     86    procedure ChooseProject;
     87    procedure ChangeCity(d: integer);
     88    procedure ChangeResourceWeights(iResourceWeights: integer);
     89    procedure OnPlaySound(var Msg: TMessage); message WM_PLAYSOUND;
    5690  public
    5791    RestoreUnFocus: integer;
     
    6195    procedure Reset;
    6296    procedure CheckAge;
    63 
    64   private
    65     c: TCity;
    66     Report: TCityReportNew;
    67     cOwner, cGov, emix { enemy model index of produced unit } , cix, cLoc, Mode,
    68       ZoomArea, Page, PageCount, BlinkTime, OpenSoundEvent, SizeClass,
    69       AgePrepared: integer;
    70     Optimize_cixTileChange, Optimize_TilesBeforeChange: integer;
    71     Happened: cardinal;
    72     imix: array [0 .. 15] of integer;
    73     CityAreaInfo: TCityAreaInfo;
    74     AreaMap: TIsoMap;
    75     CityMapTemplate, SmallCityMapTemplate, Back, SmallCityMap, ZoomCityMap,
    76       Template: TBitmap;
    77     IsPort, ProdHint, AllowChange: boolean;
    78     procedure InitSmallCityMap;
    79     procedure InitZoomCityMap;
    80     procedure ChooseProject;
    81     procedure ChangeCity(d: integer);
    82     procedure ChangeResourceWeights(iResourceWeights: integer);
    83     procedure OnPlaySound(var Msg: TMessage); message WM_PLAYSOUND;
    8497  end;
    8598
     
    87100  CityDlg: TCityDlg;
    88101
     102
    89103implementation
    90104
    91105uses
    92   Select, Messg, MessgEx, Help, Tribes, Directories, Math, UPixelPointer, Sound;
     106  Select, Messg, MessgEx, Help, Tribes, Directories, Math, Sound;
    93107
    94108{$R *.lfm}
     
    278292    c := MyCity[cix];
    279293  case MyMap[cLoc] and fTerrain of
    280     fPrairie:
    281       cli1 := cliPrairie;
    282     fHills:
    283       cli1 := cliHills;
    284     fTundra:
    285       cli1 := cliTundra;
     294    fPrairie: cli1 := cliPrairie;
     295    fHills: cli1 := cliHills;
     296    fTundra: cli1 := cliTundra;
    286297  else
    287298    cli1 := cliPlains;
     
    13401351                not csResourceWeightsMask; // off
    13411352              c.Status := MyCity[cix].Status;
    1342               SmartUpdateContent
     1353              SmartUpdateContent;
    13431354            end;
    13441355            exit;
     
    17371748  begin
    17381749    dec(Page);
    1739     SmartUpdateContent
     1750    SmartUpdateContent;
    17401751  end;
    17411752end;
     
    17461757  begin
    17471758    inc(Page);
    1748     SmartUpdateContent
     1759    SmartUpdateContent;
    17491760  end;
    17501761end;
Note: See TracChangeset for help on using the changeset viewer.