Rev 81 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 81 | Rev 94 | ||
---|---|---|---|
1 | program LevEdit; |
1 | program LevEdit; |
2 | 2 | ||
3 | uses |
3 | uses |
4 | Windows, |
4 | Windows, |
5 | {$IF CompilerVersion >= 23.0} |
5 | {$IF CompilerVersion >= 23.0} |
6 | System.UITypes, |
6 | System.UITypes, |
7 | {$IFEND } |
7 | {$IFEND } |
8 | Forms, |
8 | Forms, |
9 | Dialogs, |
9 | Dialogs, |
10 | SysUtils, |
10 | SysUtils, |
11 | LevMain in 'LevMain.pas' {MainForm}, |
11 | LevMain in 'LevMain.pas' {MainForm}, |
12 | LevSplash in 'LevSplash.pas' {SplashForm}, |
12 | LevSplash in 'LevSplash.pas' {SplashForm}, |
13 | LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm}, |
13 | LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm}, |
14 | ComInfo in 'ComInfo.pas' {InfoForm}, |
14 | ComInfo in 'ComInfo.pas' {InfoForm}, |
15 | LevOptions in 'LevOptions.pas' {LevelForm}, |
15 | LevOptions in 'LevOptions.pas' {LevelForm}, |
16 | ComLevelReader in 'ComLevelReader.pas', |
16 | ComLevelReader in 'ComLevelReader.pas', |
17 | Global in 'Global.pas', |
17 | Global in 'Global.pas', |
18 | ComHilfe in 'ComHilfe.pas' {HilfeForm}; |
18 | ComHilfe in 'ComHilfe.pas' {HilfeForm}; |
19 | 19 | ||
20 | {$R *.RES} |
20 | {$R *.RES} |
21 | 21 | ||
22 | var |
22 | var |
23 | Sem: THandle; |
23 | Sem: THandle; |
24 | 24 | ||
25 | resourcestring |
25 | resourcestring |
26 | SAlreadyStarted = 'Der Editor wurde bereits gestartet.'; |
26 | SAlreadyStarted = 'Der Editor wurde bereits gestartet.'; |
27 | STitel = 'SpaceMission Leveleditor'; |
27 | STitel = 'SpaceMission Level-Editor'; |
28 | SFileMissing = '%s fehlt. Bitte installieren Sie SpaceMission erneut.'; |
28 | SFileMissing = '%s fehlt. Bitte installieren Sie SpaceMission erneut.'; |
29 | 29 | ||
30 | const |
30 | const |
31 | SemaphoreName = 'SpaceMission Leveleditor'; |
31 | SemaphoreName = 'SpaceMission Level Editor'; |
32 | 32 | ||
33 | begin |
33 | begin |
- | 34 | SpaceMission_SwitchLanguage; |
|
34 | { Programm schon gestartet? } |
35 | { Programm schon gestartet? } |
35 | Sem := CreateSemaphore(nil, 0, 1, SemaphoreName); |
36 | Sem := CreateSemaphore(nil, 0, 1, SemaphoreName); |
36 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
37 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
37 | begin |
38 | begin |
38 | CloseHandle(Sem); |
39 | CloseHandle(Sem); |
39 | MessageDlg(SAlreadyStarted, mtInformation, [mbOK], 0); |
40 | MessageDlg(SAlreadyStarted, mtInformation, [mbOK], 0); |
40 | exit; |
41 | exit; |
41 | end; |
42 | end; |
42 | SplashForm := TSplashForm.Create(Application); |
43 | SplashForm := TSplashForm.Create(Application); |
43 | SplashForm.Show; |
44 | SplashForm.Show; |
44 | SplashForm.Update; |
45 | SplashForm.Update; |
45 | Application.Initialize; |
46 | Application.Initialize; |
46 | Application.ShowMainform := False; |
47 | Application.ShowMainform := False; |
47 | Application.MainFormOnTaskBar := true; |
48 | Application.MainFormOnTaskBar := true; |
48 | Application.Title := STitel; |
49 | Application.Title := STitel; |
49 | if not fileexists(OwnDirectory+DxgFile) then |
50 | if not fileexists(OwnDirectory+DxgFile) then |
50 | begin |
51 | begin |
51 | MessageDLG(Format(SFilemissing, [DxgFile]), mtError, [mbOK], 0); |
52 | MessageDLG(Format(SFilemissing, [DxgFile]), mtError, [mbOK], 0); |
52 | exit; |
53 | exit; |
53 | end; |
54 | end; |
54 | Application.CreateForm(TMainForm, MainForm); |
55 | Application.CreateForm(TMainForm, MainForm); |
55 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
56 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
56 | Application.CreateForm(TInfoForm, InfoForm); |
57 | Application.CreateForm(TInfoForm, InfoForm); |
57 | Application.CreateForm(TLevelForm, LevelForm); |
58 | Application.CreateForm(TLevelForm, LevelForm); |
58 | Application.CreateForm(THilfeForm, HilfeForm); |
59 | Application.CreateForm(THilfeForm, HilfeForm); |
59 | Application.Run; |
60 | Application.Run; |
60 | end. |
61 | end. |
61 | 62 | ||
62 | 63 |