summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e43b97)
raw | patch | inline | side by side (parent: 1e43b97)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 29 Jan 2022 19:17:14 +0000 (22:17 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 29 Jan 2022 19:17:14 +0000 (22:17 +0300) |
diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 5a06f52c4e40bc39f5e4624cac70e2ab1ce6c27d..63c895ff61327403c229a522bd5fa4d70b9c604b 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
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;
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 687a412661b7b6fa3ea0b4eeb9b684c26981f734..ab2099a7ec141608f1a0d661dfd2b6d8408a40a3 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
//SetLength(ConsoleHistory, Length(ConsoleHistory)+1);
//ConsoleHistory[High(ConsoleHistory)] := L;
-
- (*
-{$IFDEF HEADLESS}
- e_WriteLog('CON: ' + L, MSG_NOTIFY);
-{$ENDIF}
- *)
end;
diff --git a/src/game/g_corpses.pas b/src/game/g_corpses.pas
index d4c6c5010a6e3f3cc3b5b44250e8bf6150a16c7f..3f08d7966f3dc71a9a19b2a4577f37573b12fb20 100644 (file)
--- a/src/game/g_corpses.pas
+++ b/src/game/g_corpses.pas
procedure g_Corpses_RemoveAll;
procedure g_Corpses_Update;
- {$IFNDEF HEADLESS}
+ {$IFDEF ENABLE_RENDER}
function g_Corpses_GetCameraObj (Player: TPlayer): TObj;
{$ENDIF}
SetLength(gCorpses, MaxCorpses);
end;
-{$IFNDEF HEADLESS}
+{$IFDEF ENABLE_RENDER}
function g_Corpses_GetCameraObj (Player: TPlayer): TObj;
begin
{$IFDEF ENABLE_CORPSES}
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index de56a17540e941d289947a4dc780f82bb5555211..13020b7ad4195df873ad1d419dbfdeeadf76553d 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
{$IFDEF ENABLE_MENU}
procedure g_Game_InGameMenu(Show: Boolean);
{$ENDIF}
-{$IFNDEF HEADLESS}
+{$IFDEF ENABLE_SYSTEM}
procedure CharPress (C: AnsiChar);
{$ENDIF}
+
procedure KeyPress (K: Word);
{ procedure SetWinPause(Enable: Boolean); }
end;
{$ENDIF}
-{$IFNDEF HEADLESS}
+{$IFDEF ENABLE_SYSTEM}
procedure CharPress (C: AnsiChar);
{$IFDEF ENABLE_MENU}
var Msg: g_gui.TMessage;
// Нужно сменить разрешение:
if gResolutionChange then
begin
- {$IFNDEF HEADLESS}
+ {$IFDEF ENABLE_RENDER}
e_WriteLog('Changing resolution', TMsgType.Notify);
r_Render_Apply;
{$ENDIF}
gMusic.Free();
g_Game_FreeData();
g_PlayerModel_FreeData();
-{$IFNDEF HEADLESS}
- //g_Menu_Free(); //k8: this segfaults after resolution change; who cares?
-{$ENDIF}
+ {$IFDEF ENABLE_MENU}
+ // g_Menu_Free(); //k8: this segfaults after resolution change; who cares?
+ {$ENDIF}
if NetInitDone then g_Net_Free;
diff --git a/src/game/g_holmes.pas b/src/game/g_holmes.pas
index 06cc70736982c57703c3117d2412173fcf48ea0a..2c1544723acf5ed8cd070dfb6cdacdc20fea6907 100644 (file)
--- a/src/game/g_holmes.pas
+++ b/src/game/g_holmes.pas
// ////////////////////////////////////////////////////////////////////////// //
procedure g_Holmes_OnEvent (var ev: TFUIEvent);
-{$IF not DEFINED(HEADLESS)}
-var
- doeat: Boolean = false;
-{$ENDIF}
+ var doeat: Boolean = false;
begin
-{$IF not DEFINED(HEADLESS)}
if g_Game_IsNet then exit;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
if (ev.key) then
begin
+{$IFDEF USE_SDL2}
case ev.scan of
SDL_SCANCODE_LCTRL, SDL_SCANCODE_RCTRL,
SDL_SCANCODE_LALT, SDL_SCANCODE_RALT,
SDL_SCANCODE_LSHIFT, SDL_SCANCODE_RSHIFT:
doeat := true;
end;
+{$ENDIF}
end
else if (ev.mouse) then
begin
end;
if (doeat) then ev.eat();
-{$ENDIF}
end;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
- {$IF not DEFINED(HEADLESS)}
holmesInitCommands();
holmesInitBinds();
+{$IFDEF ENABLE_RENDER}
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // modify color buffer
glDisable(GL_STENCIL_TEST);
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
if gGameOn then plrDebugDraw();
- {$ENDIF}
+{$ENDIF}
laserSet := false;
end;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
- {$IF not DEFINED(HEADLESS)}
gGfxDoClear := false;
+
+{$IFDEF ENABLE_RENDER}
//if assigned(prerenderFrameCB) then prerenderFrameCB();
uiDraw();
glMatrixMode(GL_MODELVIEW);
finally
glPopMatrix();
end;
- {$ENDIF}
+{$ENDIF}
end;
index 314c7e7ac21d663d3dc4ba4546f71f03143b52ed..6b25a4f69aa81c63b34fb3e30cc5402270810d81 100644 (file)
// HACK: take stats screenshot immediately after the first frame of the stats showing
if gScreenshotStats and (not StatShotDone) and (Length(CustomStat.PlayerStat) > 1) then
begin
-{$IFNDEF HEADLESS}
g_TakeScreenShot('stats/' + StatFilename);
-{$ENDIF}
StatShotDone := True;
end;
end;
end;
{$ENDIF}
-{$IFNDEF HEADLESS}
r_Console_Draw();
-{$ENDIF}
if g_debug_Sounds and gGameOn then
begin
index 74e8d0354079582af6be99980952b11d6e8f5769..d42612803e82798cae30add27b89fca8c7d39724 100644 (file)
procedure sys_ShowKeyboard (yes: Boolean);
begin
- {$IFNDEF HEADLESS}
- if g_dbg_input then
- e_LogWritefln('g_Touch_ShowKeyboard(%s)', [yes]);
- (* on desktop we always receive text (needed for cheats) *)
- if yes or (SDL_HasScreenKeyboardSupport() = SDL_FALSE) then
- SDL_StartTextInput
- else
- SDL_StopTextInput
- {$ENDIF}
+ if g_dbg_input then
+ e_LogWritefln('g_Touch_ShowKeyboard(%s)', [yes]);
+ (* on desktop we always receive text (needed for cheats) *)
+ if yes or (SDL_HasScreenKeyboardSupport() = SDL_FALSE) then
+ SDL_StartTextInput
+ else
+ SDL_StopTextInput
end;
procedure HandleTouch (const ev: TSDL_TouchFingerEvent);
diff --git a/src/shared/a_modes.inc b/src/shared/a_modes.inc
index 13ee251ab42e57a9271428f782b23fba338e33f4..4ba00072e19a70c49acf7c929bce56f33712aa66 100644 (file)
--- a/src/shared/a_modes.inc
+++ b/src/shared/a_modes.inc
{$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_GLES1)}
{$ERROR Only one render driver must be selected!}
{$ENDIF}
-{$ELSE}
+{$ELSEIF DEFINED(ENABLE_RENDER)}
{$DEFINE USE_OPENGL}
{.$ERROR Render driver not selected. Use -dUSE_GLSTUB or -dUSE_GLES1 or -dUSE_OPENGL}
{$ENDIF}
{$IFDEF ENABLE_HOLMES}
+ {$IFDEF DISABLE_SYSTEM}
+ {$FATAL System driver required for current Holmes implementation}
+ {$ENDIF}
+ {$IFDEF DISABLE_RENDER}
+ {$FATAL Render driver required for current Holmes implementation}
+ {$ENDIF}
{$IFNDEF USE_SDL2}
- {$ERROR Holmes supported only with SDL2}
+ {$FATAL SDL2 required for current Holmes implementation}
{$ENDIF}
{$IFNDEF USE_OPENGL}
- {$ERROR Holmes supported only with desktop OpenGL}
+ {$FATAL Desktop OpenGL required for current Holmes implementation}
{$ENDIF}
{$ENDIF}