Subversion Repositories spacemission

Rev

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

Rev 3 Rev 4
Line 7... Line 7...
7
  Forms,
7
  Forms,
8
  Dialogs,
8
  Dialogs,
9
  SysUtils,
9
  SysUtils,
10
  MMSystem,
10
  MMSystem,
11
  GamMain in 'GamMain.pas' {MainForm},
11
  GamMain in 'GamMain.pas' {MainForm},
12
  ComText in 'ComText.pas' {TextForm},
-
 
13
  GamSplash in 'GamSplash.pas' {SplashForm},
12
  GamSplash in 'GamSplash.pas' {SplashForm},
14
  GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm},
13
  GamSpeicherung in 'GamSpeicherung.pas' {SpeicherungForm},
15
  ComInfo in 'ComInfo.pas' {InfoForm},
14
  ComInfo in 'ComInfo.pas' {InfoForm},
16
  GamCheat in 'GamCheat.pas' {CheatForm},
15
  GamCheat in 'GamCheat.pas' {CheatForm},
17
  Global in 'Global.pas';
16
  Global in 'Global.pas',
-
 
17
  System.UITypes;
18
 
18
 
19
{$R *.RES}
19
{$R *.RES}
20
 
20
 
21
var
21
var
22
  Fehler: boolean;
-
 
23
  Sem: THandle;
22
  Sem: THandle;
24
  directory: string;
-
 
25
 
23
 
26
begin
24
begin
27
  { Programm schon gestartet? }
25
  { Programm schon gestartet? }
28
  Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission');
26
  Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission');
29
  if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
27
  if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
Line 36... Line 34...
36
  SplashForm.Show;
34
  SplashForm.Show;
37
  SplashForm.Update;
35
  SplashForm.Update;
38
  Application.Initialize;
36
  Application.Initialize;
39
  Application.showmainform := False;
37
  Application.showmainform := False;
40
  Application.Title := 'SpaceMission';
38
  Application.Title := 'SpaceMission';
41
  { Dateien vorhanden? }
-
 
42
  Fehler := false;
-
 
43
  directory := extractfilepath(paramstr(0));
-
 
44
  if not fileexists(directory+'Bilder\Delphi.bmp') then Fehler := true;
-
 
45
  if not fileexists(directory+'Bilder\SplSplash.jpg') then Fehler := true;
-
 
46
  if not fileexists(directory+'DirectX\Graphic.dxg') then Fehler := true;
-
 
47
  if not fileexists(directory+'DirectX\Sound.dxw') then Fehler := true;
-
 
48
  if not fileexists(directory+'Musik\Boss.mid') then Fehler := true;
-
 
49
  if not fileexists(directory+'Musik\Game.mid') then Fehler := true;
-
 
50
  if not fileexists(directory+'Musik\Scene.mid') then Fehler := true;
-
 
51
  if not fileexists(directory+'Musik\Title.mid') then Fehler := true;
-
 
52
  //if not fileexists(directory+'Texte\Mitwirkende.txt') then Fehler := true;
-
 
53
  if Fehler then
-
 
54
  begin
-
 
55
    MessageDLG('Dateien, die die Programmstabilität gewährleisten, sind ' +
-
 
56
      'nicht mehr vorhanden!'+#13#10+'Bitte installieren Sie SpaceMission erneut...',
-
 
57
      mtWarning, [mbOK], 0);
-
 
58
    exit;
-
 
59
  end;
-
 
60
  { Keine Soundkarte?! }
-
 
61
  if WaveOutGetNumDevs < 1 then
39
  if WaveOutGetNumDevs < 1 then
-
 
40
  begin
62
    MessageDlg('Es wurde keine Soundkarte gefunden!' + #13#10 +
41
    MessageDlg('Es wurde keine Soundkarte gefunden!' + #13#10 +
63
    'Entweder ist keine Soundkarte angeschlossen oder sie ist nicht ' +
42
    'Entweder ist keine Soundkarte angeschlossen oder sie ist nicht ' +
64
    'ordnungsgemäß installiert.' + #13#10 + 'Es können daher keine Musik und ' +
43
    'ordnungsgemäß installiert.' + #13#10 + 'Es können daher keine Musik und ' +
65
    'keine Geräusche abgespielt werden.', mtError, [mbOK], 0);
44
    'keine Geräusche abgespielt werden.', mtError, [mbOK], 0);
-
 
45
  end;
66
  Application.CreateForm(TMainForm, MainForm);
46
  Application.CreateForm(TMainForm, MainForm);
67
  Application.CreateForm(TTextForm, TextForm);
-
 
68
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
47
  Application.CreateForm(TSpeicherungForm, SpeicherungForm);
69
  Application.CreateForm(TInfoForm, InfoForm);
48
  Application.CreateForm(TInfoForm, InfoForm);
70
  Application.CreateForm(TCheatForm, CheatForm);
49
  Application.CreateForm(TCheatForm, CheatForm);
71
  Application.Run;
50
  Application.Run;
72
end.
51
end.