Subversion Repositories spacemission

Rev

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

  1. program SpaceMission;
  2.  
  3. uses
  4.   Windows,
  5.   {$IF CompilerVersion >= 23.0}
  6.   System.UITypes,
  7.   {$IFEND }
  8.   Forms,
  9.   Dialogs,
  10.   SysUtils,
  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.   ComLevelReader in 'ComLevelReader.pas',
  17.   Global in 'Global.pas',
  18.   ComHilfe in 'ComHilfe.pas' {HilfeForm};
  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.MainFormOnTaskBar := true;
  40.   Application.Title := 'SpaceMission';
  41.   if not fileexists(OwnDirectory+'DirectX\Graphics.dxg') then
  42.   begin
  43.     MessageDLG('DirectX\Graphics.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
  44.     exit;
  45.   end;
  46.   Application.CreateForm(TMainForm, MainForm);
  47.   Application.CreateForm(TSpeicherungForm, SpeicherungForm);
  48.   Application.CreateForm(TInfoForm, InfoForm);
  49.   Application.CreateForm(TCheatForm, CheatForm);
  50.   Application.CreateForm(THilfeForm, HilfeForm);
  51.   Application.Run;
  52. end.
  53.  
  54.