source: tags/1.2.0/LocalPlayer/LocalPlayer.pas

Last change on this file was 155, checked in by chronos, 5 years ago
  • Fixed: Wrong drawing of wonders dialog.
  • Modified: Use separate offscreen bitmap for each TBufferedDrawDlg dialog.
File size: 1.7 KB
Line 
1{$INCLUDE Switches.inc}
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 // TODO: Changing application name in runtime will cause change of Linux XML registry file path
27// Application.MainForm := MainScreen;
28 Application.CreateForm(TMainScreen, MainScreen);
29 Application.CreateForm(TCityDlg, CityDlg);
30 Application.CreateForm(TModalSelectDlg, ModalSelectDlg);
31 Application.CreateForm(TListDlg, ListDlg);
32 Application.CreateForm(TMessgExDlg, MessgExDlg);
33 Application.CreateForm(TDraftDlg, DraftDlg);
34 Application.CreateForm(TCityTypeDlg, CityTypeDlg);
35 Application.CreateForm(THelpDlg, HelpDlg);
36 Application.CreateForm(TUnitStatDlg, UnitStatDlg);
37 Application.CreateForm(TDiaDlg, DiaDlg);
38 Application.CreateForm(TNatStatDlg, NatStatDlg);
39 Application.CreateForm(TWondersDlg, WondersDlg);
40 Application.CreateForm(TNegoDlg, NegoDlg);
41 Application.CreateForm(TEnhanceDlg, EnhanceDlg);
42 Application.CreateForm(TBattleDlg, BattleDlg);
43 // Application.CreateForm(TAdvisorDlg, AdvisorDlg);
44 Application.CreateForm(TRatesDlg, RatesDlg);
45 Application.CreateForm(TTechTreeDlg, TechTreeDlg);
46 end;
47 MainScreen.Client(Command, Player, Data);
48end;
49
50procedure SetAIName(p: integer; Name: string);
51begin
52 MainScreen.SetAIName(p, Name);
53end;
54
55initialization
56
57FormsCreated := false;
58
59end.
Note: See TracBrowser for help on using the repository browser.