X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2FDoom2DF.lpr;h=e7999c553863f7840e31b71ff6b812be1d4ca624;hb=bb931202515154fd56edaa5657d0f69f1cce0e75;hp=c56af24696221e14e974b32deaae5d8a55b6b439;hpb=6338d3fa6f58068fbde836957e6d8cfb654bb195;p=d2df-sdl.git diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr index c56af24..e7999c5 100644 --- a/src/game/Doom2DF.lpr +++ b/src/game/Doom2DF.lpr @@ -123,7 +123,18 @@ uses g_res_downloader in 'g_res_downloader.pas', g_grid in 'g_grid.pas', g_game in 'g_game.pas', - g_gfx in 'g_gfx.pas', + {$IFDEF ENABLE_GFX} + g_gfx in 'g_gfx.pas', + {$ENDIF} + {$IFDEF ENABLE_GIBS} + g_gibs in 'g_gibs.pas', + {$ENDIF} + {$IFDEF ENABLE_SHELLS} + g_shells in 'g_shells.pas', + {$ENDIF} + {$IFDEF ENABLE_CORPSES} + g_corpses in 'g_corpses.pas', + {$ENDIF} g_items in 'g_items.pas', g_map in 'g_map.pas', g_monsters in 'g_monsters.pas', @@ -140,24 +151,23 @@ uses {$IFNDEF HEADLESS} {$IFDEF USE_SYSSTUB} g_system in 'stub/g_system.pas', - g_touch in 'stub/g_touch.pas', {$ENDIF} {$IFDEF USE_SDL} g_system in 'sdl/g_system.pas', - g_touch in 'sdl/g_touch.pas', {$ENDIF} {$IFDEF USE_SDL2} g_system in 'sdl2/g_system.pas', - g_touch in 'sdl2/g_touch.pas', {$ENDIF} {$ENDIF} -{$IFNDEF HEADLESS} +{$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', - r_gfx in 'opengl/r_gfx.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', @@ -170,8 +180,13 @@ uses r_textures in 'opengl/r_textures.pas', r_weapons in 'opengl/r_weapons.pas', r_window in 'opengl/r_window.pas', - g_gui in 'g_gui.pas', - g_menu in 'g_menu.pas', + {$IFDEF ENABLE_TOUCH} + r_touch in 'opengl/r_touch.pas', + {$ENDIF} + {$IFDEF ENABLE_MENU} + g_gui in 'g_gui.pas', + g_menu in 'g_menu.pas', + {$ENDIF} {$ENDIF} {$IFDEF USE_FMOD} @@ -233,7 +248,7 @@ begin if (NetMode = NET_SERVER) then g_Net_Host_Update() else if (NetMode = NET_CLIENT) then g_Net_Client_Update(); // think -{$IFNDEF HEADLESS} +{$IFDEF ENABLE_RENDER} r_Render_Update; {$ENDIF} g_Game_Update(); @@ -300,7 +315,7 @@ begin gLerpFactor := 1.0 else gLerpFactor := nmin(1.0, (Time - Time_Old) / 28.0); -{$IFNDEF HEADLESS} +{$IFDEF ENABLE_RENDER} r_Render_Draw; sys_Repaint; {$ENDIF} @@ -329,19 +344,21 @@ begin Inc(idx); //if arg = '--twinkletwinkle' then gwin_k8_enable_light_experiments := true; if arg = '--jah' then g_profile_history_size := 100; - if arg = '--no-particles' then gpart_dbg_enabled := false; if arg = '--no-los' then gmon_dbg_los_enabled := false; if arg = '--profile-render' then g_profile_frame_draw := true; if arg = '--profile-coldet' then g_profile_collision := true; if arg = '--profile-los' then g_profile_los := true; - if arg = '--no-part-phys' then gpart_dbg_phys_enabled := false; - if arg = '--no-part-physics' then gpart_dbg_phys_enabled := false; - if arg = '--no-particles-phys' then gpart_dbg_phys_enabled := false; - if arg = '--no-particles-physics' then gpart_dbg_phys_enabled := false; - if arg = '--no-particle-phys' then gpart_dbg_phys_enabled := false; - if arg = '--no-particle-physics' then gpart_dbg_phys_enabled := false; + {$IFDEF ENABLE_GFX} + if arg = '--no-particles' then gpart_dbg_enabled := false; + if arg = '--no-part-phys' then gpart_dbg_phys_enabled := false; + if arg = '--no-part-physics' then gpart_dbg_phys_enabled := false; + if arg = '--no-particles-phys' then gpart_dbg_phys_enabled := false; + if arg = '--no-particles-physics' then gpart_dbg_phys_enabled := false; + if arg = '--no-particle-phys' then gpart_dbg_phys_enabled := false; + if arg = '--no-particle-physics' then gpart_dbg_phys_enabled := false; + {$ENDIF} if arg = '--debug-input' then g_dbg_input := True; @@ -923,7 +940,7 @@ end; procedure ScreenResize (w, h: Integer); begin - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_RENDER} r_Render_Resize(w, h); {$IFDEF ENABLE_HOLMES} fuiScrWdt := w; @@ -931,7 +948,9 @@ end; {$ENDIF} {$IFNDEF ANDROID} (* This will fix menu reset on keyboard showing *) - g_Menu_Reset; + {$IFDEF ENABLE_MENU} + g_Menu_Reset; + {$ENDIF} {$ENDIF} //g_Game_ClearLoading; {$IFDEF ENABLE_HOLMES} @@ -958,9 +977,8 @@ end; g_Console_Initialize; // TODO move load configs here g_Language_Set(gLanguage); - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_RENDER} r_Render_Initialize; - g_Touch_Init; {$ENDIF} DebugOptions; g_Net_InitLowLevel; @@ -968,30 +986,32 @@ end; {$IFDEF ENABLE_HOLMES} InitHolmes; {$ENDIF} - {$IFDEF HEADLESS} - g_PlayerModel_LoadFake('doomer', 'doomer.wad'); - {$ELSE} + {$IFDEF ENABLE_RENDER} g_PlayerModel_LoadAll; r_Render_Load; + {$ELSE} + g_PlayerModel_LoadFake('doomer', 'doomer.wad'); {$ENDIF} g_Game_Init; - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_MENU} g_Menu_Init; g_GUI_Init; {$ENDIF} g_Game_Process_Params; // TODO reload GAME textures g_Console_Init; // welcome message - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_MENU} if (not gGameOn) and gAskLanguage then g_Menu_AskLanguage; {$ENDIF} Time_Old := GetTickCount64(); while not ProcessMessage() do begin end; g_Console_WriteGameConfig; - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_MENU} g_GUI_Destroy; g_Menu_Free; + {$ENDIF} + {$IFDEF ENABLE_RENDER} r_Render_Free; {$ENDIF} {$IFDEF ENABLE_HOLMES} @@ -1000,7 +1020,7 @@ end; g_Net_Slist_ShutdownAll; g_Net_DeinitLowLevel; (* g_Touch_Finalize; *) - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_RENDER} r_Render_Finalize; sys_Final; {$ENDIF}