Subversion Repositories spacemission

Rev

Rev 14 | Rev 25 | 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}System.UITypes,{$IFEND}
  6.   Forms,
  7.   Dialogs,
  8.   SysUtils,
  9.   MMSystem,
  10.   LevMain in 'LevMain.pas' {MainForm},
  11.   LevSplash in 'LevSplash.pas' {SplashForm},
  12.   LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm},
  13.   ComInfo in 'ComInfo.pas' {InfoForm},
  14.   LevSource in 'LevSource.pas' {SourceForm},
  15.   LevOptions in 'LevOptions.pas' {LevelForm},
  16.   ComLevelReader in 'ComLevelReader.pas',
  17.   Global in 'Global.pas';
  18.  
  19. {$R *.RES}
  20.  
  21. var
  22.   Sem: THandle;
  23.  
  24. begin
  25.   { Programm schon gestartet? }
  26.   Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Leveleditor');
  27.   if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
  28.   begin
  29.     CloseHandle(Sem);
  30.     MessageDlg('Der Editor 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 Leveleditor';
  39.   if not fileexists(FDirectory+'DirectX\Graphic.dxg') then
  40.   begin
  41.     MessageDLG('Graphic.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
  42.     exit;
  43.   end;
  44.   Application.CreateForm(TMainForm, MainForm);
  45.   Application.CreateForm(TSpeicherungForm, SpeicherungForm);
  46.   Application.CreateForm(TInfoForm, InfoForm);
  47.   Application.CreateForm(TSourceForm, SourceForm);
  48.   Application.CreateForm(TLevelForm, LevelForm);
  49.   Application.Run;
  50. end.
  51.  
  52.