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