Rev 80 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | program SpaceMission; |
2 | |||
3 | uses |
||
4 | Windows, |
||
40 | daniel-mar | 5 | {$IF CompilerVersion >= 23.0} |
6 | System.UITypes, |
||
7 | {$IFEND } |
||
1 | daniel-mar | 8 | Forms, |
9 | Dialogs, |
||
10 | SysUtils, |
||
3 | daniel-mar | 11 | GamMain in 'GamMain.pas' {MainForm}, |
12 | GamSplash in 'GamSplash.pas' {SplashForm}, |
||
13 | GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm}, |
||
14 | ComInfo in 'ComInfo.pas' {InfoForm}, |
||
15 | GamCheat in 'GamCheat.pas' {CheatForm}, |
||
14 | daniel-mar | 16 | ComLevelReader in 'ComLevelReader.pas', |
63 | daniel-mar | 17 | Global in 'Global.pas', |
18 | ComHilfe in 'ComHilfe.pas' {HilfeForm}; |
||
1 | daniel-mar | 19 | |
20 | {$R *.RES} |
||
21 | |||
22 | var |
||
23 | Sem: THandle; |
||
24 | |||
80 | daniel-mar | 25 | resourcestring |
26 | SAlreadyStarted = 'Das Spiel wurde bereits gestartet.'; |
||
27 | STitel = 'SpaceMission'; |
||
28 | SFileMissing = '%s fehlt. Bitte installieren Sie SpaceMission erneut.'; |
||
29 | |||
30 | const |
||
31 | SemaphoreName = 'SpaceMission'; |
||
32 | |||
1 | daniel-mar | 33 | begin |
94 | daniel-mar | 34 | SpaceMission_SwitchLanguage; |
1 | daniel-mar | 35 | { Programm schon gestartet? } |
80 | daniel-mar | 36 | Sem := CreateSemaphore(nil, 0, 1, SemaphoreName); |
1 | daniel-mar | 37 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
38 | begin |
||
39 | CloseHandle(Sem); |
||
80 | daniel-mar | 40 | MessageDlg(SAlreadyStarted, mtInformation, [mbOK], 0); |
1 | daniel-mar | 41 | exit; |
42 | end; |
||
43 | SplashForm := TSplashForm.Create(Application); |
||
44 | SplashForm.Show; |
||
45 | SplashForm.Update; |
||
46 | Application.Initialize; |
||
25 | daniel-mar | 47 | Application.ShowMainform := False; |
48 | Application.MainFormOnTaskBar := true; |
||
80 | daniel-mar | 49 | Application.Title := STitel; |
50 | if not fileexists(OwnDirectory+DxgFile) then |
||
1 | daniel-mar | 51 | begin |
80 | daniel-mar | 52 | MessageDLG(Format(SFileMissing, [DxgFile]), mtError, [mbOK], 0); |
24 | daniel-mar | 53 | exit; |
4 | daniel-mar | 54 | end; |
1 | daniel-mar | 55 | Application.CreateForm(TMainForm, MainForm); |
56 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
||
57 | Application.CreateForm(TInfoForm, InfoForm); |
||
58 | Application.CreateForm(TCheatForm, CheatForm); |
||
63 | daniel-mar | 59 | Application.CreateForm(THilfeForm, HilfeForm); |
1 | daniel-mar | 60 | Application.Run; |
61 | end. |
||
62 |