Subversion Repositories spacemission

Rev

Rev 3 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. program SpaceMission;
  2.  
  3. {$Description 'SpaceMission 1.1'}
  4.  
  5. uses
  6.   Windows,
  7.   Forms,
  8.   Dialogs,
  9.   SysUtils,
  10.   MMSystem,
  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},
  16.   Global in 'Global.pas',
  17.   System.UITypes;
  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';
  39.   if WaveOutGetNumDevs < 1 then
  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);
  45.   end;
  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.  
  53.