DEADSOFTWARE

game: disable gfx for server
[d2df-sdl.git] / src / game / g_options.pas
index cc7cba15f28a0a86839d30f40ac03d0f281308b2..e825938b09beaf404853489cb01ae55497b560a7 100644 (file)
@@ -91,6 +91,13 @@ var
   g_dbg_aimline_on: Boolean = false;
   g_dbg_input: Boolean = False;
 
+  var (* touch *)
+    g_touch_enabled: Boolean = False;
+    g_touch_size: Single = 1.0;
+    g_touch_offset: Single = 50.0;
+    g_touch_fire: Boolean = True;
+    g_touch_alt: Boolean = False;
+
   {--- Read-only dirs ---}
   GameWAD: string;
   DataDirs: SSArray;
@@ -119,7 +126,10 @@ uses
   {$IFDEF USE_SDL2}
     SDL2,
   {$ENDIF}
-  e_log, e_input, g_console, g_sound, g_gfx, g_player, Math,
+  {$IFDEF ENABLE_GFX}
+    g_gfx,
+  {$ENDIF}
+  e_log, e_input, g_console, g_sound, g_player, Math,
   g_map, g_net, g_netmaster, SysUtils, CONFIG, g_game,
   g_items, wadreader, envvars;
 
@@ -271,7 +281,9 @@ begin
   end;
 
   (* section Game *)
-  g_GFX_SetMax(2000);
+  {$IFDEF ENABLE_GFX}
+    g_GFX_SetMax(2000);
+  {$ENDIF}
   g_Shells_SetMax(300);
   g_Gibs_SetMax(150);
   g_Corpses_SetMax(20);
@@ -403,5 +415,12 @@ initialization
   conRegVar('g_screenshot_stats', @gScreenshotStats, '', '');
   conRegVar('g_lastmap', @gsMap, '', '');
 
-  conRegVar('d_input', @g_dbg_input, '', '')
+  conRegVar('d_input', @g_dbg_input, '', '');
+
+  (* touch *)
+  conRegVar('touch_enable', @g_touch_enabled, 'enable/disable virtual buttons', 'draw buttons');
+  conRegVar('touch_fire', @g_touch_fire, 'enable/disable fire when press virtual up/down', 'fire when press up/down');
+  conRegVar('touch_size', @g_touch_size, 0.1, 10, 'size of virtual buttons', 'button size');
+  conRegVar('touch_offset', @g_touch_offset, 0, 100, '', '');
+  conRegVar('touch_alt', @g_touch_alt, 'althernative virtual buttons layout', 'althernative layout');
 end.