source: branches/delphi/LocalPlayer/LocalPlayer.pas

Last change on this file was 6, checked in by chronos, 7 years ago
  • Modified: Formated all project source files using Delphi formatter as original indentation and other formatting was really bad.
File size: 1.6 KB
Line 
1{$INCLUDE switches}
2unit LocalPlayer;
3
4interface
5
6procedure Client(Command, Player: integer; var Data); stdcall;
7
8procedure SetAIName(p: integer; Name: string);
9
10implementation
11
12uses
13 Term, CityScreen, Draft, MessgEx, Select, CityType, Help, UnitStat, Diagram,
14 NatStat, Wonders, Nego, Enhance, BaseWin, Battle, Rates, TechTree,
15
16 Forms;
17
18var
19 FormsCreated: boolean;
20
21procedure Client;
22begin
23 if not FormsCreated then
24 begin
25 FormsCreated := true;
26 BaseWin.CreateOffscreen;
27 Application.CreateForm(TMainScreen, MainScreen);
28 Application.CreateForm(TCityDlg, CityDlg);
29 Application.CreateForm(TModalSelectDlg, ModalSelectDlg);
30 Application.CreateForm(TListDlg, ListDlg);
31 Application.CreateForm(TMessgExDlg, MessgExDlg);
32 Application.CreateForm(TDraftDlg, DraftDlg);
33 Application.CreateForm(TCityTypeDlg, CityTypeDlg);
34 Application.CreateForm(THelpDlg, HelpDlg);
35 Application.CreateForm(TUnitStatDlg, UnitStatDlg);
36 Application.CreateForm(TDiaDlg, DiaDlg);
37 Application.CreateForm(TNatStatDlg, NatStatDlg);
38 Application.CreateForm(TWondersDlg, WondersDlg);
39 Application.CreateForm(TNegoDlg, NegoDlg);
40 Application.CreateForm(TEnhanceDlg, EnhanceDlg);
41 Application.CreateForm(TBattleDlg, BattleDlg);
42 // Application.CreateForm(TAdvisorDlg, AdvisorDlg);
43 Application.CreateForm(TRatesDlg, RatesDlg);
44 Application.CreateForm(TTechTreeDlg, TechTreeDlg);
45 end;
46 MainScreen.Client(Command, Player, Data);
47end;
48
49procedure SetAIName(p: integer; Name: string);
50begin
51 MainScreen.SetAIName(p, Name);
52end;
53
54initialization
55
56FormsCreated := false;
57
58end.
Note: See TracBrowser for help on using the repository browser.