]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
merged RSurfShader_Water_Callback and RSurfShader_Wall_Vertex_Callback and made them...
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index a56f4365efe527a6779e73f249c6fdd30d79b644..68fd1495ee76c3255775cb00cee1c22d203ffc4b 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -906,6 +906,7 @@ int         setup_oldbottom;
 int            setup_top;
 int            setup_bottom;
 int            setup_rate;
+int            setup_oldrate;
 
 #define        NUM_SETUP_CMDS  5
 
@@ -991,7 +992,7 @@ void M_Setup_Draw (void)
                menuplyr_load = false;
                menuplyr_top = -1;
                menuplyr_bottom = -1;
-               if ((f = FS_LoadFile("gfx/menuplyr.lmp", true)))
+               if ((f = FS_LoadFile("gfx/menuplyr.lmp", tempmempool, true)))
                {
                        data = LoadLMPAs8Bit (f, 0, 0);
                        menuplyr_width = image_width;
@@ -1096,6 +1097,9 @@ forward:
                        Cbuf_AddText ( va ("name \"%s\"\n", setup_myname) );
                if (setup_top != setup_oldtop || setup_bottom != setup_oldbottom)
                        Cbuf_AddText( va ("color %i %i\n", setup_top, setup_bottom) );
+               if (setup_rate != setup_oldrate)
+                       Cbuf_AddText(va("rate %i\n", setup_rate));
+
                m_entersound = true;
                M_Menu_MultiPlayer_f ();
                break;
@@ -1164,7 +1168,7 @@ void M_DrawCheckbox (int x, int y, int on)
 }
 
 
-#define OPTIONS_ITEMS 34
+#define OPTIONS_ITEMS 37
 
 int options_cursor;
 
@@ -1199,6 +1203,8 @@ void M_Menu_Options_AdjustSliders (int dir)
                Cvar_SetValueQuick (&scr_conbrightness, bound(0, scr_conbrightness.value + dir * 0.2, 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 (&scr_fov, bound(1, scr_fov.integer + dir * 1, 170));
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&scr_screenshot_jpeg, !scr_screenshot_jpeg.integer);
        else if (options_cursor == optnum++)
@@ -1212,15 +1218,11 @@ void M_Menu_Options_AdjustSliders (int dir)
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&gl_delayfinish, !gl_delayfinish.integer);
        else if (options_cursor == optnum++)
-               Cvar_SetValueQuick (&gl_texture_anisotropy, bound(0, gl_texture_anisotropy.value + dir, 8));
+               Cvar_SetValueQuick (&gl_texture_anisotropy, bound(1, gl_texture_anisotropy.integer + dir, gl_max_anisotropy));
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&slowmo, bound(0, slowmo.value + dir * 0.25, 5));
        else if (options_cursor == optnum++)
-#ifdef _WIN32
-               Cvar_SetValueQuick (&bgmvolume, bound(0, bgmvolume.value + dir * 1.0, 1));
-#else
                Cvar_SetValueQuick (&bgmvolume, bound(0, bgmvolume.value + dir * 0.1, 1));
-#endif
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&volume, bound(0, volume.value + dir * 0.1, 1));
        else if (options_cursor == optnum++)
@@ -1233,6 +1235,10 @@ void M_Menu_Options_AdjustSliders (int dir)
                Cvar_SetValueQuick (&crosshair_static, !crosshair_static.integer);
        else if (options_cursor == optnum++)
                Cvar_SetValueQuick (&showfps, !showfps.integer);
+       else if (options_cursor == optnum++)
+               Cvar_SetValueQuick (&showtime, !showtime.integer);
+       else if (options_cursor == optnum++)
+               Cvar_SetValueQuick (&showdate, !showdate.integer);
        else if (options_cursor == optnum++)
        {
                if (cl_forwardspeed.value > 200)
@@ -1327,13 +1333,14 @@ void M_Options_Draw (void)
        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(  "       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_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.value, 0, 8);
+       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);
@@ -1342,6 +1349,8 @@ void M_Options_Draw (void)
        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);
        M_Options_PrintCheckbox("        Always Run", true, cl_forwardspeed.value > 200);
        M_Options_PrintCheckbox("        Lookspring", true, lookspring.integer);
        M_Options_PrintCheckbox("        Lookstrafe", true, lookstrafe.integer);
@@ -1414,7 +1423,7 @@ void M_Options_Key (int k, char ascii)
        }
 }
 
-#define        OPTIONS_EFFECTS_ITEMS   22
+#define        OPTIONS_EFFECTS_ITEMS   31
 
 int options_effects_cursor;
 
@@ -1443,6 +1452,13 @@ 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 r_lightningbeam_thickness;
+extern cvar_t r_lightningbeam_scroll;
+extern cvar_t r_lightningbeam_repeatdistance;
+extern cvar_t r_lightningbeam_color_red;
+extern cvar_t r_lightningbeam_color_green;
+extern cvar_t r_lightningbeam_color_blue;
+extern cvar_t r_lightningbeam_qmbtexture;
 
 void M_Menu_Options_Effects_AdjustSliders (int dir)
 {
@@ -1467,8 +1483,17 @@ void M_Menu_Options_Effects_AdjustSliders (int dir)
        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 (&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));
+       else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_color_red, bound(0, r_lightningbeam_color_red.value + dir * 0.1, 1));
+       else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_color_green, bound(0, r_lightningbeam_color_green.value + dir * 0.1, 1));
+       else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_color_blue, bound(0, r_lightningbeam_color_blue.value + dir * 0.1, 1));
+       else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lightningbeam_qmbtexture, !r_lightningbeam_qmbtexture.integer);
        else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lerpmodels, !r_lerpmodels.integer);
        else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lerpsprites, !r_lerpsprites.integer);
+       else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&gl_polyblend, bound(0, gl_polyblend.value + dir * 0.1, 1));
+       else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_waterwarp, bound(0, r_waterwarp.value + dir * 0.1, 1));
        else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_wateralpha, bound(0, r_wateralpha.value + dir * 0.1, 1));
        else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_waterscroll, bound(0, r_waterscroll.value + dir * 0.5, 10));
        else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_watershader, bound(0, r_watershader.value + dir * 0.25, 10));
@@ -1507,8 +1532,17 @@ void M_Options_Effects_Draw (void)
        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("   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);
+       M_Options_PrintSlider(  "  Underwater View Warp", true, r_waterwarp.value, 0, 1);
        M_Options_PrintSlider(  " Water Alpha (opacity)", true, r_wateralpha.value, 0, 1);
        M_Options_PrintSlider(  "        Water Movement", true, r_waterscroll.value, 0, 10);
        M_Options_PrintSlider(  " GeForce3 Water Shader", true, r_watershader.value, 0, 10);
@@ -1872,7 +1906,18 @@ char *transfusionbindnames[][2] =
 {"impulse 26",         "next armor type"},
 {"impulse 27",         "identify player"},
 {"impulse 55",         "voting menu"},
-{"impulse 56",         "observer mode"}
+{"impulse 56",         "observer mode"},
+{"",                           "Taunts"},            // Taunts
+{"impulse 70",         "taunt 0"},
+{"impulse 71",         "taunt 1"},
+{"impulse 72",         "taunt 2"},
+{"impulse 73",         "taunt 3"},
+{"impulse 74",         "taunt 4"},
+{"impulse 75",         "taunt 5"},
+{"impulse 76",         "taunt 6"},
+{"impulse 77",         "taunt 7"},
+{"impulse 78",         "taunt 8"},
+{"impulse 79",         "taunt 9"}
 };
 
 char *goodvsbad2bindnames[][2] =