This repository was archived by the owner on Jan 23, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathALE.dpr
More file actions
102 lines (96 loc) · 3.39 KB
/
Copy pathALE.dpr
File metadata and controls
102 lines (96 loc) · 3.39 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
program ALE;
uses
Forms,
Windows,
Messages,
IniFiles,
SysUtils,
Graphics,
Types,
Dialogs,
Unit1 in 'Unit1.pas' {ALEForm},
Unit2 in 'Unit2.pas' {PrefForm},
Tools in 'Tools.pas',
Unit3 in 'Unit3.pas' {ObjectForm},
Unit4 in 'Unit4.pas' {OptionsForm},
Unit5 in 'Unit5.pas' {AboutForm},
Unit7 in 'Unit7.pas' {PictureForm},
Unit8 in 'Unit8.pas' {LGRForm},
UniDIB in 'UniDIB.pas',
Unit9 in 'Unit9.pas' {StatForm},
Unit10 in 'Unit10.pas' {PasteForm},
Unit11 in 'Unit11.pas' {PictTileForm},
Unit6 in 'Unit6.pas' {PolyOpForm},
DIBToolsNE in 'DibToolsNE.pas',
Unit12 in 'Unit12.pas' {LogoForm},
LevelEngine in 'LevelEngine.pas',
Unit13 in 'Unit13.pas' {ReplaySearchForm},
Unit14 in 'Unit14.pas' {LevelSearchForm},
ListOps in 'ListOps.pas',
Unit15 in 'Unit15.pas' {AutoGrassForm},
Unit16 in 'Unit16.pas' {SplineForm};//,
// Unit17 in 'Unit17.pas' {RegForm};
{$R *.res}
var
h: HWND;
Ini: TIniFile;
begin
mes_filechanged:=RegisterWindowMessage('ALE2 - open new file.');
Ini:=TIniFile.Create(ExtractFilePath(ParamStr(0))+'ALE.ini');
Language:=Ini.ReadString('Common','Language','');
if not Ini.ReadBool('Common','AllowMult',false) then
if FindWindow('TApplication','ALE 2.0')<>0 then begin
h:=FindWindow('TALEForm',nil);
if h<>0 then begin
if ParamCount>0 then begin
Ini.WriteString('Common','CurrentLevel',ParamStr(1));
SendMessage(h,mes_filechanged,0,0);
end;
ShowWindow(h,SW_RESTORE);
SetForegroundWindow(h);
Ini.Free;
halt;
end;
end;
{ MainCode:=MCodeToStr(GetCode);
MainRegCode:=Ini.ReadString('Common','UnlockCode','');}
Ini.Free;
Application.Initialize;
Application.Title := 'ALE 2.1';
{ if LowerCase(MCodeToStr(GetRegCode(StrToMCode(MainCode))))<>
LowerCase(MainRegCode) then begin
RegForm:=TRegForm.Create(Application);
//Çàãðóçêà ÿçûêà
Ini:=TIniFile.Create(ExtractFilePath(ParamStr(0))+'\Language\'+Language);
//RegForm
with RegForm do begin
Caption:=Ini.ReadString('Language','RegForm.Caption',Caption);
LabeledEdit1.EditLabel.Caption:=Ini.ReadString('Language','RegForm.HardCode',LabeledEdit1.EditLabel.Caption);
LabeledEdit2.EditLabel.Caption:=Ini.ReadString('Language','RegForm.UnlockCode',LabeledEdit2.EditLabel.Caption);
BitBtn2.Caption:=Ini.ReadString('Language','RegForm.Register',BitBtn2.Caption);
BitBtn3.Caption:=Ini.ReadString('Language','RegForm.Unlock',BitBtn3.Caption);
MessageString[81]:=Ini.ReadString('Language','MS81',MessageString[81]);
end;
//end RegForm
Ini.Free;
RegForm.ShowModal;
RegForm.Free;
end;}
Application.CreateForm(TALEForm, ALEForm);
Application.CreateForm(TPrefForm, PrefForm);
Application.CreateForm(TObjectForm, ObjectForm);
Application.CreateForm(TOptionsForm, OptionsForm);
Application.CreateForm(TPictureForm, PictureForm);
Application.CreateForm(TLGRForm, LGRForm);
Application.CreateForm(TStatForm, StatForm);
Application.CreateForm(TPasteForm, PasteForm);
Application.CreateForm(TPictTileForm, PictTileForm);
Application.CreateForm(TPolyOpForm, PolyOpForm);
Application.CreateForm(TReplaySearchForm, ReplaySearchForm);
Application.CreateForm(TLevelSearchForm, LevelSearchForm);
Application.CreateForm(TAutoGrassForm, AutoGrassForm);
Application.CreateForm(TSplineForm, SplineForm);
Application.CreateForm(TAboutForm, AboutForm);
LogoForm.Free;
Application.Run;
end.