| 1 | {$INCLUDE switches}
|
|---|
| 2 | unit LocalPlayer;
|
|---|
| 3 |
|
|---|
| 4 | interface
|
|---|
| 5 |
|
|---|
| 6 | procedure Client(Command, Player: integer; var Data); stdcall;
|
|---|
| 7 |
|
|---|
| 8 | procedure SetAIName(p: integer; Name: string);
|
|---|
| 9 |
|
|---|
| 10 | implementation
|
|---|
| 11 |
|
|---|
| 12 | uses
|
|---|
| 13 | Term, CityScreen, Draft, MessgEx, Select, CityType, Help, UnitStat, Diagram,
|
|---|
| 14 | NatStat, Wonders, Nego, Enhance, BaseWin, Battle, Rates, TechTree,
|
|---|
| 15 |
|
|---|
| 16 | Forms;
|
|---|
| 17 |
|
|---|
| 18 | var
|
|---|
| 19 | FormsCreated: boolean;
|
|---|
| 20 |
|
|---|
| 21 | procedure Client;
|
|---|
| 22 | begin
|
|---|
| 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);
|
|---|
| 47 | end;
|
|---|
| 48 |
|
|---|
| 49 | procedure SetAIName(p: integer; Name: string);
|
|---|
| 50 | begin
|
|---|
| 51 | MainScreen.SetAIName(p, Name);
|
|---|
| 52 | end;
|
|---|
| 53 |
|
|---|
| 54 | initialization
|
|---|
| 55 |
|
|---|
| 56 | FormsCreated := false;
|
|---|
| 57 |
|
|---|
| 58 | end.
|
|---|