Subversion Repositories spacemission

Rev

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