1 | {$INCLUDE Switches.inc}
|
---|
2 | unit LocalPlayer;
|
---|
3 |
|
---|
4 | interface
|
---|
5 |
|
---|
6 | procedure Client(Command, Player: integer; var Data); stdcall;
|
---|
7 | procedure SetAIName(p: integer; Name: string);
|
---|
8 |
|
---|
9 | implementation
|
---|
10 |
|
---|
11 | uses
|
---|
12 | Term, CityScreen, Draft, MessgEx, Select, CityType, Help, UnitStat, Diagram,
|
---|
13 | NatStat, Wonders, Nego, Enhance, BaseWin, Battle, Rates, TechTree, Forms;
|
---|
14 |
|
---|
15 | var
|
---|
16 | FormsCreated: boolean;
|
---|
17 |
|
---|
18 | procedure Client(Command, Player: integer; var Data);
|
---|
19 | begin
|
---|
20 | if not FormsCreated then
|
---|
21 | begin
|
---|
22 | FormsCreated := true;
|
---|
23 | // TODO: Changing application name in runtime will cause change of Linux XML registry file path
|
---|
24 | // Application.MainForm := MainScreen;
|
---|
25 | Application.CreateForm(TMainScreen, MainScreen);
|
---|
26 | Application.CreateForm(TCityDlg, CityDlg);
|
---|
27 | Application.CreateForm(TModalSelectDlg, ModalSelectDlg);
|
---|
28 | Application.CreateForm(TListDlg, ListDlg);
|
---|
29 | Application.CreateForm(TMessgExDlg, MessgExDlg);
|
---|
30 | Application.CreateForm(TDraftDlg, DraftDlg);
|
---|
31 | Application.CreateForm(TCityTypeDlg, CityTypeDlg);
|
---|
32 | Application.CreateForm(THelpDlg, HelpDlg);
|
---|
33 | Application.CreateForm(TUnitStatDlg, UnitStatDlg);
|
---|
34 | Application.CreateForm(TDiaDlg, DiaDlg);
|
---|
35 | Application.CreateForm(TNatStatDlg, NatStatDlg);
|
---|
36 | Application.CreateForm(TWondersDlg, WondersDlg);
|
---|
37 | Application.CreateForm(TNegoDlg, NegoDlg);
|
---|
38 | Application.CreateForm(TEnhanceDlg, EnhanceDlg);
|
---|
39 | Application.CreateForm(TBattleDlg, BattleDlg);
|
---|
40 | // Application.CreateForm(TAdvisorDlg, AdvisorDlg);
|
---|
41 | Application.CreateForm(TRatesDlg, RatesDlg);
|
---|
42 | Application.CreateForm(TTechTreeDlg, TechTreeDlg);
|
---|
43 | end;
|
---|
44 | MainScreen.Client(Command, Player, Data);
|
---|
45 | end;
|
---|
46 |
|
---|
47 | procedure SetAIName(p: integer; Name: string);
|
---|
48 | begin
|
---|
49 | MainScreen.SetAIName(p, Name);
|
---|
50 | end;
|
---|
51 |
|
---|
52 | initialization
|
---|
53 |
|
---|
54 | FormsCreated := false;
|
---|
55 |
|
---|
56 | end.
|
---|