diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 44d23d13850c5a187ea118a7e1b8790f93cec346..6fdc3094a2b9844920eca1de146363107f052080 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
g_triggers in 'g_triggers.pas',
g_weapons in 'g_weapons.pas',
g_window in 'g_window.pas',
-{$IFNDEF HEADLESS}
- {$IFDEF USE_SYSSTUB}
- g_system in 'stub/g_system.pas',
- {$ENDIF}
- {$IFDEF USE_SDL}
- g_system in 'sdl/g_system.pas',
- {$ENDIF}
- {$IFDEF USE_SDL2}
- g_system in 'sdl2/g_system.pas',
- {$ENDIF}
-{$ENDIF}
-{$IFDEF ENABLE_RENDER}
- {$I ../shared/vampimg.inc}
- r_animations in 'opengl/r_animations.pas',
- r_console in 'opengl/r_console.pas',
- r_game in 'opengl/r_game.pas',
- {$IFDEF ENABLE_GFX}
- r_gfx in 'opengl/r_gfx.pas',
- {$ENDIF}
- r_graphics in 'opengl/r_graphics.pas',
- r_items in 'opengl/r_items.pas',
- r_map in 'opengl/r_map.pas',
- r_monsters in 'opengl/r_monsters.pas',
- r_netmaster in 'opengl/r_netmaster.pas',
- r_player in 'opengl/r_player.pas',
- r_playermodel in 'opengl/r_playermodel.pas',
- r_render in 'opengl/r_render.pas',
- r_texture in 'opengl/r_texture.pas',
- r_textures in 'opengl/r_textures.pas',
- r_weapons in 'opengl/r_weapons.pas',
- r_window in 'opengl/r_window.pas',
- {$IFDEF ENABLE_TOUCH}
- r_touch in 'opengl/r_touch.pas',
+ {$IFDEF ENABLE_SYSTEM}
+ {$IFDEF USE_SYSSTUB}
+ g_system in 'stub/g_system.pas',
+ {$ENDIF}
+ {$IFDEF USE_SDL}
+ g_system in 'sdl/g_system.pas',
+ {$ENDIF}
+ {$IFDEF USE_SDL2}
+ g_system in 'sdl2/g_system.pas',
+ {$ENDIF}
{$ENDIF}
+
{$IFDEF ENABLE_MENU}
g_gui in 'g_gui.pas',
g_menu in 'g_menu.pas',
{$ENDIF}
+
+{$IFDEF ENABLE_RENDER}
+ {$IF DEFINED(USE_OPENGL) OR DEFINED(USE_GLES1) OR DEFINED(USE_GLSTUB)}
+ {$I ../shared/vampimg.inc}
+ r_animations in 'opengl/r_animations.pas',
+ r_console in 'opengl/r_console.pas',
+ r_game in 'opengl/r_game.pas',
+ {$IFDEF ENABLE_GFX}
+ r_gfx in 'opengl/r_gfx.pas',
+ {$ENDIF}
+ r_graphics in 'opengl/r_graphics.pas',
+ r_items in 'opengl/r_items.pas',
+ r_map in 'opengl/r_map.pas',
+ r_monsters in 'opengl/r_monsters.pas',
+ r_netmaster in 'opengl/r_netmaster.pas',
+ r_player in 'opengl/r_player.pas',
+ r_playermodel in 'opengl/r_playermodel.pas',
+ r_render in 'opengl/r_render.pas',
+ r_texture in 'opengl/r_texture.pas',
+ r_textures in 'opengl/r_textures.pas',
+ r_weapons in 'opengl/r_weapons.pas',
+ r_window in 'opengl/r_window.pas',
+ {$IFDEF ENABLE_TOUCH}
+ r_touch in 'opengl/r_touch.pas',
+ {$ENDIF}
+ {$IFDEF ENABLE_MENU}
+ r_gui in 'opengl/r_gui.pas',
+ {$ENDIF}
+ {$ELSEIF DEFINED(USE_STUBRENDER)}
+ r_render in 'renders/stub/r_render.pas',
+ {$ELSEIF DEFINED(USE_NEWGL)}
+ {$I ../shared/vampimg.inc}
+ r_render in 'renders/opengl/r_render.pas',
+ r_atlas in 'renders/opengl/r_atlas.pas',
+ r_textures in 'renders/opengl/r_textures.pas',
+ r_draw in 'renders/opengl/r_draw.pas',
+ r_map in 'renders/opengl/r_map.pas',
+ {$ELSE}
+ {$FATAL render driver not selected}
+ {$ENDIF}
{$ENDIF}
{$IFDEF USE_FMOD}
Time, Time_Delta: Int64;
Frame: Int64;
begin
- {$IFDEF HEADLESS}
- Result := False;
- {$ELSE}
+ {$IFDEF ENABLE_SYSTEM}
Result := sys_HandleInput();
+ {$ELSE}
+ Result := False;
{$ENDIF}
Time := GetTickCount64();
gLerpFactor := 1.0
else
gLerpFactor := nmin(1.0, (Time - Time_Old) / 28.0);
-{$IFDEF ENABLE_RENDER}
- r_Render_Draw;
- sys_Repaint;
-{$ENDIF}
+ {$IFDEF ENABLE_RENDER}
+ r_Render_Draw;
+ {$ENDIF}
+ {$IFDEF ENABLE_SYSTEM}
+ sys_Repaint;
+ {$ENDIF}
Frame := Time
end
else
begin
itmp := 0;
val(ParamStr(idx), itmp, valres);
- {$IFNDEF HEADLESS}
if (valres = 0) and (not g_holmes_imfunctional) then
begin
case itmp of
16: uiContext.font := 'win16';
end;
end;
- {$ELSE}
- // fuck off, fpc!
- itmp := itmp;
- valres := valres;
- {$ENDIF}
Inc(idx);
end;
end;
InitPrep;
e_Input_Initialize;
InitSound;
- {$IFNDEF HEADLESS}
+ {$IFDEF ENABLE_SYSTEM}
sys_Init;
sys_CharPress := @CharPress; (* install hook *)
sys_ScreenResize := @ScreenResize; (* install hook *)
g_Game_Init;
{$IFDEF ENABLE_MENU}
g_Menu_Init;
- g_GUI_Init;
{$ENDIF}
g_Game_Process_Params;
// TODO reload GAME textures
(* g_Touch_Finalize; *)
{$IFDEF ENABLE_RENDER}
r_Render_Finalize;
+ {$ENDIF}
+ {$IFDEF ENABLE_SYSTEM}
sys_Final;
{$ENDIF}
g_Console_Finalize;