- added a r_scaletallskies CVAR so that sky positioning can be checked

more easily.
- fixed: Skies with a height of exactly 200 pixels should not be stretched.

SVN r1979 (trunk)
This commit is contained in:
Christoph Oelckers 2009-11-14 07:52:14 +00:00
parent 84fda053ba
commit b57ac1aed8
2 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,8 @@
November 14, 2009 (Changes by Graf Zahl)
- added a r_scaletallskies CVAR so that sky positioning can be checked
more easily.
- fixed: Skies with a height of exactly 200 pixels should not be stretched.
November 13, 2009 November 13, 2009
- More sky changes: Textures taller than 200 pixels but shorter than 241 - More sky changes: Textures taller than 200 pixels but shorter than 241
are scaled to the height of a 200 pixel tall sky. Skies taller than 240 are scaled to the height of a 200 pixel tall sky. Skies taller than 240

View file

@ -64,6 +64,10 @@ extern fixed_t freelookviewheight;
// Called whenever the view size changes. // Called whenever the view size changes.
// //
//========================================================================== //==========================================================================
CUSTOM_CVAR(Bool, r_scaletallskies, true, CVAR_ARCHIVE)
{
R_InitSkyMap();
}
void R_InitSkyMap () void R_InitSkyMap ()
{ {
@ -109,10 +113,14 @@ void R_InitSkyMap ()
&& !(level.flags & LEVEL_FORCENOSKYSTRETCH)) ? 1 : 0; && !(level.flags & LEVEL_FORCENOSKYSTRETCH)) ? 1 : 0;
skytexturemid = -28*FRACUNIT; skytexturemid = -28*FRACUNIT;
} }
else if (skyheight > 240) else if (r_scaletallskies && skyheight > 240)
{ {
skytexturemid = (240 - skyheight) << FRACBITS; skytexturemid = (240 - skyheight) << FRACBITS;
} }
else if (!r_scaletallskies && skyheight > 200)
{
skytexturemid = (200 - skyheight) << FRACBITS;
}
if (viewwidth != 0 && viewheight != 0) if (viewwidth != 0 && viewheight != 0)
{ {
@ -124,13 +132,13 @@ void R_InitSkyMap ()
skyscale = Scale (skyscale, 2048, FieldOfView); skyscale = Scale (skyscale, 2048, FieldOfView);
} }
if (skyheight > 200) if (r_scaletallskies && skyheight > 200)
{ {
int sheight = MIN(skyheight, 240); int sheight = MIN(skyheight, 240);
skyscale = Scale(skyscale, 200, sheight); skyscale = Scale(skyscale, 200, sheight);
skyiscale = Scale(skyiscale, sheight, 200); skyiscale = Scale(skyiscale, sheight, 200);
} }
else if (skystretch) else if (skyheight < 200 && skystretch)
{ {
skyscale = Scale(skyscale, SKYSTRETCH_HEIGHT, skyheight); skyscale = Scale(skyscale, SKYSTRETCH_HEIGHT, skyheight);
skyiscale = Scale(skyiscale, skyheight, SKYSTRETCH_HEIGHT); skyiscale = Scale(skyiscale, skyheight, SKYSTRETCH_HEIGHT);