void M_Menu_Options_Graphics_f (void);
void M_Menu_Options_ColorControl_f (void);
void M_Menu_Keys_f (void);
+ void M_Menu_Reset_f (void);
void M_Menu_Video_f (void);
void M_Menu_Help_f (void);
void M_Menu_Quit_f (void);
void M_Options_Graphics_Draw (void);
void M_Options_ColorControl_Draw (void);
void M_Keys_Draw (void);
+ void M_Reset_Draw (void);
void M_Video_Draw (void);
void M_Help_Draw (void);
void M_Quit_Draw (void);
void M_Options_Graphics_Key (int key, char ascii);
void M_Options_ColorControl_Key (int key, char ascii);
void M_Keys_Key (int key, char ascii);
+ void M_Reset_Key (int key, char ascii);
void M_Video_Key (int key, char ascii);
void M_Help_Key (int key, char ascii);
void M_Quit_Key (int key, char ascii);
char m_return_reason [32];
+void M_Update_Return_Reason(char *s)
+{
+ strlcpy(m_return_reason, s, sizeof(m_return_reason));
+ if (s)
+ Con_Printf("%s\n", s);
+}
+
#define StartingGame (m_multiplayer_cursor == 1)
#define JoiningGame (m_multiplayer_cursor == 0)
m_entersound = true;
}
-extern cvar_t snd_staticvolume;
extern cvar_t slowmo;
extern dllhandle_t jpeg_dll;
extern cvar_t gl_texture_anisotropy;
Con_ToggleConsole_f ();
break;
case 2:
- Cbuf_AddText ("exec default.cfg\n");
+ M_Menu_Reset_f ();
break;
case 3:
M_Menu_Video_f ();
}
}
-#define OPTIONS_EFFECTS_ITEMS 33
+#define OPTIONS_EFFECTS_ITEMS 37
int options_effects_cursor;
extern cvar_t r_detailtextures;
extern cvar_t cl_particles;
extern cvar_t cl_stainmaps;
+extern cvar_t cl_stainmapsclearonload;
extern cvar_t cl_decals;
extern cvar_t r_explosionclip;
extern cvar_t r_modellights;
extern cvar_t cl_particles_blood_alpha;
extern cvar_t cl_particles_blood_bloodhack;
extern cvar_t cl_particles_explosions_shell;
+extern cvar_t cl_beams_polygon;
+extern cvar_t cl_beams_relative;
+extern cvar_t cl_beams_lightatend;
extern cvar_t r_lightningbeam_thickness;
extern cvar_t r_lightningbeam_scroll;
extern cvar_t r_lightningbeam_repeatdistance;
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_explosions_shell, !cl_particles_explosions_shell.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_explosionclip, !r_explosionclip.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_stainmaps, !cl_stainmaps.integer);
+ else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_stainmapsclearonload, !cl_stainmapsclearonload.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_decals, !cl_decals.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_detailtextures, !r_detailtextures.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_bulletimpacts, !cl_particles_bulletimpacts.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_blood, !cl_particles_blood.integer);
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_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));
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_repeatdistance, bound(64, r_lightningbeam_repeatdistance.integer + dir * 64, 1024));
M_Options_PrintCheckbox(" Explosion Shell", true, cl_particles_explosions_shell.integer);
M_Options_PrintCheckbox(" Explosion Shell Clip", true, r_explosionclip.integer);
M_Options_PrintCheckbox(" Stainmaps", true, cl_stainmaps.integer);
+ M_Options_PrintCheckbox("Onload Clear Stainmaps", true, cl_stainmapsclearonload.integer);
M_Options_PrintCheckbox(" Decals", true, cl_decals.integer);
M_Options_PrintCheckbox(" Detail Texturing", true, r_detailtextures.integer);
M_Options_PrintCheckbox(" Bullet Impacts", true, cl_particles_bulletimpacts.integer);
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_PrintSlider( " Lightning Thickness", true, r_lightningbeam_thickness.integer, 1, 10);
- M_Options_PrintSlider( " Lightning Scroll", true, r_lightningbeam_scroll.integer, 0, 10);
- M_Options_PrintSlider( " Lightning Repeat Dist", true, r_lightningbeam_repeatdistance.integer, 64, 1024);
- M_Options_PrintSlider( " Lightning Color Red", true, r_lightningbeam_color_red.value, 0, 1);
- M_Options_PrintSlider( " Lightning Color Green", true, r_lightningbeam_color_green.value, 0, 1);
- M_Options_PrintSlider( " Lightning Color Blue", true, r_lightningbeam_color_blue.value, 0, 1);
- M_Options_PrintCheckbox(" Lightning QMB Texture", true, r_lightningbeam_qmbtexture.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(" 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);
+ M_Options_PrintSlider( " Lightning Repeat Dist", cl_beams_polygons.integer, r_lightningbeam_repeatdistance.integer, 64, 1024);
+ M_Options_PrintSlider( " Lightning Color Red", cl_beams_polygons.integer, r_lightningbeam_color_red.value, 0, 1);
+ M_Options_PrintSlider( " Lightning Color Green", cl_beams_polygons.integer, r_lightningbeam_color_green.value, 0, 1);
+ M_Options_PrintSlider( " Lightning Color Blue", cl_beams_polygons.integer, r_lightningbeam_color_blue.value, 0, 1);
+ M_Options_PrintCheckbox(" Lightning QMB Texture", cl_beams_polygons.integer, r_lightningbeam_qmbtexture.integer);
M_Options_PrintCheckbox(" Model Interpolation", true, r_lerpmodels.integer);
M_Options_PrintCheckbox(" Sprite Interpolation", true, r_lerpsprites.integer);
M_Options_PrintSlider( " View Blend", true, gl_polyblend.value, 0, 1);
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_dlight_shadows, !r_shadow_realtime_dlight_shadows.integer);
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world, !r_shadow_realtime_world.integer);
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_dlightshadows, !r_shadow_realtime_world_dlightshadows.integer);
- else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_lightmaps, !r_shadow_realtime_world_lightmaps.integer);
+ 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);
}
M_Options_PrintCheckbox(" RT DLight Shadows", true, r_shadow_realtime_dlight_shadows.integer);
M_Options_PrintCheckbox(" RT World", true, r_shadow_realtime_world.integer);
M_Options_PrintCheckbox("RT World DLight Shadows", true, r_shadow_realtime_world_dlightshadows.integer);
- M_Options_PrintCheckbox(" RT World Lightmaps", true, r_shadow_realtime_world_lightmaps.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);
}
}
}
+void M_Menu_Reset_f (void)
+{
+ key_dest = key_menu;
+ m_state = m_reset;
+ m_entersound = true;
+}
+
+
+void M_Reset_Key (int key, char ascii)
+{
+ switch (key)
+ {
+ case K_ESCAPE:
+ case 'n':
+ case 'N':
+ m_state = m_options;
+ m_entersound = true;
+ break;
+
+ case 'Y':
+ case 'y':
+ Cbuf_AddText ("exec default.cfg\n");
+ break;
+
+ default:
+ break;
+ }
+}
+
+void M_Reset_Draw (void)
+{
+ int lines = 2, linelength = 20;
+ M_Background(linelength * 8 + 16, lines * 8 + 16);
+ M_DrawTextBox(0, 0, linelength, lines);
+ M_Print(8 + 4 * (linelength - 19), 8, "Really wanna reset?");
+ M_Print(8 + 4 * (linelength - 11), 16, "Press y / n");
+}
+
//=============================================================================
/* VIDEO MENU */
-#define VIDEO_ITEMS 4
+#define VIDEO_ITEMS 5
int video_cursor = 0;
-int video_cursor_table[] = {56, 68, 80, 100};
+int video_cursor_table[] = {56, 68, 80, 100, 120};
// note: if modes are added to the beginning of this list, update the
// video_resolution = x; in M_Menu_Video_f below
unsigned short video_resolutions[][2] = {{320,240}, {400,300}, {512,384}, {640,480}, {800,600}, {1024,768}, {1152,864}, {1280,960}, {1280,1024}, {1600,1200}, {1792,1344}, {1920,1440}, {2048,1536}, {0,0}};
// "Apply" button
M_Print(220, video_cursor_table[3], "Apply");
+ // Vertical Sync
+ M_ItemPrint (0, video_cursor_table[4], " Vertical Sync", gl_videosyncavailable);
+ M_DrawCheckbox(220, video_cursor_table[4], vid_vsync.integer);
+
// Cursor
M_DrawCharacter(200, video_cursor_table[video_cursor], 12+((int)(realtime*4)&1));
}
case 2:
Cvar_SetValueQuick (&vid_fullscreen, !vid_fullscreen.integer);
break;
+
+ case 4:
+ Cvar_SetValueQuick (&vid_vsync, !vid_vsync.integer);
+ break;
}
}
lanConfig_port = 26000;
sprintf(lanConfig_portname, "%u", lanConfig_port);
- m_return_reason[0] = 0;
+ M_Update_Return_Reason("");
}
qboolean m_serverInfoMessage = false;
double m_serverInfoMessageTime;
-extern cvar_t sv_public;
-extern cvar_t sv_maxrate;
-
void M_Menu_GameOptions_f (void)
{
key_dest = key_menu;
m_state = m_slist;
m_entersound = true;
slist_cursor = 0;
- m_return_reason[0] = 0;
+ M_Update_Return_Reason("");
Net_Slist_f();
}
Cvar_RegisterVariable (&menu_options_colorcontrol_correctionvalue);
Cmd_AddCommand ("menu_keys", M_Menu_Keys_f);
Cmd_AddCommand ("menu_video", M_Menu_Video_f);
+ Cmd_AddCommand ("menu_reset", M_Menu_Reset_f);
Cmd_AddCommand ("help", M_Menu_Help_f);
Cmd_AddCommand ("menu_quit", M_Menu_Quit_f);
M_Keys_Draw ();
break;
+ case m_reset:
+ M_Reset_Draw ();
+ break;
+
case m_video:
M_Video_Draw ();
break;
M_Keys_Key (key, ascii);
return;
+ case m_reset:
+ M_Reset_Key (key, ascii);
+ return;
+
+
case m_video:
M_Video_Key (key, ascii);
return;
MR_ToggleMenu_f();
}
-void MR_Init()
+void MR_Init_Commands(void)
{
// set router console commands
Cvar_RegisterVariable (&forceqmenu);
Cmd_AddCommand ("menu_fallback", MP_Error); //Force to old-style menu
Cmd_AddCommand ("menu_restart",MR_Restart);
Cmd_AddCommand ("togglemenu", Call_MR_ToggleMenu_f);
+}
+void MR_Init(void)
+{
// use -forceqmenu to use always the normal quake menu (it sets forceqmenu to 1)
+// COMMANDLINEOPTION: Client: -forceqmenu disables menu.dat (same as +forceqmenu 1)
if(COM_CheckParm("-forceqmenu"))
Cvar_SetValueQuick(&forceqmenu,1);
// use -useqmenu for debugging proposes, cause it starts
// the normal quake menu only the first time
+// COMMANDLINEOPTION: Client: -useqmenu causes the first time you open the menu to use the quake menu, then reverts to menu.dat (if forceqmenu is 0)
if(COM_CheckParm("-useqmenu"))
MR_SetRouting (TRUE);
else