X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=menu.c;h=c4de8c306ff3358bc4d72693211ec7b14957109a;hb=bce4204c780051d1db25c6fef768315b4c217dd4;hp=13492b601cd6fc0083b522285f13f7fe0815bd2a;hpb=5d479d6f709e86aa6ebcf37bb4a400c1f5e66d96;p=xonotic%2Fdarkplaces.git diff --git a/menu.c b/menu.c index 13492b60..c4de8c30 100644 --- a/menu.c +++ b/menu.c @@ -362,6 +362,8 @@ void M_Menu_Main_f (void) else MAIN_ITEMS = 6; } + else if (gamemode == GAME_NETHERWORLD)//VORTEX: menu restarting item + MAIN_ITEMS = 6; else MAIN_ITEMS = 5; @@ -521,6 +523,34 @@ void M_Main_Key (int key, char ascii) 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) @@ -1171,7 +1201,7 @@ void M_DrawCheckbox (int x, int y, int on) } -#define OPTIONS_ITEMS 38 +#define OPTIONS_ITEMS 40 int options_cursor; @@ -1183,17 +1213,17 @@ void M_Menu_Options_f (void) } extern cvar_t snd_staticvolume; -extern cvar_t gl_delayfinish; 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) { int optnum; S_LocalSound ("misc/menu3.wav", true); - optnum = 6; + optnum = 7; if (options_cursor == optnum++) Cvar_SetValueQuick (&vid_conwidth, bound(320, vid_conwidth.value + dir * 64, 2048)); else if (options_cursor == optnum++) @@ -1204,6 +1234,10 @@ 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++) @@ -1218,8 +1252,6 @@ void M_Menu_Options_AdjustSliders (int dir) Cvar_SetValueQuick (&gl_combine, !gl_combine.integer); else if (options_cursor == optnum++) Cvar_SetValueQuick (&gl_dither, !gl_dither.integer); - else if (options_cursor == optnum++) - Cvar_SetValueQuick (&gl_delayfinish, !gl_delayfinish.integer); else if (options_cursor == optnum++) Cvar_SetValueQuick (&gl_texture_anisotropy, bound(1, gl_texture_anisotropy.integer + dir, gl_max_anisotropy)); else if (options_cursor == optnum++) @@ -1230,6 +1262,8 @@ void M_Menu_Options_AdjustSliders (int dir) 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++) @@ -1336,6 +1370,8 @@ void M_Options_Draw (void) 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); @@ -1343,12 +1379,12 @@ void M_Options_Draw (void) M_Options_PrintCheckbox(" Sky", true, r_sky.integer); M_Options_PrintCheckbox(" Texture Combine", true, gl_combine.integer); M_Options_PrintCheckbox(" Dithering", true, gl_dither.integer); - M_Options_PrintCheckbox("Delay gfx (faster)", true, gl_delayfinish.integer); M_Options_PrintSlider( "Anisotropic Filter", gl_support_anisotropy, gl_texture_anisotropy.integer, 1, gl_max_anisotropy); M_Options_PrintSlider( " Game Speed", sv.active, slowmo.value, 0, 5); 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); @@ -1444,7 +1480,6 @@ void M_Menu_Options_Effects_f (void) extern cvar_t r_detailtextures; extern cvar_t cl_particles; -extern cvar_t cl_explosions; extern cvar_t cl_stainmaps; extern cvar_t cl_decals; extern cvar_t r_explosionclip; @@ -1459,6 +1494,7 @@ extern cvar_t cl_particles_bubbles; 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 r_lightningbeam_thickness; extern cvar_t r_lightningbeam_scroll; extern cvar_t r_lightningbeam_repeatdistance; @@ -1478,7 +1514,7 @@ void M_Menu_Options_Effects_AdjustSliders (int dir) 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_decals, !cl_decals.integer); @@ -1529,8 +1565,8 @@ void M_Options_Effects_Draw (void) 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(" Decals", true, cl_decals.integer); M_Options_PrintCheckbox(" Detail Texturing", true, r_detailtextures.integer); @@ -2329,10 +2365,10 @@ void M_Keys_Key (int k, char ascii) //============================================================================= /* 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}}; @@ -2399,6 +2435,10 @@ void M_Video_Draw (void) // "Apply" button M_Print(220, video_cursor_table[3], "Apply"); + // Vertical Sync + M_Print(16, video_cursor_table[4], " Vertical Sync"); + M_DrawCheckbox(220, video_cursor_table[4], vid_vsync.integer); + // Cursor M_DrawCharacter(200, video_cursor_table[video_cursor], 12+((int)(realtime*4)&1)); } @@ -2433,6 +2473,10 @@ void M_Menu_Video_AdjustSliders (int dir) case 2: Cvar_SetValueQuick (&vid_fullscreen, !vid_fullscreen.integer); break; + + case 4: + Cvar_SetValueQuick (&vid_vsync, !vid_vsync.integer); + break; } } @@ -3073,6 +3117,7 @@ level_t transfusionlevels[] = {"e1m2", "Wrong Side of the Tracks"}, {"e1m7", "Altar of Stone"}, {"e2m8", "The Lair of Shial"}, + {"e3m1", "Ghost Town"}, {"e3m7", "The Pit of Cerberus"}, {"e4m1", "Butchery Loves Company"}, {"e4m7", "In the Flesh"}, @@ -3103,6 +3148,7 @@ level_t transfusionlevels[] = {"qbb1", "The Confluence"}, {"qbb2", "KathartiK"}, {"qbb3", "Caleb's Woodland Retreat"}, + {"zoo", "Zoo"}, {"dranzbb6", "Black Coffee"}, {"fragm", "Frag'M"}, @@ -3115,12 +3161,12 @@ level_t transfusionlevels[] = episode_t transfusionepisodes[] = { {"Blood", 0, 8}, - {"Blood Single Player", 8, 9}, - {"Plasma Pack", 17, 6}, - {"Cryptic Passage", 23, 2}, - {"Blood 2", 25, 5}, - {"Transfusion", 30, 8}, - {"Conversions", 38, 6} + {"Blood Single Player", 8, 10}, + {"Plasma Pack", 18, 6}, + {"Cryptic Passage", 24, 2}, + {"Blood 2", 26, 5}, + {"Transfusion", 31, 9}, + {"Conversions", 40, 6} }; level_t goodvsbad2levels[] = @@ -3231,6 +3277,7 @@ qboolean m_serverInfoMessage = false; double m_serverInfoMessageTime; extern cvar_t sv_public; +extern cvar_t sv_maxrate; void M_Menu_GameOptions_f (void) { @@ -3244,8 +3291,8 @@ void M_Menu_GameOptions_f (void) } -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) @@ -3353,24 +3400,27 @@ 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)); @@ -3494,9 +3544,17 @@ void M_NetStart_Change (int dir) 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; @@ -3511,7 +3569,7 @@ void M_NetStart_Change (int dir) startlevel = 0; break; - case 10: + case 11: startlevel += dir; g = lookupgameinfo(); @@ -3581,7 +3639,7 @@ void M_GameOptions_Key (int key, char ascii) break; case K_BACKSPACE: - if (gameoptions_cursor == 8) + if (gameoptions_cursor == 9) { l = strlen(hostname.string); if (l) @@ -3597,7 +3655,7 @@ void M_GameOptions_Key (int key, char ascii) default: if (ascii < 32 || ascii > 126) break; - if (gameoptions_cursor == 8) + if (gameoptions_cursor == 9) { l = strlen(hostname.string); if (l < 37) @@ -3715,7 +3773,7 @@ void M_Shutdown(void); void M_Init (void) { - menu_mempool = Mem_AllocPool("Menu"); + menu_mempool = Mem_AllocPool("Menu", 0, NULL); menuplyr_load = true; menuplyr_pixels = NULL; @@ -4119,9 +4177,9 @@ void MP_Init (void) 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); @@ -4209,6 +4267,8 @@ void MR_Init() { // 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); @@ -4217,12 +4277,8 @@ void MR_Init() Cvar_SetValueQuick(&forceqmenu,1); // use -useqmenu for debugging proposes, cause it starts // the normal quake menu only the first time - else if(COM_CheckParm("-useqmenu")) + if(COM_CheckParm("-useqmenu")) MR_SetRouting (TRUE); - - MR_SetRouting (FALSE); + else + MR_SetRouting (FALSE); } - - - -