diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 8c12b3ca2..5ddf36f59 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -63,7 +63,7 @@ #pragma warning(disable:4244) #endif -CVAR(Bool, r_capsky, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); +EXTERN_CVAR(Int, r_skymode) //EXTERN_CVAR (Int, tx) //EXTERN_CVAR (Int, ty) @@ -1059,7 +1059,7 @@ static void R_DrawCapSky(visplane_t *pl) static void R_DrawSky (visplane_t *pl) { - if (r_capsky) + if (r_skymode == 2) { R_DrawCapSky(pl); return; diff --git a/src/r_sky.cpp b/src/r_sky.cpp index 9ea44db48..58caa09bd 100644 --- a/src/r_sky.cpp +++ b/src/r_sky.cpp @@ -49,7 +49,8 @@ fixed_t sky1cyl, sky2cyl; double sky1pos, sky2pos; // [RH] Stretch sky texture if not taller than 128 pixels? -CUSTOM_CVAR (Bool, r_stretchsky, true, CVAR_ARCHIVE) +// Also now controls capped skies. 0 = normal, 1 = stretched, 2 = capped +CUSTOM_CVAR (Int, r_skymode, 2, CVAR_ARCHIVE) { R_InitSkyMap (); } @@ -99,7 +100,7 @@ void R_InitSkyMap () skytexturemid = 0; if (skyheight >= 128 && skyheight < 200) { - skystretch = (r_stretchsky + skystretch = (r_skymode == 1 && skyheight >= 128 && level.IsFreelookAllowed() && !(level.flags & LEVEL_FORCENOSKYSTRETCH)) ? 1 : 0; diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 5a10527ac..096d0832c 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1786,8 +1786,7 @@ DSPLYMNU_BLOODFADE = "Blood Flash Intensity"; DSPLYMNU_PICKUPFADE = "Pickup Flash Intensity"; DSPLYMNU_PALLETEHACK = "DirectDraw palette hack"; // Not used DSPLYMNU_ATTACHEDSURFACES = "Use attached surfaces"; // Not used -DSPLYMNU_STRETCHSKY = "Stretch short skies"; -DSPLYMNU_CAPSKY = "Cap skies with solid color"; +DSPLYMNU_SKYMODE = "Sky render mode"; DSPLYMNU_DRAWFUZZ = "Use fuzz effect"; DSPLYMNU_TRANSSOUL = "Lost Soul translucency"; DSPLYMNU_FAKECONTRAST = "Use fake contrast"; @@ -2188,6 +2187,9 @@ OPTVAL_INVERTED = "Inverted"; OPTVAL_NOTINVERTED = "Not Inverted"; OPTVAL_ORIGINAL = "Original"; OPTVAL_OPTIMIZED = "Optimized"; +OPTVAL_NORMAL = "Normal"; +OPTVAL_STRETCH = "Stretch"; +OPTVAL_CAPPED = "Capped"; OPTVAL_PARTICLES = "Particles"; OPTVAL_SPRITES = "Sprites"; OPTVAL_SPRITESPARTICLES = "Sprites & Particles"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index f7131be55..7b06a7e7f 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -600,6 +600,13 @@ OptionValue ColumnMethods 1.0, "$OPTVAL_OPTIMIZED" } +OptionValue SkyModes +{ + 0.0, "$OPTVAL_NORMAL" + 1.0, "$OPTVAL_STRETCH" + 2.0, "$OPTVAL_CAPPED" +} + OptionValue RocketTrailTypes { 0.0, "$OPTVAL_OFF" @@ -674,8 +681,7 @@ OptionMenu "VideoOptions" //Option "$DSPLYMNU_ATTACHEDSURFACES", "vid_attachedsurfaces", "OnOff" } - Option "$DSPLYMNU_CAPSKY", "r_capsky", "OnOff" - Option "$DSPLYMNU_STRETCHSKY", "r_stretchsky", "OnOff" + Option "$DSPLYMNU_SKYMODE", "r_skymode", "SkyModes" Option "$DSPLYMNU_DRAWFUZZ", "r_drawfuzz", "Fuzziness" Slider "$DSPLYMNU_TRANSSOUL", "transsouls", 0.25, 1.0, 0.05, 2 Option "$DSPLYMNU_FAKECONTRAST", "r_fakecontrast", "Contrast"