Subversion Repositories spacemission

Rev

Rev 14 | Rev 25 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14 Rev 24
Line 1... Line 1...
1
program LevEdit;
1
program LevEdit;
2
 
2
 
3
{$Description 'SpaceMission Leveleditor 1.1'}
-
 
4
 
-
 
5
 
-
 
6
 
-
 
7
uses
3
uses
8
  Windows,
4
  Windows,
9
  {$IF CompilerVersion >= 23.0}System.UITypes,{$IFEND}
5
  {$IF CompilerVersion >= 23.0}System.UITypes,{$IFEND}
10
  Forms,
6
  Forms,
11
  Dialogs,
7
  Dialogs,
Line 21... Line 17...
21
  Global in 'Global.pas';
17
  Global in 'Global.pas';
22
 
18
 
23
{$R *.RES}
19
{$R *.RES}
24
 
20
 
25
var
21
var
26
  Fehler: boolean;
-
 
27
  Sem: THandle;
22
  Sem: THandle;
28
  directory: string;
-
 
29
 
23
 
30
begin
24
begin
31
  { Programm schon gestartet? }
25
  { Programm schon gestartet? }
32
  Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Leveleditor');
26
  Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Leveleditor');
33
  if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
27
  if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
Line 39... Line 33...
39
  SplashForm := TSplashForm.Create(Application);
33
  SplashForm := TSplashForm.Create(Application);
40
  SplashForm.Show;
34
  SplashForm.Show;
41
  SplashForm.Update;                                        
35
  SplashForm.Update;
42
  Application.Initialize;
36
  Application.Initialize;
43
  Application.showmainform := False;
37
  Application.showmainform := False;
44
  Application.Title := 'SpaceMission 1.1 - Leveleditor';
38
  Application.Title := 'SpaceMission 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;
39
  if not fileexists(FDirectory+'DirectX\Graphic.dxg') then
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
40
  begin
53
    MessageDLG('Dateien, die die Programmstabilität gewährleisten, sind ' +
-
 
54
      'nicht mehr vorhanden!'+#13#10+'Bitte installieren Sie SpaceMission erneut...',
41
    MessageDLG('Graphic.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
55
      mtWarning, [mbOK], 0);
-
 
56
    exit;
42
    exit;
57
  end;
43
  end;
58
  Application.CreateForm(TMainForm, MainForm);
44
  Application.CreateForm(TMainForm, MainForm);
59
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
45
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
60
  Application.CreateForm(TInfoForm, InfoForm);
46
  Application.CreateForm(TInfoForm, InfoForm);