- Fixed compilation on non Windows platforms.

This commit is contained in:
drfrag 2019-10-13 12:54:16 +02:00
parent 5691d1d3b9
commit 0a9b20062a
2 changed files with 7 additions and 7 deletions

View file

@ -69,7 +69,7 @@ CUSTOM_CVAR (Int, r_skymode, 2, CVAR_ARCHIVE)
int freelookviewheight;
int skyoffset;
int sskyoffset;
//==========================================================================
//
@ -124,7 +124,7 @@ void R_InitSkyMap ()
&& skyheight >= 128 && skyheight < 310
&& level.IsFreelookAllowed()
&& !(level.flags & LEVEL_FORCETILEDSKY)) ? 1 : 0;
skyoffset = cl_oldfreelooklimit? 0 : skyheight >= 200? 110 : 138;
sskyoffset = cl_oldfreelooklimit? 0 : skyheight >= 200? 110 : 138;
skytexturemid = 0;
if (skyheight >= 128 && skyheight < 200)
{
@ -146,9 +146,9 @@ void R_InitSkyMap ()
if (skystretch)
{
skyscale *= (double)(SKYSTRETCH_HEIGHT + skyoffset) / skyheight;
skyiscale *= skyheight / (float)(SKYSTRETCH_HEIGHT + skyoffset);
skytexturemid *= skyheight / (double)(SKYSTRETCH_HEIGHT + skyoffset);
skyscale *= (double)(SKYSTRETCH_HEIGHT + sskyoffset) / skyheight;
skyiscale *= skyheight / (float)(SKYSTRETCH_HEIGHT + sskyoffset);
skytexturemid *= skyheight / (double)(SKYSTRETCH_HEIGHT + sskyoffset);
}
// The standard Doom sky texture is 256 pixels wide, repeated 4 times over 360 degrees,

View file

@ -54,7 +54,7 @@
#include "swrenderer/r_renderthread.h"
#include "g_levellocals.h"
extern int skyoffset;
extern int sskyoffset;
CVAR(Bool, r_linearsky, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
EXTERN_CVAR(Int, r_skymode)
@ -154,7 +154,7 @@ namespace swrenderer
frontcyl = MAX(frontskytex->GetWidth(), frontxscale);
if (skystretch)
{
skymid = skymid * frontskytex->GetScaledHeightDouble() / (SKYSTRETCH_HEIGHT + skyoffset);
skymid = skymid * frontskytex->GetScaledHeightDouble() / (SKYSTRETCH_HEIGHT + sskyoffset);
}
}
}