Subversion Repositories spacemission

Rev

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

Rev Author Line No. Line
1 daniel-mar 1
program LevEdit;
2
 
3
uses
4
  Windows,
27 daniel-mar 5
  {$IF CompilerVersion >= 23.0}
6
  System.UITypes,
7
  {$IFEND }
1 daniel-mar 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},
3 daniel-mar 15
  ComInfo in 'ComInfo.pas' {InfoForm},
2 daniel-mar 16
  LevOptions in 'LevOptions.pas' {LevelForm},
14 daniel-mar 17
  ComLevelReader in 'ComLevelReader.pas',
63 daniel-mar 18
  Global in 'Global.pas',
19
  ComHilfe in 'ComHilfe.pas' {HilfeForm};
1 daniel-mar 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;
24 daniel-mar 37
  SplashForm.Update;
1 daniel-mar 38
  Application.Initialize;
25 daniel-mar 39
  Application.ShowMainform := False;
40
  Application.MainFormOnTaskBar := true;
24 daniel-mar 41
  Application.Title := 'SpaceMission Leveleditor';
31 daniel-mar 42
  if not fileexists(OwnDirectory+'DirectX\Graphics.dxg') then
1 daniel-mar 43
  begin
31 daniel-mar 44
    MessageDLG('DirectX\Graphics.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
1 daniel-mar 45
    exit;
46
  end;
47
  Application.CreateForm(TMainForm, MainForm);
48
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
49
  Application.CreateForm(TInfoForm, InfoForm);
50
  Application.CreateForm(TLevelForm, LevelForm);
63 daniel-mar 51
  Application.CreateForm(THilfeForm, HilfeForm);
1 daniel-mar 52
  Application.Run;
53
end.
54