Subversion Repositories spacemission

Rev

Rev 6 | Rev 24 | 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
{$Description 'SpaceMission Leveleditor 1.1'}
4
 
5
 
4 daniel-mar 6
 
1 daniel-mar 7
uses
8
  Windows,
14 daniel-mar 9
  {$IF CompilerVersion >= 23.0}System.UITypes,{$IFEND}
1 daniel-mar 10
  Forms,
11
  Dialogs,
12
  SysUtils,
13
  MMSystem,
14
  LevMain in 'LevMain.pas' {MainForm},
15
  LevSplash in 'LevSplash.pas' {SplashForm},
16
  LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm},
3 daniel-mar 17
  ComInfo in 'ComInfo.pas' {InfoForm},
1 daniel-mar 18
  LevSource in 'LevSource.pas' {SourceForm},
2 daniel-mar 19
  LevOptions in 'LevOptions.pas' {LevelForm},
14 daniel-mar 20
  ComLevelReader in 'ComLevelReader.pas',
21
  Global in 'Global.pas';
1 daniel-mar 22
 
23
{$R *.RES}
24
 
25
var
26
  Fehler: boolean;
27
  Sem: THandle;
28
  directory: string;
29
 
30
begin
31
  { Programm schon gestartet? }
32
  Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Leveleditor');
33
  if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
34
  begin
35
    CloseHandle(Sem);
36
    MessageDlg('Der Editor wurde bereits gestartet.', mtInformation, [mbOK], 0);
37
    exit;
38
  end;
39
  SplashForm := TSplashForm.Create(Application);
40
  SplashForm.Show;
41
  SplashForm.Update;                                        
42
  Application.Initialize;
43
  Application.showmainform := False;
44
  Application.Title := 'SpaceMission 1.1 - Leveleditor';
45
  Fehler := false;
46
  directory := extractfilepath(paramstr(0));
47
  // if not fileexists(directory+'Bilder\Auswahl.bmp') then Fehler := true;
48
  if not fileexists(directory+'DirectX\Graphic.dxg') then Fehler := true;
49
  // if not fileexists(directory+'Texte\Mitwirkende.txt') then Fehler := true;
50
  // if not fileexists(directory+'Dateien.doc') then Fehler := true;
51
  if Fehler then
52
  begin
53
    MessageDLG('Dateien, die die Programmstabilität gewährleisten, sind ' +
54
      'nicht mehr vorhanden!'+#13#10+'Bitte installieren Sie SpaceMission erneut...',
55
      mtWarning, [mbOK], 0);
56
    exit;
57
  end;
58
  Application.CreateForm(TMainForm, MainForm);
59
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
60
  Application.CreateForm(TInfoForm, InfoForm);
61
  Application.CreateForm(TSourceForm, SourceForm);
62
  Application.CreateForm(TLevelForm, LevelForm);
63
  Application.Run;
64
end.
65