From 6a813f3218ebae601bd997d36f88c4c97dd1a7f0 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Wed, 22 May 2013 00:56:25 -0400 Subject: [PATCH] Working on some updates to effects tab (better grouping, added spawnpoint options) --- defaultXonotic.cfg | 1 + effects-high.cfg | 1 - effects-low.cfg | 1 - effects-med.cfg | 1 - effects-normal.cfg | 1 - effects-omg.cfg | 1 - effects-ultimate.cfg | 1 - effects-ultra.cfg | 1 - qcsrc/menu/xonotic/dialog_settings_effects.c | 100 +++++++++++-------- 9 files changed, 58 insertions(+), 50 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 9af7a1f86..374876659 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -566,6 +566,7 @@ cl_particles_smoke 1 vid_gl20 1 r_glsl_deluxemapping 1 r_glsl_offsetmapping 0 +r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_glsl_offsetmapping_scale 0.02 // execute effects-normal.cfg to make sure that all effect settings are reset diff --git a/effects-high.cfg b/effects-high.cfg index 0c0954826..fab48f1da 100644 --- a/effects-high.cfg +++ b/effects-high.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 500 r_drawparticles_drawdistance 2000 r_glsl_deluxemapping 1 r_glsl_offsetmapping 0 -r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_motionblur 0.4 r_shadow_gloss 1 diff --git a/effects-low.cfg b/effects-low.cfg index 1569bc3df..af0807c48 100644 --- a/effects-low.cfg +++ b/effects-low.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 200 r_drawparticles_drawdistance 500 r_glsl_deluxemapping 0 r_glsl_offsetmapping 0 -r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_motionblur 0 r_shadow_gloss 0 diff --git a/effects-med.cfg b/effects-med.cfg index 0d006a997..8cb20145f 100644 --- a/effects-med.cfg +++ b/effects-med.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 300 r_drawparticles_drawdistance 1000 r_glsl_deluxemapping 0 r_glsl_offsetmapping 0 -r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_motionblur 0 r_shadow_gloss 0 diff --git a/effects-normal.cfg b/effects-normal.cfg index f421a10ec..160c7be3f 100644 --- a/effects-normal.cfg +++ b/effects-normal.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 300 r_drawparticles_drawdistance 1000 r_glsl_deluxemapping 1 r_glsl_offsetmapping 0 -r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_motionblur 0 r_shadow_gloss 1 diff --git a/effects-omg.cfg b/effects-omg.cfg index c4a6895ce..c0a53f8a0 100644 --- a/effects-omg.cfg +++ b/effects-omg.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 100 r_drawparticles_drawdistance 250 r_glsl_deluxemapping 0 r_glsl_offsetmapping 0 -r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_motionblur 0 r_shadow_gloss 0 diff --git a/effects-ultimate.cfg b/effects-ultimate.cfg index 8150ee14c..ca3f6160a 100644 --- a/effects-ultimate.cfg +++ b/effects-ultimate.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 500 r_drawparticles_drawdistance 2000 r_glsl_deluxemapping 1 r_glsl_offsetmapping 1 -r_glsl_offsetmapping_lod 0 r_glsl_offsetmapping_reliefmapping 1 r_motionblur 0.4 r_shadow_gloss 1 diff --git a/effects-ultra.cfg b/effects-ultra.cfg index f92230f16..7417dce93 100644 --- a/effects-ultra.cfg +++ b/effects-ultra.cfg @@ -17,7 +17,6 @@ r_drawdecals_drawdistance 500 r_drawparticles_drawdistance 2000 r_glsl_deluxemapping 1 r_glsl_offsetmapping 1 -r_glsl_offsetmapping_lod 1 r_glsl_offsetmapping_reliefmapping 0 r_motionblur 0.4 r_shadow_gloss 1 diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.c b/qcsrc/menu/xonotic/dialog_settings_effects.c index 1e315dc98..bea650eba 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.c +++ b/qcsrc/menu/xonotic/dialog_settings_effects.c @@ -59,10 +59,11 @@ void XonoticEffectsSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("DET^Insane")), "1"); e.configureXonoticTextSliderValues(e); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Playermodel LOD:"))); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player detail:"))); me.TD(me, 1, 2, e = makeXonoticSlider(4, 0, -0.1, "cl_playerdetailreduction")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:"))); + setDependent(e, "r_showsurfaces", 0, 0); me.TD(me, 1, 2, e = makeXonoticPicmipSlider()); if(cvar("developer")) e.addValue(e, ZCTX(_("RES^Leet")), "1337"); @@ -73,7 +74,9 @@ void XonoticEffectsSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("RES^Good")), "-1"); e.addValue(e, ZCTX(_("RES^Best")), "-2"); e.configureXonoticTextSliderValues(e); + setDependent(e, "r_showsurfaces", 0, 0); me.TR(me); + me.TDempty(me, 0.2); { // detect texture compression method float f; @@ -81,22 +84,46 @@ void XonoticEffectsSettingsTab_fill(entity me) switch(f) { case 0: + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression"))); + e.disabled = 1; // just show the checkbox anyway, but with no ability to control it break; case 1: - me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression"))); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression"))); + setDependent(e, "r_showsurfaces", 0, 0); break; case 2: - me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression"))); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression"))); + setDependent(e, "r_showsurfaces", 0, 0); makeMulti(e, "gl_texturecompression"); break; } } + me.TR(me); + if(cvar("developer")) + { + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", _("Show surfaces"))); + } me.TR(me); me.TD(me, 1, 1, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"))); me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", _("Deluxe mapping"))); setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0); me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_gloss", _("Gloss"))); setDependentAND3(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0, "r_glsl_deluxemapping", 1, 1); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", _("Offset mapping"))); + setDependent(e, "vid_gl20", 1, 1); + me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping"))); + setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", _("Reflections:"))); + setDependent(e, "vid_gl20", 1, 1); + me.TD(me, 1, 2, e = makeXonoticTextSlider("r_water_resolutionmultiplier")); + e.addValue(e, _("Blurred"), "0.25"); + e.addValue(e, ZCTX(_("REFL^Good")), "0.5"); + e.addValue(e, _("Sharp"), "1"); + e.configureXonoticTextSliderValues(e); + setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Particles quality:"))); @@ -112,32 +139,17 @@ void XonoticEffectsSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("DMGPRTCLS^All")), "2"); e.configureXonoticTextSliderValues(e); me.TR(me); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_decals", _("Decals"))); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models"))); - setDependent(e, "cl_decals", 1, 1); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:"))); - setDependent(e, "cl_decals", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance")); - setDependent(e, "cl_decals", 1, 1); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:"))); - setDependent(e, "cl_decals", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_time")); - setDependent(e, "cl_decals", 1, 1); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_spawn_point_particles", _("Particle effects for spawnpoints"))); + makeMulti(e, "cl_spawn_event_particles"); me.gotoRC(me, 2, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 1.2, e = makeXonoticCheckBox(0, "r_coronas", _("Coronas"))); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_coronas_occlusionquery", _("Use Occlusion Queries"))); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticRadioButton(1, string_null, string_null, _("No dynamic lighting"))); + me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "r_coronas", "0", _("No dynamic lighting"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "gl_flashblend", string_null, _("Fake corona lighting"))); + makeMulti(e, "r_coronas"); me.TR(me); me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "r_shadow_realtime_dlight", string_null, _("Realtime dynamic lighting"))); + makeMulti(e, "r_coronas"); me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_dlight_shadows", _("Shadows"))); setDependent(e, "r_shadow_realtime_dlight", 1, 1); me.TR(me); @@ -151,26 +163,15 @@ void XonoticEffectsSettingsTab_fill(entity me) me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", _("Soft shadows"))); setDependentWeird(e, someShadowCvarIsEnabled); me.TR(me); - if(cvar("developer")) - me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", _("Show surfaces"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", _("Offset mapping"))); - setDependent(e, "vid_gl20", 1, 1); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping"))); - setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_lod", _("LOD"))); - setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "r_coronas_occlusionquery", _("Fade corona according to visibility"))); + setDependent(e, "r_coronas", 1, 1); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_bloom", _("Bloom"))); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", _("Reflections:"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_bloom", _("Bloom"))); + me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"))); + makeMulti(e, "hud_powerup"); setDependent(e, "vid_gl20", 1, 1); - me.TD(me, 1, 2, e = makeXonoticTextSlider("r_water_resolutionmultiplier")); - e.addValue(e, _("Blurred"), "0.25"); - e.addValue(e, ZCTX(_("REFL^Good")), "0.5"); - e.addValue(e, _("Sharp"), "1"); - e.configureXonoticTextSliderValues(e); - setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1); me.TR(me); s = makeXonoticSlider(0.1, 1, 0.1, "r_motionblur"); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, _("Motion blur:"))); @@ -178,9 +179,22 @@ void XonoticEffectsSettingsTab_fill(entity me) e.savedValue = 0.4; // default me.TD(me, 1, 2, s); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"))); - makeMulti(e, "hud_powerup"); - setDependent(e, "vid_gl20", 1, 1); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_decals", _("Decals"))); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models"))); + setDependent(e, "cl_decals", 1, 1); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:"))); + setDependent(e, "cl_decals", 1, 1); + me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance")); + setDependent(e, "cl_decals", 1, 1); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:"))); + setDependent(e, "cl_decals", 1, 1); + me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_time")); + setDependent(e, "cl_decals", 1, 1); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_restart", COMMANDBUTTON_APPLY)); -- 2.39.2