Subversion Repositories spacemission

Rev

Rev 31 | 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 SpaceMission;
2
 
3
uses
4
  Windows,
40 daniel-mar 5
  {$IF CompilerVersion >= 23.0}
6
  System.UITypes,
7
  {$IFEND }
1 daniel-mar 8
  Forms,
9
  Dialogs,
10
  SysUtils,
3 daniel-mar 11
  GamMain in 'GamMain.pas' {MainForm},
12
  GamSplash in 'GamSplash.pas' {SplashForm},
13
  GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm},
14
  ComInfo in 'ComInfo.pas' {InfoForm},
15
  GamCheat in 'GamCheat.pas' {CheatForm},
14 daniel-mar 16
  ComLevelReader in 'ComLevelReader.pas',
40 daniel-mar 17
  Global in 'Global.pas';
1 daniel-mar 18
 
19
{$R *.RES}
20
 
21
var
22
  Sem: THandle;
23
 
24
begin
25
  { Programm schon gestartet? }
26
  Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission');
27
  if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
28
  begin
29
    CloseHandle(Sem);
30
    MessageDlg('Das Spiel wurde bereits gestartet.', mtInformation, [mbOK], 0);
31
    exit;
32
  end;
33
  SplashForm := TSplashForm.Create(Application);
34
  SplashForm.Show;
35
  SplashForm.Update;
36
  Application.Initialize;
25 daniel-mar 37
  Application.ShowMainform := False;
38
  Application.MainFormOnTaskBar := true;
1 daniel-mar 39
  Application.Title := 'SpaceMission';
31 daniel-mar 40
  if not fileexists(OwnDirectory+'DirectX\Graphics.dxg') then
1 daniel-mar 41
  begin
31 daniel-mar 42
    MessageDLG('DirectX\Graphics.dxg fehlt. Bitte installieren Sie SpaceMission erneut.', mtError, [mbOK], 0);
24 daniel-mar 43
    exit;
4 daniel-mar 44
  end;
1 daniel-mar 45
  Application.CreateForm(TMainForm, MainForm);
46
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
47
  Application.CreateForm(TInfoForm, InfoForm);
48
  Application.CreateForm(TCheatForm, CheatForm);
49
  Application.Run;
50
end.
51