Rev 4 | Rev 14 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 6 | ||
---|---|---|---|
1 | program SpaceMission; |
1 | program SpaceMission; |
2 | 2 | ||
3 | {$Description 'SpaceMission 1.1'} |
3 | {$Description 'SpaceMission 1.1'} |
4 | 4 | ||
5 | uses |
5 | uses |
6 | Windows, |
6 | Windows, |
7 | Forms, |
7 | Forms, |
8 | Dialogs, |
8 | Dialogs, |
9 | SysUtils, |
9 | SysUtils, |
10 | MMSystem, |
10 | MMSystem, |
11 | GamMain in 'GamMain.pas' {MainForm}, |
11 | GamMain in 'GamMain.pas' {MainForm}, |
12 | GamSplash in 'GamSplash.pas' {SplashForm}, |
12 | GamSplash in 'GamSplash.pas' {SplashForm}, |
13 | GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm}, |
13 | GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm}, |
14 | ComInfo in 'ComInfo.pas' {InfoForm}, |
14 | ComInfo in 'ComInfo.pas' {InfoForm}, |
15 | GamCheat in 'GamCheat.pas' {CheatForm}, |
15 | GamCheat in 'GamCheat.pas' {CheatForm}, |
16 | Global in 'Global.pas', |
16 | Global in 'Global.pas'{$IF CompilerVersion >= 23.0}, |
17 | System.UITypes; |
17 | System.UITypes{$IFEND}; |
18 | 18 | ||
19 | {$R *.RES} |
19 | {$R *.RES} |
20 | 20 | ||
21 | var |
21 | var |
22 | Sem: THandle; |
22 | Sem: THandle; |
23 | 23 | ||
24 | begin |
24 | begin |
25 | { Programm schon gestartet? } |
25 | { Programm schon gestartet? } |
26 | Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission'); |
26 | Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission'); |
27 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
27 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
28 | begin |
28 | begin |
29 | CloseHandle(Sem); |
29 | CloseHandle(Sem); |
30 | MessageDlg('Das Spiel wurde bereits gestartet.', mtInformation, [mbOK], 0); |
30 | MessageDlg('Das Spiel wurde bereits gestartet.', mtInformation, [mbOK], 0); |
31 | exit; |
31 | exit; |
32 | end; |
32 | end; |
33 | SplashForm := TSplashForm.Create(Application); |
33 | SplashForm := TSplashForm.Create(Application); |
34 | SplashForm.Show; |
34 | SplashForm.Show; |
35 | SplashForm.Update; |
35 | SplashForm.Update; |
36 | Application.Initialize; |
36 | Application.Initialize; |
37 | Application.showmainform := False; |
37 | Application.showmainform := False; |
38 | Application.Title := 'SpaceMission'; |
38 | Application.Title := 'SpaceMission'; |
39 | if WaveOutGetNumDevs < 1 then |
39 | if WaveOutGetNumDevs < 1 then |
40 | begin |
40 | begin |
41 | MessageDlg('Es wurde keine Soundkarte gefunden!' + #13#10 + |
41 | MessageDlg('Es wurde keine Soundkarte gefunden!' + #13#10 + |
42 | 'Entweder ist keine Soundkarte angeschlossen oder sie ist nicht ' + |
42 | 'Entweder ist keine Soundkarte angeschlossen oder sie ist nicht ' + |
43 | 'ordnungsgemäß installiert.' + #13#10 + 'Es können daher keine Musik und ' + |
43 | 'ordnungsgemäß installiert.' + #13#10 + 'Es können daher keine Musik und ' + |
44 | 'keine Geräusche abgespielt werden.', mtError, [mbOK], 0); |
44 | 'keine Geräusche abgespielt werden.', mtError, [mbOK], 0); |
45 | end; |
45 | end; |
46 | Application.CreateForm(TMainForm, MainForm); |
46 | Application.CreateForm(TMainForm, MainForm); |
47 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
47 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
48 | Application.CreateForm(TInfoForm, InfoForm); |
48 | Application.CreateForm(TInfoForm, InfoForm); |
49 | Application.CreateForm(TCheatForm, CheatForm); |
49 | Application.CreateForm(TCheatForm, CheatForm); |
50 | Application.Run; |
50 | Application.Run; |
51 | end. |
51 | end. |
52 | 52 | ||
53 | 53 |