diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 18f1f21ac854c050c2d928da10d4ebf4e874f437..73a73a92291cd70c3ffc1eb44c146efd01cdfecc 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
*)
{$INCLUDE ../shared/a_modes.inc}
{$IFDEF ANDROID}library{$ELSE}program{$ENDIF} Doom2DF;
+
{$IFNDEF HEADLESS}
{$IFDEF WINDOWS}
{$APPTYPE GUI}
{$ENDIF}
{$HINTS OFF}
-{$IF DEFINED(USE_SYSSTUB)}
- {$IF DEFINED(USE_SDL) OR DEFINED(USE_SDL2)}
- {$ERROR Only one system driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_SDL)}
- {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL2)}
- {$ERROR Only one system driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_SDL2)}
- {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)}
- {$ERROR Only one system driver must be selected!}
- {$ENDIF}
-{$ELSE}
- {$ERROR System driver not selected. Use -dUSE_SYSSTUB or -dUSE_SDL or -dUSE_SDL2}
-{$ENDIF}
-
-{$IF DEFINED(USE_SDLMIXER)}
- {$IF DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_FMOD)}
- {$IF DEFINED(USE_SDLMIXER) OR DEFINED(USE_OPENAL)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_OPENAL)}
- {$IF DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSE}
- {$ERROR Sound driver not selected. Use -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL}
-{$ENDIF}
-
uses
{$IFDEF ANDROID}
ctypes,
{$ENDIF}
{$IFDEF USE_SDL}
- SDL,
+ SDL in '../lib/sdl/sdl.pas',
+ {$IFDEF USE_SDLMIXER}
+ SDL_mixer in '../lib/sdl/sdl_mixer.pas',
+ {$ENDIF}
{$ENDIF}
{$IFDEF USE_SDL2}
SDL2 in '../lib/sdl2/sdl2.pas',
SDL2_mixer in '../lib/sdl2/SDL2_mixer.pas',
{$ENDIF}
{$ENDIF}
+{$IFDEF USE_SYSSTUB}
+ {$IFDEF USE_SDLMIXER}
+ SDL2 in '../lib/sdl2/sdl2.pas',
+ SDL2_mixer in '../lib/sdl2/SDL2_mixer.pas',
+ {$ENDIF}
+{$ENDIF}
{$IFDEF USE_OPENAL}
AL in '../lib/openal/al.pas',
xmp in '../lib/xmp/xmp.pas',
e_soundfile_xmp in '../engine/e_soundfile_xmp.pas',
{$ENDIF}
+ {$IFDEF USE_GME}
+ gme in '../lib/gme/gme.pas',
+ e_soundfile_gme in '../engine/e_soundfile_gme.pas',
+ {$ENDIF}
{$IFDEF USE_MPG123}
mpg123 in '../lib/mpg123/mpg123.pas',
e_soundfile_mp3 in '../engine/e_soundfile_mp3.pas',
e_sound in '../engine/e_sound.pas',
e_texture in '../engine/e_texture.pas',
e_msg in '../engine/e_msg.pas',
+ e_res in '../engine/e_res.pas',
utils in '../shared/utils.pas',
xstreams in '../shared/xstreams.pas',
sfs in '../sfs/sfs.pas',
g_touch in 'sdl2/g_touch.pas',
{$ENDIF}
- SysUtils,
+ r_console in 'opengl/r_console.pas',
+
{$IFDEF USE_FMOD}
fmod in '../lib/FMOD/fmod.pas',
fmoderrors in '../lib/FMOD/fmoderrors.pas',
fui_flexlay in '../flexui/fui_flexlay.pas',
fui_ctls in '../flexui/fui_ctls.pas',
{$ENDIF}
-
- ImagingTypes,
- Imaging,
- ImagingUtility;
+ {$I ../shared/vampimg.inc}
+ SysUtils;
{$IFDEF WINDOWS}
{$R *.res}
{$ENDIF}
//tfo: Text;
begin
- SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]); //k8: fuck off, that's why
-
{$IFDEF ANDROID}
-{$I-}
- e_SetSafeSlowLog(true);
- if SDL_AndroidGetExternalStorageState() <> 0 then
- begin
- storage := SDL_AndroidGetExternalStoragePath();
- Chdir(storage);
- e_WriteLog('Use external storage: ' + storage, TMsgType.Notify)
- end
- else
- begin
- storage := SDL_AndroidGetInternalStoragePath();
- Chdir(storage);
- e_WriteLog('Use internal storage: ' + storage, TMsgType.Notify)
- end;
- if IOresult <> 0 then
- begin
- SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, PChar('Invalid path'), PChar('Can''t chdir to ' + storage), nil);
- result := 1;
- exit
- end;
- SetEnvVar('TIMIDITY_CFG', 'timidity.cfg');
-{$ENDIF ANDROID}
+ System.argc := argc;
+ System.argv := argv;
+{$ENDIF}
+
+ SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]); //k8: fuck off, that's why
f := 1;
while f <= ParamCount do
Inc(f)
end;
- if LogFileName = '' then
- begin
-{$IFDEF HEADLESS}
- LogFileName := 'Doom2DF_H.log';
-{$ELSE}
- LogFileName := 'Doom2DF.log';
-{$ENDIF}
- end;
-
if noct then
begin
Main()