DEADSOFTWARE

Sweep-And-Prune broad phase implementation; not working yet
[d2df-sdl.git] / src / game / g_window.pas
index 045a49ff69cea7a4355e292417fd58edaf07711a..582c2d98973da6f38b5819829fc5c807d10e1a3b 100644 (file)
@@ -47,7 +47,8 @@ uses
 {$IFDEF WINDOWS}Windows,{$ENDIF}
   SDL2, GL, GLExt, e_graphics, e_log, g_main,
   g_console, SysUtils, e_input, g_options, g_game,
-  g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net;
+  g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net,
+  g_map;
 
 var
   h_Wnd: PSDL_Window;
@@ -577,6 +578,8 @@ begin
     wNeedTimeReset := False;
   end;
 
+  g_Map_ProfilersBegin();
+
   t := Time_Delta div 28{(27777 div 1000)};
   if t > 0 then
   begin
@@ -594,6 +597,8 @@ begin
     else if NetMode = NET_CLIENT then g_Net_Client_Update();
   end;
 
+  g_Map_ProfilersEnd();
+
   if wLoadingQuit then
   begin
     g_Game_Free();
@@ -703,6 +708,9 @@ begin
   begin
     if ParamStr(idx) = '--opengl-dump-exts' then gwin_dump_extensions := true;
     if ParamStr(idx) = '--twinkletwinkle' then gwin_k8_enable_light_experiments := true;
+    if ParamStr(idx) = '--jah' then g_profile_history_size := 100;
+    if ParamStr(idx) = '--sap' then gdbg_map_use_sap := true;
+    if ParamStr(idx) = '--grid' then gdbg_map_use_sap := false;
   end;
 
   e_WriteLog('Initializing OpenGL', MSG_NOTIFY);