-
Notifications
You must be signed in to change notification settings - Fork 2
/
xGreedL.lpr
82 lines (67 loc) · 1.96 KB
/
xGreedL.lpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
program xGreedL;
{$R *.res}
{$I xGreed.inc}
uses
Windows,
DirectX in 'Base\DirectX.pas',
g_delphi in 'Base\g_delphi.pas',
i_windows in 'Base\i_windows.pas',
BASS in 'Base\bass.pas',
scriptengine in 'Base\scriptengine.pas',
i_main in 'Base\i_main.pas',
i_video in 'Base\i_video.pas',
constant in 'Greed\constant.pas',
d_disk in 'Greed\d_disk.pas',
d_font in 'Greed\d_font.pas',
d_ints in 'Greed\d_ints.pas',
d_ints_h in 'Greed\d_ints_h.pas',
d_misc in 'Greed\d_misc.pas',
d_video in 'Greed\d_video.pas',
display in 'Greed\display.pas',
event in 'Greed\event.pas',
intro in 'Greed\intro.pas',
menu in 'Greed\menu.pas',
modplay in 'Greed\modplay.pas',
net in 'Greed\net.pas',
playfli in 'Greed\playfli.pas',
protos_h in 'Greed\protos_h.pas',
r_conten in 'Greed\r_conten.pas',
r_plane in 'Greed\r_plane.pas',
r_public in 'Greed\r_public.pas',
r_public_h in 'Greed\r_public_h.pas',
r_refdef in 'Greed\r_refdef.pas',
r_render in 'Greed\r_render.pas',
r_spans in 'Greed\r_spans.pas',
r_walls in 'Greed\r_walls.pas',
raven in 'Greed\raven.pas',
spawn in 'Greed\spawn.pas',
sprites in 'Greed\sprites.pas',
timer in 'Greed\timer.pas',
utils in 'Greed\utils.pas';
var
hGreedWnd: HWND = 0;
begin
//Check if Generic.exe is running. If it's running then focus on the window
hGreedWnd := FindWindow(APPNAME, APPNAME);
if hGreedWnd <> 0 then
begin
SetForegroundWindow(hGreedWnd);
Halt(0);
end;
if not InitApplication(hInstance) then
Halt(1);
if not InitInstance(hInstance, 0) then
Halt(1);
I_Init;
printf('Starting %s version %s'#13#10, [APPNAME, I_VersionBuilt]);
printf('I_InitGraphics: Initialize directdraw.' + #13#10);
I_InitGraphics;
startup;
printf('I_ShutDownGraphics: Shut down graphics.'#13#10);
I_ShutDownGraphics;
printf('DestroyWindow: Closing application window.'#13#10);
DestroyWindow(hMainWnd);
printf('I_ShutDown: Shut down I/O.'#13#10);
I_ShutDown;
Halt(0);
end.