diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 14819e284ce75d894275691a2df17ee83f2f15a9..f966e26229eeac837a2e2536655b547d2a8a10f2 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
P2MoveButton: Byte = 0;
g_profile_frame_update: Boolean = false;
- g_profile_frame_draw: Boolean = true;
+ g_profile_frame_draw: Boolean = false;
procedure g_ResetDynlights ();
procedure g_AddDynLight (x, y, radius: Integer; r, g, b, a: Single);
procedure ProfilerCommands (P: SArray);
var
cmd: string;
+
+ function getBool (idx: Integer): Integer;
+ begin
+ if (idx < 0) or (idx > High(P)) then begin result := -1; exit; end;
+ result := 0;
+ if (P[idx] = '1') or (P[idx] = 'on') or (P[idx] = 'true') or (P[idx] = 'tan') then result := 1;
+ end;
+
begin
//if not gDebugMode then exit;
cmd := LowerCase(P[0]);
g_profile_frame_update := not g_profile_frame_update;
exit;
end;
+ if cmd = 'r_draw_grid' then
+ begin
+ case getBool(1) of
+ -1: begin end;
+ 0: gdbg_map_use_grid_render := false;
+ 1: gdbg_map_use_grid_render := true;
+ end;
+ if gdbg_map_use_grid_render then g_Console_Add('grid rendering: tan') else g_Console_Add('grid rendering: ona');
+ exit;
+ end;
+ if cmd = 'dbg_coldet_grid' then
+ begin
+ case getBool(1) of
+ -1: begin end;
+ 0: gdbg_map_use_grid_coldet := false;
+ 1: gdbg_map_use_grid_coldet := true;
+ end;
+ if gdbg_map_use_grid_coldet then g_Console_Add('grid coldet: tan') else g_Console_Add('grid coldet: ona');
+ exit;
+ end;
end;
procedure DebugCommands(P: SArray);
begin
Parse_Params(pars);
+ s := Find_Param_Value(pars, '--profile-frame');
+ if (s <> '') then g_profile_frame_draw := true;
+
// Debug mode:
s := Find_Param_Value(pars, '--debug');
if (s <> '') then