mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- 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:
parent
84fda053ba
commit
b57ac1aed8
2 changed files with 16 additions and 3 deletions
|
@ -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
|
||||
- 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
|
||||
|
|
|
@ -64,6 +64,10 @@ extern fixed_t freelookviewheight;
|
|||
// Called whenever the view size changes.
|
||||
//
|
||||
//==========================================================================
|
||||
CUSTOM_CVAR(Bool, r_scaletallskies, true, CVAR_ARCHIVE)
|
||||
{
|
||||
R_InitSkyMap();
|
||||
}
|
||||
|
||||
void R_InitSkyMap ()
|
||||
{
|
||||
|
@ -109,10 +113,14 @@ void R_InitSkyMap ()
|
|||
&& !(level.flags & LEVEL_FORCENOSKYSTRETCH)) ? 1 : 0;
|
||||
skytexturemid = -28*FRACUNIT;
|
||||
}
|
||||
else if (skyheight > 240)
|
||||
else if (r_scaletallskies && skyheight > 240)
|
||||
{
|
||||
skytexturemid = (240 - skyheight) << FRACBITS;
|
||||
}
|
||||
else if (!r_scaletallskies && skyheight > 200)
|
||||
{
|
||||
skytexturemid = (200 - skyheight) << FRACBITS;
|
||||
}
|
||||
|
||||
if (viewwidth != 0 && viewheight != 0)
|
||||
{
|
||||
|
@ -124,13 +132,13 @@ void R_InitSkyMap ()
|
|||
skyscale = Scale (skyscale, 2048, FieldOfView);
|
||||
}
|
||||
|
||||
if (skyheight > 200)
|
||||
if (r_scaletallskies && skyheight > 200)
|
||||
{
|
||||
int sheight = MIN(skyheight, 240);
|
||||
skyscale = Scale(skyscale, 200, sheight);
|
||||
skyiscale = Scale(skyiscale, sheight, 200);
|
||||
}
|
||||
else if (skystretch)
|
||||
else if (skyheight < 200 && skystretch)
|
||||
{
|
||||
skyscale = Scale(skyscale, SKYSTRETCH_HEIGHT, skyheight);
|
||||
skyiscale = Scale(skyiscale, skyheight, SKYSTRETCH_HEIGHT);
|
||||
|
|
Loading…
Reference in a new issue