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)
else
MAIN_ITEMS = 6;
}
+ else if (gamemode == GAME_NETHERWORLD)//VORTEX: menu restarting item
+ MAIN_ITEMS = 6;
else
MAIN_ITEMS = 5;
break;
}
}
+ else if (gamemode == GAME_NETHERWORLD)//VORTEX: menu restarting item
+ {
+ switch (m_main_cursor)
+ {
+ case 0:
+ M_Menu_SinglePlayer_f ();
+ break;
+
+ case 1:
+ M_Menu_MultiPlayer_f ();
+ break;
+
+ case 2:
+ M_Menu_Options_f ();
+ break;
+
+ case 3:
+ M_Menu_Help_f ();
+ break;
+
+ case 4:
+ M_Menu_Quit_f ();
+ break;
+ case 5:
+ MR_Restart();
+ break;
+ }
+ }
else
{
switch (m_main_cursor)
}
-#define OPTIONS_ITEMS 37
+#define OPTIONS_ITEMS 40
int options_cursor;
m_entersound = true;
}
-extern cvar_t snd_staticvolume;
extern cvar_t slowmo;
extern dllhandle_t jpeg_dll;
extern cvar_t gl_texture_anisotropy;
+extern cvar_t r_textshadow;
void M_Menu_Options_AdjustSliders (int dir)
{
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++)
+ Cvar_SetValueQuick (&sbar_alpha_fg, bound(0, sbar_alpha_fg.value + dir * 0.1, 1));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&scr_viewsize, bound(30, scr_viewsize.value + dir * 10, 120));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&volume, bound(0, volume.value + dir * 0.1, 1));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&snd_staticvolume, bound(0, snd_staticvolume.value + dir * 0.1, 1));
+ else if (options_cursor == optnum++)
+ Cvar_SetValueQuick (&r_textshadow, !r_textshadow.integer);
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&crosshair, bound(0, crosshair.integer + dir, 5));
else if (options_cursor == optnum++)
M_Options_PrintSlider( " Console Speed", true, scr_conspeed.value, 0, 1000);
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( " CD Music Volume", cdaudioinitialized.integer, bgmvolume.value, 0, 1);
M_Options_PrintSlider( " Sound Volume", snd_initialized.integer, volume.value, 0, 1);
M_Options_PrintSlider(gamemode == GAME_GOODVSBAD2 ? " Music Volume" : " Ambient Volume", snd_initialized.integer, snd_staticvolume.value, 0, 1);
+ 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);
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_explosions;
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;
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 (&gl_flashblend, !gl_flashblend.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles, !cl_particles.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_quality, bound(1, cl_particles_quality.value + dir * 0.5, 4));
- else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_explosions, !cl_explosions.integer);
+ 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(" Use Only Coronas", true, gl_flashblend.integer);
M_Options_PrintCheckbox(" Particles", true, cl_particles.integer);
M_Options_PrintSlider( " Particles Quality", true, cl_particles_quality.value, 1, 4);
- M_Options_PrintCheckbox(" Explosions", true, cl_explosions.integer);
- M_Options_PrintCheckbox(" Explosion Clipping", true, r_explosionclip.integer);
+ 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;
-
void M_Menu_GameOptions_f (void)
{
key_dest = key_menu;
}
-int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 132, 152, 160};
-#define NUM_GAMEOPTIONS 11
+int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 112, 140, 160, 168};
+#define NUM_GAMEOPTIONS 12
int gameoptions_cursor;
void M_GameOptions_Draw (void)
M_Print(0, 104, " Public server");
M_Print(160, 104, (sv_public.integer == 0) ? "no" : "yes");
- M_Print(0, 120, " Server name");
- M_DrawTextBox (0, 124, 38, 1);
- M_Print(8, 132, hostname.string);
+ M_Print(0, 112, " Server maxrate");
+ M_Print(160, 112, va("%i", sv_maxrate.integer));
+
+ M_Print(0, 128, " Server name");
+ M_DrawTextBox (0, 132, 38, 1);
+ M_Print(8, 140, hostname.string);
g = lookupgameinfo();
if (gamemode != GAME_GOODVSBAD2)
{
- M_Print(0, 152, " Episode");
- M_Print(160, 152, g->episodes[startepisode].description);
+ M_Print(0, 160, " Episode");
+ M_Print(160, 160, g->episodes[startepisode].description);
}
- M_Print(0, 160, " Level");
- M_Print(160, 160, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
- M_Print(160, 168, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
+ M_Print(0, 168, " Level");
+ M_Print(160, 168, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
+ M_Print(160, 176, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
// line cursor
- if (gameoptions_cursor == 8)
+ if (gameoptions_cursor == 9)
M_DrawCharacter (8 + 8 * strlen(hostname.string), gameoptions_cursor_table[gameoptions_cursor], 10+((int)(realtime*4)&1));
else
M_DrawCharacter (144, gameoptions_cursor_table[gameoptions_cursor], 12+((int)(realtime*4)&1));
break;
case 8:
+ Cvar_SetValueQuick (&sv_maxrate, sv_maxrate.integer + dir*500);
+ if (sv_maxrate.integer > NET_MAXRATE)
+ Cvar_SetValueQuick (&sv_maxrate, NET_MAXRATE);
+ if (sv_maxrate.integer < NET_MINRATE)
+ Cvar_SetValueQuick (&sv_maxrate, NET_MINRATE);
break;
case 9:
+ break;
+
+ case 10:
if (gamemode == GAME_GOODVSBAD2)
break;
startepisode += dir;
startlevel = 0;
break;
- case 10:
+ case 11:
startlevel += dir;
g = lookupgameinfo();
break;
case K_BACKSPACE:
- if (gameoptions_cursor == 8)
+ if (gameoptions_cursor == 9)
{
l = strlen(hostname.string);
if (l)
default:
if (ascii < 32 || ascii > 126)
break;
- if (gameoptions_cursor == 8)
+ if (gameoptions_cursor == 9)
{
l = strlen(hostname.string);
if (l < 37)
m_state = m_slist;
m_entersound = true;
slist_cursor = 0;
- m_return_reason[0] = 0;
+ M_Update_Return_Reason("");
Net_Slist_f();
}
void M_Init (void)
{
- menu_mempool = Mem_AllocPool("Menu");
+ menu_mempool = Mem_AllocPool("Menu", 0, NULL);
menuplyr_load = true;
menuplyr_pixels = NULL;
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;
prog->error_cmd = MP_Error;
// allocate the mempools
- prog->edicts_mempool = Mem_AllocPool(M_NAME " edicts mempool");
- prog->edictstring_mempool = Mem_AllocPool( M_NAME " edict string mempool");
- prog->progs_mempool = Mem_AllocPool(M_PROG_FILENAME);
+ prog->edicts_mempool = Mem_AllocPool(M_NAME " edicts mempool", 0, NULL);
+ prog->edictstring_mempool = Mem_AllocPool( M_NAME " edict string mempool", 0, NULL);
+ prog->progs_mempool = Mem_AllocPool(M_PROG_FILENAME, 0, NULL);
PRVM_LoadProgs(M_PROG_FILENAME, m_numrequiredfunc, m_required_func);
MR_ToggleMenu_f();
}
-void MR_Init()
+void MR_Init_Commands(void)
{
// set router console commands
Cvar_RegisterVariable (&forceqmenu);
+ if (gamemode == GAME_NETHERWORLD)
+ 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
MR_SetRouting (FALSE);
}
-
-
-
-