Subversion Repositories spacemission

Rev

Rev 24 | Rev 27 | 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,
14 daniel-mar 5
  {$IF CompilerVersion >= 23.0}System.UITypes,{$IFEND}
1 daniel-mar 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},
3 daniel-mar 13
  ComInfo in 'ComInfo.pas' {InfoForm},
1 daniel-mar 14
  LevSource in 'LevSource.pas' {SourceForm},
2 daniel-mar 15
  LevOptions in 'LevOptions.pas' {LevelForm},
14 daniel-mar 16
  ComLevelReader in 'ComLevelReader.pas',
17
  Global in 'Global.pas';
1 daniel-mar 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;
24 daniel-mar 35
  SplashForm.Update;
1 daniel-mar 36
  Application.Initialize;
25 daniel-mar 37
  Application.ShowMainform := False;
38
  Application.MainFormOnTaskBar := true;
24 daniel-mar 39
  Application.Title := 'SpaceMission Leveleditor';
40
  if not fileexists(FDirectory+'DirectX\Graphic.dxg') then
1 daniel-mar 41
  begin
24 daniel-mar 42
    MessageDLG('Graphic.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
1 daniel-mar 43
    exit;
44
  end;
45
  Application.CreateForm(TMainForm, MainForm);
46
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
47
  Application.CreateForm(TInfoForm, InfoForm);
48
  Application.CreateForm(TSourceForm, SourceForm);
49
  Application.CreateForm(TLevelForm, LevelForm);
50
  Application.Run;
51
end.
52