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