m_entersound = true;
if (key_dest != key_menu || m_state != m_main)
+ {
+ if(Cmd_Argc() == 2 && !strcmp(Cmd_Argv(1), "1"))
+ return;
M_Menu_Main_f ();
+ }
else
{
+ if(Cmd_Argc() == 2 && !strcmp(Cmd_Argv(1), "0"))
+ return;
key_dest = key_game;
m_state = m_none;
}
}
-#define OPTIONS_ITEMS 40
+#define OPTIONS_ITEMS 39
static int options_cursor;
Cvar_SetValueQuick (&vid_conheight, bound(240, vid_conheight.value + dir * 48, 1536));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&scr_conalpha, bound(0, scr_conalpha.value + dir * 0.2, 1));
+ else if (options_cursor == optnum++)
+ Cvar_SetValueQuick (&scr_conbrightness, bound(0, scr_conbrightness.value + dir * 0.2, 1));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&sbar_alpha_bg, bound(0, sbar_alpha_bg.value + dir * 0.1, 1));
else if (options_cursor == optnum++)
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&scr_screenshot_jpeg_quality, bound(0, scr_screenshot_jpeg_quality.value + dir * 0.1, 1));
else if (options_cursor == optnum++)
- Cvar_SetValueQuick (&scr_screenshot_gamma, bound(0.1, scr_screenshot_gamma.value + dir * 0.1, 4));
+ Cvar_SetValueQuick (&scr_screenshot_gammaboost, bound(0.1, scr_screenshot_gammaboost.value + dir * 0.1, 4));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&r_sky, !r_sky.integer);
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&crosshair, bound(0, crosshair.integer + dir, 6));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&crosshair_size, bound(1, crosshair_size.value + dir, 5));
- else if (options_cursor == optnum++)
- Cvar_SetValueQuick (&crosshair_static, !crosshair_static.integer);
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&showfps, !showfps.integer);
else if (options_cursor == optnum++)
M_Options_PrintSlider( " 2D Screen Width ", true, vid_conwidth.value, 320, 2048);
M_Options_PrintSlider( " 2D Screen Height", true, vid_conheight.value, 240, 1536);
M_Options_PrintSlider( " Console Alpha", true, scr_conalpha.value, 0, 1);
+ M_Options_PrintSlider( "Conback Brightness", true, scr_conbrightness.value, 0, 1);
M_Options_PrintSlider( " Sbar Alpha BG", true, sbar_alpha_bg.value, 0, 1);
M_Options_PrintSlider( " Sbar Alpha FG", true, sbar_alpha_fg.value, 0, 1);
M_Options_PrintSlider( " Screen size", true, scr_viewsize.value, 30, 120);
M_Options_PrintSlider( " Field of View", true, scr_fov.integer, 1, 170);
M_Options_PrintCheckbox(" JPEG screenshots", jpeg_dll != NULL, scr_screenshot_jpeg.integer);
M_Options_PrintSlider( " JPEG quality", jpeg_dll != NULL, scr_screenshot_jpeg_quality.value, 0, 1);
- M_Options_PrintSlider( " Screenshot Gamma", jpeg_dll != NULL, scr_screenshot_gamma.value, 0.1, 4);
+ M_Options_PrintSlider( " Screenshot Gamma", jpeg_dll != NULL, scr_screenshot_gammaboost.value, 0.1, 4);
M_Options_PrintCheckbox(" Sky", true, r_sky.integer);
M_Options_PrintCheckbox(" Dithering", true, gl_dither.integer);
M_Options_PrintSlider( "Anisotropic Filter", gl_support_anisotropy, gl_texture_anisotropy.integer, 1, gl_max_anisotropy);
M_Options_PrintCheckbox(" Text Shadow", true, r_textshadow.integer);
M_Options_PrintSlider( " Crosshair", true, crosshair.value, 0, 5);
M_Options_PrintSlider( " Crosshair Size", true, crosshair_size.value, 1, 5);
- M_Options_PrintCheckbox(" Static Crosshair", true, crosshair_static.integer);
M_Options_PrintCheckbox(" Show Framerate", true, showfps.integer);
M_Options_PrintCheckbox(" Show Time", true, showtime.integer);
M_Options_PrintCheckbox(" Show Date", true, showdate.integer);
}
}
-#define OPTIONS_EFFECTS_ITEMS 35
+#define OPTIONS_EFFECTS_ITEMS 36
static int options_effects_cursor;
extern cvar_t r_explosionclip;
extern cvar_t r_coronas;
extern cvar_t gl_flashblend;
-extern cvar_t cl_beams_polygon;
-extern cvar_t cl_beams_relative;
+extern cvar_t cl_beams_polygons;
+extern cvar_t cl_beams_quakepositionhack;
+extern cvar_t cl_beams_instantaimhack;
extern cvar_t cl_beams_lightatend;
extern cvar_t r_lightningbeam_thickness;
extern cvar_t r_lightningbeam_scroll;
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_blood_alpha, bound(0.2, cl_particles_blood_alpha.value + dir * 0.1, 1));
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_blood_bloodhack, !cl_particles_blood_bloodhack.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_beams_polygons, !cl_beams_polygons.integer);
- else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_beams_relative, !cl_beams_relative.integer);
+ else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_beams_instantaimhack, !cl_beams_instantaimhack.integer);
+ else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_beams_quakepositionhack, !cl_beams_quakepositionhack.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_beams_lightatend, !cl_beams_lightatend.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_thickness, bound(1, r_lightningbeam_thickness.integer + dir, 10));
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_scroll, bound(0, r_lightningbeam_scroll.integer + dir, 10));
M_Options_PrintCheckbox(" Blood", true, cl_particles_blood.integer);
M_Options_PrintSlider( " Blood Opacity", true, cl_particles_blood_alpha.value, 0.2, 1);
M_Options_PrintCheckbox("Force New Blood Effect", true, cl_particles_blood_bloodhack.integer);
- M_Options_PrintCheckbox(" Lightning Polygons", true, cl_beams_polygons.integer);
- M_Options_PrintCheckbox("Lightning Smooth Sweep", true, cl_beams_relative.integer);
+ M_Options_PrintCheckbox(" Polygon Lightning", true, cl_beams_polygons.integer);
+ M_Options_PrintCheckbox("Smooth Sweep Lightning", true, cl_beams_instantaimhack.integer);
+ M_Options_PrintCheckbox(" Waist-level Lightning", true, cl_beams_quakepositionhack.integer);
M_Options_PrintCheckbox(" Lightning End Light", true, cl_beams_lightatend.integer);
M_Options_PrintSlider( " Lightning Thickness", cl_beams_polygons.integer, r_lightningbeam_thickness.integer, 1, 10);
M_Options_PrintSlider( " Lightning Scroll", cl_beams_polygons.integer, r_lightningbeam_scroll.integer, 0, 10);
}
-#define OPTIONS_GRAPHICS_ITEMS 14
+#define OPTIONS_GRAPHICS_ITEMS 18
static int options_graphics_cursor;
extern cvar_t r_bloom_power;
extern cvar_t r_bloom_blur;
extern cvar_t r_bloom_resolution;
+extern cvar_t r_hdr;
+extern cvar_t r_hdr_bloomintensity;
+extern cvar_t r_hdr_scenebrightness;
+extern cvar_t r_hdr_glowintensity;
extern cvar_t gl_picmip;
static void M_Menu_Options_Graphics_AdjustSliders (int dir)
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_lightmaps, bound(0, r_shadow_realtime_world_lightmaps.value + dir * 0.1, 1));
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_shadows, !r_shadow_realtime_world_shadows.integer);
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom, !r_bloom.integer);
- else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_intensity, bound(1, r_bloom_intensity.value + dir * 1, 16));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr, !r_hdr.integer);
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_bloomintensity, bound(0.125, r_hdr_bloomintensity.value + dir * 0.125, 4));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_glowintensity, bound(0, r_hdr_glowintensity.value + dir * 0.25, 4));
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_power, bound(1, r_bloom_power.value + dir * 1, 16));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_intensity, bound(1, r_bloom_intensity.value + dir * 0.25, 16));
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_blur, bound(1, r_bloom_blur.value + dir * 1, 16));
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_resolution, bound(64, r_bloom_resolution.value + dir * 64, 2048));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_scenebrightness, bound(0.25, r_hdr_scenebrightness.value + dir * 0.125, 4));
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&gl_picmip, bound(0, gl_picmip.value - dir, 3));
else if (options_graphics_cursor == optnum++) Cbuf_AddText ("r_restart\n");
}
M_Options_PrintCheckbox("RT World DLight Shadows", true, r_shadow_realtime_world_dlightshadows.integer);
M_Options_PrintSlider( " RT World Lightmaps", true, r_shadow_realtime_world_lightmaps.value, 0, 1);
M_Options_PrintCheckbox(" RT World Shadow", true, r_shadow_realtime_world_shadows.integer);
- M_Options_PrintCheckbox(" Bloom Effect", true, r_bloom.integer);
- M_Options_PrintSlider( " Bloom Intensity", true, r_bloom_intensity.value, 1, 16);
- M_Options_PrintSlider( " Bloom Power", true, r_bloom_power.value, 1, 16);
- M_Options_PrintSlider( " Bloom Blur", true, r_bloom_blur.value, 1, 16);
- M_Options_PrintSlider( " Bloom Resolution", true, r_bloom_resolution.value, 64, 2048);
+ M_Options_PrintCheckbox(" Bloom Effect", !r_hdr.integer, r_bloom.integer);
+ M_Options_PrintCheckbox(" HDR Bloom Effect", r_hdr.integer, r_hdr.integer);
+ M_Options_PrintSlider( " HDR Bloom Intensity", r_hdr.integer, r_hdr_bloomintensity.value, 0.125, 4);
+ M_Options_PrintSlider( " HDR Glow Intensity", r_hdr.integer, r_hdr_glowintensity.value, 0, 4);
+ M_Options_PrintSlider( "Non-HDR Bloom Darkening", !r_hdr.integer && r_bloom.integer, r_bloom_power.value, 1, 16);
+ M_Options_PrintSlider( " Bloom Intensity", r_hdr.integer || r_bloom.integer, r_bloom_intensity.value, 1, 16);
+ M_Options_PrintSlider( " Bloom Blur", r_hdr.integer || r_bloom.integer, r_bloom_blur.value, 1, 16);
+ M_Options_PrintSlider( " Bloom Resolution", r_hdr.integer || r_bloom.integer, r_bloom_resolution.value, 64, 2048);
+ M_Options_PrintSlider( " Scene Brightness", true, r_hdr_scenebrightness.value, 0.25, 4);
M_Options_PrintSlider( " Texture Quality", true, gl_picmip.value, 3, 0);
M_Options_PrintCommand( " Restart Renderer", true);
}
static int options_colorcontrol_cursor;
// intensity value to match up to 50% dither to 'correct' quake
-static cvar_t menu_options_colorcontrol_correctionvalue = {0, "menu_options_colorcontrol_correctionvalue", "0.25", "intensity value that matches up to white/black dither pattern, due to Quake's grey level being quite dark this is 0.25, other games may use other values"};
+static cvar_t menu_options_colorcontrol_correctionvalue = {0, "menu_options_colorcontrol_correctionvalue", "0.5", "intensity value that matches up to white/black dither pattern, should be 0.5 for linear color"};
void M_Menu_Options_ColorControl_f (void)
{
{
case 'Y':
case 'y':
- Cbuf_AddText ("exec default.cfg\n");
+ Cbuf_AddText ("cvar_resettodefaults_all;exec default.cfg\n");
// no break here since we also exit the menu
case K_ESCAPE:
//=============================================================================
/* Menu Subsystem */
-static void M_Keydown(int key, char ascii);
+static void M_KeyEvent(int key, char ascii, qboolean downevent);
static void M_Draw(void);
void M_ToggleMenu_f(void);
static void M_Shutdown(void);
}
-void M_Keydown (int key, char ascii)
+void M_KeyEvent (int key, char ascii, qboolean downevent)
{
+ if (!downevent)
+ return;
switch (m_state)
{
case m_none:
#define M_F_INIT "m_init"
#define M_F_KEYDOWN "m_keydown"
+#define M_F_KEYUP "m_keyup"
#define M_F_DRAW "m_draw"
// normal menu names (rest)
#define M_F_TOGGLE "m_toggle"
static int m_numrequiredfunc = sizeof(m_required_func) / sizeof(char*);
static func_t m_draw, m_keydown;
+static mfunction_t *m_keyup;
void MR_SetRouting (qboolean forceold);
Host_AbortCurrentFrame();
}
-void MP_Keydown (int key, char ascii)
+void MP_KeyEvent (int key, char ascii, qboolean downevent)
{
PRVM_Begin;
PRVM_SetProg(PRVM_MENUPROG);
// pass key
prog->globals.generic[OFS_PARM0] = (float) key;
prog->globals.generic[OFS_PARM1] = (float) ascii;
- PRVM_ExecuteProgram(m_keydown, M_F_KEYDOWN"(float key, float ascii) required\n");
+ if (downevent)
+ PRVM_ExecuteProgram(m_keydown, M_F_KEYDOWN"(float key, float ascii) required\n");
+ else if (m_keyup)
+ PRVM_ExecuteProgram((func_t)(m_keyup - prog->functions), M_F_KEYUP"(float key, float ascii) required\n");
PRVM_End;
}
// set m_draw and m_keydown
m_draw = (func_t) (PRVM_ED_FindFunction(M_F_DRAW) - prog->functions);
m_keydown = (func_t) (PRVM_ED_FindFunction(M_F_KEYDOWN) - prog->functions);
+ m_keyup = PRVM_ED_FindFunction(M_F_KEYUP);
#ifdef NG_MENU
m_displayed = false;
static cvar_t forceqmenu = { 0, "forceqmenu", "0", "enables the quake menu instead of the quakec menu.dat (if present)" };
-void (*MR_Keydown) (int key, char ascii);
+void (*MR_KeyEvent) (int key, char ascii, qboolean downevent);
void (*MR_Draw) (void);
void (*MR_ToggleMenu_f) (void);
void (*MR_Shutdown) (void);
if(!FS_FileExists(M_PROG_FILENAME) || forceqmenu.integer || forceold)
{
// set menu router function pointers
- MR_Keydown = M_Keydown;
+ MR_KeyEvent = M_KeyEvent;
MR_Draw = M_Draw;
MR_ToggleMenu_f = M_ToggleMenu_f;
MR_Shutdown = M_Shutdown;
else
{
// set menu router function pointers
- MR_Keydown = MP_Keydown;
+ MR_KeyEvent = MP_KeyEvent;
MR_Draw = MP_Draw;
MR_ToggleMenu_f = MP_ToggleMenu_f;
MR_Shutdown = MP_Shutdown;