Animated sky backport

This commit is contained in:
toaster 2018-09-17 11:21:25 +01:00
parent 8618d7bbec
commit 123778766a
2 changed files with 4 additions and 4 deletions

View file

@ -5581,7 +5581,7 @@ static void HWR_DrawSkyBackground(player_t *player)
// 0--1
(void)player;
HWR_GetTexture(skytexture);
HWR_GetTexture(texturetranslation[skytexture]);
//Hurdler: the sky is the only texture who need 4.0f instead of 1.0
// because it's called just after clearing the screen
@ -5601,7 +5601,7 @@ static void HWR_DrawSkyBackground(player_t *player)
// The only time this will probably be an issue is when a sky wider than 1024 is used as a sky AND a regular wall texture
angle = (dup_viewangle + gr_xtoviewangle[0]);
dimensionmultiply = ((float)textures[skytexture]->width/256.0f);
dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->width/256.0f);
if (atransform.mirror)
{
@ -5616,7 +5616,7 @@ static void HWR_DrawSkyBackground(player_t *player)
angle = aimingangle;
aspectratio = (float)vid.width/(float)vid.height;
dimensionmultiply = ((float)textures[skytexture]->height/(128.0f*aspectratio));
dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->height/(128.0f*aspectratio));
angleturn = (((float)ANGLE_45-1.0f)*aspectratio)*dimensionmultiply;
// Middle of the sky should always be at angle 0

View file

@ -720,7 +720,7 @@ void R_DrawPlanes(void)
dc_iscale = FixedMul(skyscale, FINECOSINE(xtoviewangle[x]>>ANGLETOFINESHIFT));
dc_x = x;
dc_source =
R_GetColumn(skytexture,
R_GetColumn(texturetranslation[skytexture],
angle);
wallcolfunc();
}