Subversion Repositories spacemission

Rev

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