diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index 1b60950e0acfa4a33a15fcc31c220dc4842d63e3..0cf15d68e7496a62fe4389700811d9bd2dec47b1 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
gwin_dump_extensions: Boolean = false;
gwin_has_stencil: Boolean = false;
gwin_k8_enable_light_experiments: Boolean = false;
+ g_dbg_aimline_on: Boolean = false;
implementation
var
idx: Integer;
ltmp: Integer;
+ arg: AnsiString;
begin
{$IFDEF HEADLESS}
e_NoGraphics := True;
{$ENDIF}
- for idx := 1 to ParamCount do
- 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) = '--no-particles' then gpart_dbg_enabled := false;
- if ParamStr(idx) = '--no-los' then gmon_dbg_los_enabled := false;
-
- if ParamStr(idx) = '--profile-render' then g_profile_frame_draw := true;
- if ParamStr(idx) = '--profile-coldet' then g_profile_collision := true;
- if ParamStr(idx) = '--profile-los' then g_profile_los := true;
+ idx := 1;
+ while (idx <= ParamCount) do
+ begin
+ arg := ParamStr(idx);
+ Inc(idx);
+ if arg = '--opengl-dump-exts' then gwin_dump_extensions := true;
+ if arg = '--twinkletwinkle' then gwin_k8_enable_light_experiments := true;
+ if arg = '--jah' then g_profile_history_size := 100;
+ if arg = '--no-particles' then gpart_dbg_enabled := false;
+ if arg = '--no-los' then gmon_dbg_los_enabled := false;
+
+ if arg = '--profile-render' then g_profile_frame_draw := true;
+ if arg = '--profile-coldet' then g_profile_collision := true;
+ if arg = '--profile-los' then g_profile_los := true;
+
+ if arg = '--no-part-phys' then gpart_dbg_phys_enabled := false;
+ if arg = '--no-part-physics' then gpart_dbg_phys_enabled := false;
+ if arg = '--no-particles-phys' then gpart_dbg_phys_enabled := false;
+ if arg = '--no-particles-physics' then gpart_dbg_phys_enabled := false;
+ if arg = '--no-particle-phys' then gpart_dbg_phys_enabled := false;
+ if arg = '--no-particle-physics' then gpart_dbg_phys_enabled := false;
+
+ {$IF DEFINED(D2F_DEBUG)}
+ if arg = '--aimline' then g_dbg_aimline_on := false;
+ {$ENDIF}
- if ParamStr(idx) = '--no-part-phys' then gpart_dbg_phys_enabled := false;
- if ParamStr(idx) = '--no-part-physics' then gpart_dbg_phys_enabled := false;
- if ParamStr(idx) = '--no-particles-phys' then gpart_dbg_phys_enabled := false;
- if ParamStr(idx) = '--no-particles-physics' then gpart_dbg_phys_enabled := false;
- if ParamStr(idx) = '--no-particle-phys' then gpart_dbg_phys_enabled := false;
- if ParamStr(idx) = '--no-particle-physics' then gpart_dbg_phys_enabled := false;
+ if arg = '--holmes' then begin g_holmes_enabled := true; g_Game_SetDebugMode(); end;
+ if (arg = '--holmes-ui-scale') or (arg = '-holmes-ui-scale') then
+ begin
+ if (idx <= ParamCount) then
+ begin
+ if not conParseFloat(g_holmes_ui_scale, ParamStr(idx)) then g_holmes_ui_scale := 1.0;
+ Inc(idx);
+ end;
+ end;
- if ParamStr(idx) = '--holmes' then begin g_holmes_enabled := true; g_Game_SetDebugMode(); end;
+ {$IF DEFINED(D2F_DEBUG)}
+ if (arg = '--game-scale') or (arg = '-game-scale') then
+ begin
+ if (idx <= ParamCount) then
+ begin
+ if not conParseFloat(g_dbg_scale, ParamStr(idx)) then g_dbg_scale := 1.0;
+ Inc(idx);
+ end;
+ end;
+ {$ENDIF}
end;
e_WriteLog('Initializing OpenGL', MSG_NOTIFY);