X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2FDoom2DF.dpr;h=679615611ed466084ac3c576607f7c0ca86251c5;hb=45af139bfc7713ed4eb237ac1f5288e82706564c;hp=bba77f400c9b4fec6ed77710158accb6fc87fb4a;hpb=30bcb89f4decd5b5885ebde1fbb943b6563b1e3e;p=d2df-sdl.git diff --git a/src/game/Doom2DF.dpr b/src/game/Doom2DF.dpr index bba77f4..6796156 100644 --- a/src/game/Doom2DF.dpr +++ b/src/game/Doom2DF.dpr @@ -1,13 +1,34 @@ program Doom2DF; -{$IFDEF WIN32} - {$APPTYPE GUI} +{$IFNDEF HEADLESS} + {$IFDEF WIN32} + {$APPTYPE GUI} + {$ENDIF} {$ENDIF} {$HINTS OFF} +{$UNDEF XXX} +{$IFDEF USE_SDLMIXER} + {$DEFINE XXX} +{$ENDIF} +{$IFDEF USE_FMOD} + {$IFDEF XXX} + {$ERROR define one of USE_SDLMIXER or USE_FMOD} + {$ELSE} + {$DEFINE XXX} + {$ENDIF} +{$ENDIF} + +{$IFNDEF XXX} + {$ERROR define USE_SDLMIXER or USE_FMOD} +{$ENDIF} + uses GL, GLExt, SDL2 in '../lib/sdl2/sdl2.pas', +{$IFDEF USE_SDLMIXER} + SDL2_mixer in '../lib/sdl2/SDL2_mixer.pas', +{$ENDIF} ENet in '../lib/enet/enet.pp', ENetTypes in '../lib/enet/enettypes.pp', ENetList in '../lib/enet/enetlist.pp', @@ -21,6 +42,12 @@ uses e_sound in '../engine/e_sound.pas', e_textures in '../engine/e_textures.pas', e_fixedbuffer in '../engine/e_fixedbuffer.pas', + sfs in '../sfs/sfs.pas', + sfsPlainFS in '../sfs/sfsPlainFS.pas', + sfsZipFS in '../sfs/sfsZipFS.pas', + sfsMemFS in '../sfs/sfsMemFS.pas', + xstreams in '../sfs/xstreams.pas', + utils in '../shared/utils.pas', WADEDITOR in '../shared/WADEDITOR.pas', WADSTRUCT in '../shared/WADSTRUCT.pas', MAPSTRUCT in '../shared/MAPSTRUCT.pas', @@ -53,10 +80,12 @@ uses g_weapons in 'g_weapons.pas', g_window in 'g_window.pas', sysutils, +{$IFDEF USE_FMOD} fmod in '../lib/FMOD/fmod.pas', fmoderrors in '../lib/FMOD/fmoderrors.pas', fmodpresets in '../lib/FMOD/fmodpresets.pas', fmodtypes in '../lib/FMOD/fmodtypes.pas', +{$ENDIF} BinEditor in '../shared/BinEditor.pas', g_panel in 'g_panel.pas', g_language in 'g_language.pas'; @@ -66,14 +95,21 @@ uses {$R CustomRes.res} {$ENDIF} +var + f: Integer; + noct: Boolean = false; begin - try - Main(); - e_WriteLog('Shutdown with no errors.', MSG_NOTIFY); - except - on E: Exception do - e_WriteLog(Format(_lc[I_SYSTEM_ERROR_MSG], [E.Message]), MSG_FATALERROR); - else - e_WriteLog(Format(_lc[I_SYSTEM_ERROR_UNKNOWN], [LongWord(ExceptAddr())]), MSG_FATALERROR); - end; + for f := 1 to ParamCount do if ParamStr(f) = '--gdb' then noct := true; + if noct then + Main() + else + try + Main(); + e_WriteLog('Shutdown with no errors.', MSG_NOTIFY); + except + on E: Exception do + e_WriteLog(Format(_lc[I_SYSTEM_ERROR_MSG], [E.Message]), MSG_FATALERROR); + else + e_WriteLog(Format(_lc[I_SYSTEM_ERROR_UNKNOWN], [LongWord(ExceptAddr())]), MSG_FATALERROR); + end; end.