Subversion Repositories spacemission

Rev

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

  1. program LevEdit;
  2.  
  3. uses
  4.   Windows,
  5.   {$IF CompilerVersion >= 23.0}
  6.   System.UITypes,
  7.   {$IFEND }
  8.   Forms,
  9.   Dialogs,
  10.   SysUtils,
  11.   MMSystem,
  12.   LevMain in 'LevMain.pas' {MainForm},
  13.   LevSplash in 'LevSplash.pas' {SplashForm},
  14.   LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm},
  15.   ComInfo in 'ComInfo.pas' {InfoForm},
  16.   LevOptions in 'LevOptions.pas' {LevelForm},
  17.   ComLevelReader in 'ComLevelReader.pas',
  18.   Global in 'Global.pas',
  19.   ComHilfe in 'ComHilfe.pas' {HilfeForm};
  20.  
  21. {$R *.RES}
  22.  
  23. var
  24.   Sem: THandle;
  25.  
  26. begin
  27.   { Programm schon gestartet? }
  28.   Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Leveleditor');
  29.   if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
  30.   begin
  31.     CloseHandle(Sem);
  32.     MessageDlg('Der Editor 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.MainFormOnTaskBar := true;
  41.   Application.Title := 'SpaceMission Leveleditor';
  42.   if not fileexists(OwnDirectory+'DirectX\Graphics.dxg') then
  43.   begin
  44.     MessageDLG('DirectX\Graphics.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
  45.     exit;
  46.   end;
  47.   Application.CreateForm(TMainForm, MainForm);
  48.   Application.CreateForm(TSpeicherungForm, SpeicherungForm);
  49.   Application.CreateForm(TInfoForm, InfoForm);
  50.   Application.CreateForm(TLevelForm, LevelForm);
  51.   Application.CreateForm(THilfeForm, HilfeForm);
  52.   Application.Run;
  53. end.
  54.  
  55.