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);
// ////////////////////////////////////////////////////////////////////////// //
procedure g_Holmes_OnEvent (var ev: TFUIEvent);
-{$IF not DEFINED(HEADLESS)}
-var
- doeat: Boolean = false;
-{$ENDIF}
+ var doeat: Boolean = false;
begin
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 g_Game_IsNet then exit;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
if (ev.key) then
begin
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;
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
else if (ev.mouse) then
begin
end;
if (doeat) then ev.eat();
end;
if (doeat) then ev.eat();
-{$ENDIF}
end;
end;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
- {$IF not DEFINED(HEADLESS)}
holmesInitCommands();
holmesInitBinds();
holmesInitCommands();
holmesInitBinds();
+{$IFDEF ENABLE_RENDER}
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // modify color buffer
glDisable(GL_STENCIL_TEST);
glDisable(GL_BLEND);
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();
glDisable(GL_TEXTURE_2D);
if gGameOn then plrDebugDraw();
- {$ENDIF}
+{$ENDIF}
laserSet := false;
end;
laserSet := false;
end;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
if not g_holmes_enabled then exit;
if g_holmes_imfunctional then exit;
- {$IF not DEFINED(HEADLESS)}
gGfxDoClear := false;
gGfxDoClear := false;
+
+{$IFDEF ENABLE_RENDER}
//if assigned(prerenderFrameCB) then prerenderFrameCB();
uiDraw();
glMatrixMode(GL_MODELVIEW);
//if assigned(prerenderFrameCB) then prerenderFrameCB();
uiDraw();
glMatrixMode(GL_MODELVIEW);
finally
glPopMatrix();
end;
finally
glPopMatrix();
end;
- {$ENDIF}
+{$ENDIF}
end;
end;