Subversion Repositories spacemission

Rev

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