Subversion Repositories spacemission

Rev

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