DEADSOFTWARE

game: disable gibs for server
[d2df-sdl.git] / src / game / g_console.pas
index 20f7c8395ead0237e99d0a4f044176573021a570..9a8fd1188eb6c3269a040c4253d8000cac2082d4 100644 (file)
@@ -103,10 +103,16 @@ uses
   {$IFDEF ENABLE_MENU}
     g_gui, g_menu,
   {$ENDIF}
-  {$IFNDEF HEADLESS}
-    g_touch,
+  {$IFDEF ENABLE_TOUCH}
+    g_system,
   {$ENDIF}
-  g_textures, e_input, g_game, g_gfx, g_player, g_items,
+  {$IFDEF ENABLE_GFX}
+    g_gfx,
+  {$ENDIF}
+  {$IFDEF ENABLE_GIBS}
+    g_gibs,
+  {$ENDIF}
+  g_textures, e_input, g_game, g_player, g_items,
   SysUtils, g_basic, g_options, Math, e_res,
   g_language, g_net, g_netmsg, e_log, conbuf;
 
@@ -165,8 +171,8 @@ begin
   gChatShow := False;
   gConsoleShow := not gConsoleShow;
   InputReady := False;
-  {$IFNDEF HEADLESS}
-    g_Touch_ShowKeyboard(gConsoleShow or gChatShow);
+  {$IFDEF ENABLE_TOUCH}
+    sys_ShowKeyboard(gConsoleShow or gChatShow);
   {$ENDIF}
 end;
 
@@ -179,8 +185,8 @@ begin
   InputReady := False;
   Line := '';
   CPos := 1;
-  {$IFNDEF HEADLESS}
-    g_Touch_ShowKeyboard(gConsoleShow or gChatShow);
+  {$IFDEF ENABLE_TOUCH}
+    sys_ShowKeyboard(gConsoleShow or gChatShow);
   {$ENDIF}
 end;
 
@@ -875,11 +881,11 @@ begin
   'unbindall':
     for i := 0 to e_MaxInputKeys - 1 do
       g_Console_BindKey(i, '');
-{$IFNDEF HEADLESS}
+{$IFDEF ENABLE_TOUCH}
   'showkeyboard':
-    g_Touch_ShowKeyboard(True);
+    sys_ShowKeyboard(True);
   'hidekeyboard':
-    g_Touch_ShowKeyboard(False);
+    sys_ShowKeyboard(False);
 {$ENDIF}
   'togglemenu':
     begin
@@ -1997,9 +2003,13 @@ begin
   WriteLn(f, 'sv_public ', IfThen(NetUseMaster, 1, 0));
 
   // game settings
-  WriteLn(f, 'g_max_particles ', g_GFX_GetMax());
+  {$IFDEF ENABLE_GFX}
+    WriteLn(f, 'g_max_particles ', g_GFX_GetMax());
+  {$ENDIF}
   WriteLn(f, 'g_max_shells ', g_Shells_GetMax());
-  WriteLn(f, 'g_max_gibs ', g_Gibs_GetMax());
+  {$IFDEF ENABLE_GIBS}
+    WriteLn(f, 'g_max_gibs ', g_Gibs_GetMax());
+  {$ENDIF}
   WriteLn(f, 'g_max_corpses ', g_Corpses_GetMax());
   WriteLn(f, 'sv_intertime ', gDefInterTime);