+ M_Menu_Options_AdjustSliders (-1);
+ break;
+
+ case K_RIGHTARROW:
+ M_Menu_Options_AdjustSliders (1);
+ break;
+ }
+}
+
+#define OPTIONS_EFFECTS_ITEMS 11
+
+int options_effects_cursor;
+
+void M_Menu_Options_Effects_f (void)
+{
+ key_dest = key_menu;
+ m_state = m_options_effects;
+ m_entersound = true;
+}
+
+
+extern cvar_t cl_particles;
+extern cvar_t cl_explosions;
+extern cvar_t cl_stainmaps;
+extern cvar_t r_lightmodels;
+extern cvar_t cl_particles_bulletimpacts;
+extern cvar_t cl_particles_smoke;
+extern cvar_t cl_particles_sparks;
+extern cvar_t cl_particles_bubbles;
+extern cvar_t cl_particles_blood;
+extern cvar_t cl_particles_blood_size;
+extern cvar_t cl_particles_blood_alpha;
+
+void M_Menu_Options_Effects_AdjustSliders (int dir)
+{
+ S_LocalSound ("misc/menu3.wav");
+
+ switch (options_effects_cursor)
+ {
+ case 0:
+ Cvar_SetValueQuick (&r_lightmodels, !r_lightmodels.integer);
+ break;
+ case 1:
+ Cvar_SetValueQuick (&cl_particles, !cl_particles.integer);
+ break;
+ case 2:
+ Cvar_SetValueQuick (&cl_explosions, !cl_explosions.integer);
+ break;
+ case 3:
+ Cvar_SetValueQuick (&cl_stainmaps, !cl_stainmaps.integer);
+ break;
+ case 4:
+ Cvar_SetValueQuick (&cl_particles_bulletimpacts, !cl_particles_bulletimpacts.integer);
+ break;
+ case 5:
+ Cvar_SetValueQuick (&cl_particles_smoke, !cl_particles_smoke.integer);
+ break;
+ case 6:
+ Cvar_SetValueQuick (&cl_particles_sparks, !cl_particles_sparks.integer);
+ break;
+ case 7:
+ Cvar_SetValueQuick (&cl_particles_bubbles, !cl_particles_bubbles.integer);
+ break;
+ case 8:
+ Cvar_SetValueQuick (&cl_particles_blood, !cl_particles_blood.integer);
+ break;
+ case 9:
+ Cvar_SetValueQuick (&cl_particles_blood_size, bound(2, cl_particles_blood_size.value + dir * 1, 20));
+ break;
+ case 10:
+ Cvar_SetValueQuick (&cl_particles_blood_alpha, bound(0.2, cl_particles_blood_alpha.value + dir * 0.1, 1));
+ break;
+ }
+}
+
+void M_Options_Effects_Draw (void)
+{
+ float y;
+ cachepic_t *p;
+
+ M_DrawPic(16, 4, "gfx/qplaque.lmp");
+ p = Draw_CachePic("gfx/p_option.lmp");
+ M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
+
+ y = 32;
+ M_Print(16, y, " Model Lighting");M_DrawCheckbox(220, y, r_lightmodels.integer);y += 8;
+ M_Print(16, y, " Particles");M_DrawCheckbox(220, y, cl_particles.integer);y += 8;
+ M_Print(16, y, " Explosions");M_DrawCheckbox(220, y, cl_explosions.integer);y += 8;
+ M_Print(16, y, " Stainmaps");M_DrawCheckbox(220, y, cl_stainmaps.integer);y += 8;
+ M_Print(16, y, " Bullet Impacts");M_DrawCheckbox(220, y, cl_particles_bulletimpacts.integer);y += 8;
+ M_Print(16, y, " Smoke");M_DrawCheckbox(220, y, cl_particles_smoke.integer);y += 8;
+ M_Print(16, y, " Sparks");M_DrawCheckbox(220, y, cl_particles_sparks.integer);y += 8;
+ M_Print(16, y, " Bubbles");M_DrawCheckbox(220, y, cl_particles_bubbles.integer);y += 8;
+ M_Print(16, y, " Blood");M_DrawCheckbox(220, y, cl_particles_blood.integer);y += 8;
+ M_Print(16, y, " Blood Size");M_DrawSlider(220, y, (cl_particles_blood_size.value - 2) / 18);y += 8;
+ M_Print(16, y, " Blood Opacity");M_DrawSlider(220, y, (cl_particles_blood_alpha.value - 0.2) / 0.8);y += 8;
+
+ // cursor
+ M_DrawCharacter(200, 32 + options_effects_cursor*8, 12+((int)(realtime*4)&1));
+}
+
+
+void M_Options_Effects_Key (int k)
+{
+ switch (k)
+ {
+ case K_ESCAPE:
+ M_Menu_Main_f ();
+ break;
+
+ case K_ENTER:
+ m_entersound = true;
+ switch (options_effects_cursor)
+ {
+ case 0:
+ M_Menu_Keys_f ();
+ break;
+ case 1:
+ m_state = m_none;
+ Con_ToggleConsole_f ();
+ break;
+ case 2:
+ Cbuf_AddText ("exec default.cfg\n");
+ break;
+ case 3:
+ if (vid_menudrawfn)
+ M_Menu_Video_f ();
+ break;
+ default:
+ M_Menu_Options_Effects_AdjustSliders (1);
+ break;
+ }
+ return;
+
+ case K_UPARROW:
+ S_LocalSound ("misc/menu1.wav");
+ options_effects_cursor--;
+ if (options_effects_cursor < 0)
+ options_effects_cursor = OPTIONS_EFFECTS_ITEMS-1;
+ break;
+
+ case K_DOWNARROW:
+ S_LocalSound ("misc/menu1.wav");
+ options_effects_cursor++;
+ if (options_effects_cursor >= OPTIONS_EFFECTS_ITEMS)
+ options_effects_cursor = 0;
+ break;
+
+ case K_LEFTARROW:
+ M_Menu_Options_Effects_AdjustSliders (-1);