Rev 15 | Rev 25 | Go to most recent revision | 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, |
||
14 | daniel-mar | 5 | {$IF CompilerVersion >= 23.0}System.UITypes,{$IFEND} |
1 | daniel-mar | 6 | Forms, |
7 | Dialogs, |
||
8 | SysUtils, |
||
3 | daniel-mar | 9 | GamMain in 'GamMain.pas' {MainForm}, |
10 | GamSplash in 'GamSplash.pas' {SplashForm}, |
||
11 | GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm}, |
||
12 | ComInfo in 'ComInfo.pas' {InfoForm}, |
||
13 | GamCheat in 'GamCheat.pas' {CheatForm}, |
||
14 | daniel-mar | 14 | ComLevelReader in 'ComLevelReader.pas', |
15 | daniel-mar | 15 | Global in 'Global.pas', |
16 | ComSaveGameReader in 'ComSaveGameReader.pas'; |
||
1 | daniel-mar | 17 | |
18 | {$R *.RES} |
||
19 | |||
20 | var |
||
21 | Sem: THandle; |
||
22 | |||
23 | begin |
||
24 | { Programm schon gestartet? } |
||
25 | Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission'); |
||
26 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
||
27 | begin |
||
28 | CloseHandle(Sem); |
||
29 | MessageDlg('Das Spiel wurde bereits gestartet.', mtInformation, [mbOK], 0); |
||
30 | exit; |
||
31 | end; |
||
32 | SplashForm := TSplashForm.Create(Application); |
||
33 | SplashForm.Show; |
||
34 | SplashForm.Update; |
||
35 | Application.Initialize; |
||
36 | Application.showmainform := False; |
||
37 | Application.Title := 'SpaceMission'; |
||
24 | daniel-mar | 38 | if not fileexists(FDirectory+'DirectX\Graphic.dxg') then |
1 | daniel-mar | 39 | begin |
24 | daniel-mar | 40 | MessageDLG('Graphic.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0); |
41 | exit; |
||
4 | daniel-mar | 42 | end; |
1 | daniel-mar | 43 | Application.CreateForm(TMainForm, MainForm); |
44 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
||
45 | Application.CreateForm(TInfoForm, InfoForm); |
||
46 | Application.CreateForm(TCheatForm, CheatForm); |
||
47 | Application.Run; |
||
48 | end. |
||
49 |