DEADSOFTWARE

17f17b77fb2922dff852b8e48a958e8a61ca4ecf
[d2df-sdl.git] / src / game / Doom2DF.dpr
1 (* Copyright (C) DooM 2D:Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *)
16 {$MODE DELPHI}
17 program Doom2DF;
18 {$IFNDEF HEADLESS}
19 {$IFDEF WINDOWS}
20 {$APPTYPE GUI}
21 {$ENDIF}
22 {$ENDIF}
23 {$HINTS OFF}
25 {$UNDEF XXX}
26 {$IFDEF USE_SDLMIXER}
27 {$DEFINE XXX}
28 {$ENDIF}
29 {$IFDEF USE_FMOD}
30 {$IFDEF XXX}
31 {$ERROR define one of USE_SDLMIXER or USE_FMOD}
32 {$ELSE}
33 {$DEFINE XXX}
34 {$ENDIF}
35 {$ENDIF}
37 {$IFNDEF XXX}
38 {$ERROR define USE_SDLMIXER or USE_FMOD}
39 {$ENDIF}
41 uses
42 conbuf in '../shared/conbuf.pas',
43 GL,
44 GLExt,
45 SDL2 in '../lib/sdl2/sdl2.pas',
46 {$IFDEF USE_SDLMIXER}
47 SDL2_mixer in '../lib/sdl2/SDL2_mixer.pas',
48 {$ENDIF}
49 ENet in '../lib/enet/enet.pp',
50 ENetTypes in '../lib/enet/enettypes.pp',
51 ENetList in '../lib/enet/enetlist.pp',
52 ENetTime in '../lib/enet/enettime.pp',
53 ENetProtocol in '../lib/enet/enetprotocol.pp',
54 ENetCallbacks in '../lib/enet/enetcallbacks.pp',
55 ENetPlatform in '../lib/enet/enetplatform.pp',
56 e_graphics in '../engine/e_graphics.pas',
57 e_input in '../engine/e_input.pas',
58 e_log in '../engine/e_log.pas',
59 e_sound in '../engine/e_sound.pas',
60 e_textures in '../engine/e_textures.pas',
61 e_fixedbuffer in '../engine/e_fixedbuffer.pas',
62 utils in '../shared/utils.pas',
63 xstreams in '../shared/xstreams.pas',
64 sfs in '../sfs/sfs.pas',
65 sfsPlainFS in '../sfs/sfsPlainFS.pas',
66 sfsZipFS in '../sfs/sfsZipFS.pas',
67 wadreader in '../shared/wadreader.pas',
68 MAPSTRUCT in '../shared/MAPSTRUCT.pas',
69 MAPREADER in '../shared/MAPREADER.pas',
70 MAPDEF in '../shared/MAPDEF.pas',
71 CONFIG in '../shared/CONFIG.pas',
72 g_basic in 'g_basic.pas',
73 g_console in 'g_console.pas',
74 g_net in 'g_net.pas',
75 g_netmsg in 'g_netmsg.pas',
76 g_nethandler in 'g_nethandler.pas',
77 g_netmaster in 'g_netmaster.pas',
78 g_res_downloader in 'g_res_downloader.pas',
79 g_game in 'g_game.pas',
80 g_gfx in 'g_gfx.pas',
81 g_gui in 'g_gui.pas',
82 g_items in 'g_items.pas',
83 g_main in 'g_main.pas',
84 g_map in 'g_map.pas',
85 g_menu in 'g_menu.pas',
86 g_monsters in 'g_monsters.pas',
87 g_options in 'g_options.pas',
88 g_phys in 'g_phys.pas',
89 g_player in 'g_player.pas',
90 g_playermodel in 'g_playermodel.pas',
91 g_saveload in 'g_saveload.pas',
92 g_sound in 'g_sound.pas',
93 g_textures in 'g_textures.pas',
94 g_triggers in 'g_triggers.pas',
95 g_weapons in 'g_weapons.pas',
96 g_window in 'g_window.pas',
97 SysUtils,
98 {$IFDEF USE_FMOD}
99 fmod in '../lib/FMOD/fmod.pas',
100 fmoderrors in '../lib/FMOD/fmoderrors.pas',
101 fmodpresets in '../lib/FMOD/fmodpresets.pas',
102 fmodtypes in '../lib/FMOD/fmodtypes.pas',
103 {$ENDIF}
104 BinEditor in '../shared/BinEditor.pas',
105 g_panel in 'g_panel.pas',
106 g_language in 'g_language.pas',
107 ImagingTypes,
108 Imaging,
109 ImagingUtility,
110 lua in '../lib/lua/lua.pas',
111 lualib in '../lib/lua/lualib.pas',
112 lauxlib in '../lib/lua/lauxlib.pas';
114 {$IFDEF WINDOWS}
115 {$R *.res}
116 {$R CustomRes.res}
117 {$ENDIF}
119 var
120 f: Integer;
121 noct: Boolean = false;
122 begin
123 for f := 1 to ParamCount do
124 begin
125 if ParamStr(f) = '--gdb' then noct := true
126 else if ParamStr(f) = '--log' then conbufDumpToStdOut := true;
127 end;
128 if noct then
129 Main()
130 else
131 try
132 Main();
133 e_WriteLog('Shutdown with no errors.', MSG_NOTIFY);
134 except
135 on E: Exception do
136 e_WriteLog(Format(_lc[I_SYSTEM_ERROR_MSG], [E.Message]), MSG_FATALERROR);
137 else
138 e_WriteLog(Format(_lc[I_SYSTEM_ERROR_UNKNOWN], [LongWord(ExceptAddr())]), MSG_FATALERROR);
139 end;
140 end.