Subversion Repositories spacemission

Rev

Rev 27 | Rev 63 | 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.  
  20. {$R *.RES}
  21.  
  22. var
  23.   Sem: THandle;
  24.  
  25. begin
  26.   { Programm schon gestartet? }
  27.   Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Leveleditor');
  28.   if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
  29.   begin
  30.     CloseHandle(Sem);
  31.     MessageDlg('Der Editor 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 Leveleditor';
  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(TLevelForm, LevelForm);
  50.   Application.Run;
  51. end.
  52.  
  53.