Subversion Repositories spacemission

Rev

Rev 27 | Rev 63 | 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',
18
  Global in 'Global.pas';
1 daniel-mar 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;
24 daniel-mar 36
  SplashForm.Update;
1 daniel-mar 37
  Application.Initialize;
25 daniel-mar 38
  Application.ShowMainform := False;
39
  Application.MainFormOnTaskBar := true;
24 daniel-mar 40
  Application.Title := 'SpaceMission Leveleditor';
31 daniel-mar 41
  if not fileexists(OwnDirectory+'DirectX\Graphics.dxg') then
1 daniel-mar 42
  begin
31 daniel-mar 43
    MessageDLG('DirectX\Graphics.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
1 daniel-mar 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