Merge branch 'mpc-software-yslope-fix' into 'master'

Fix glitches with flats visible when looking up/down in 1st person (software renderer fix)

See merge request STJr/SRB2!282
This commit is contained in:
Monster Iestyn 2018-11-25 11:51:54 -05:00
commit 5069acb110
3 changed files with 5 additions and 3 deletions

View File

@ -607,7 +607,7 @@ void R_ExecuteSetViewSize(void)
if (rendermode == render_soft)
{
// this is only used for planes rendering in software mode
j = viewheight*4;
j = viewheight*8;
for (i = 0; i < j; i++)
{
dy = ((i - viewheight*2)<<FRACBITS) + FRACUNIT/2;
@ -952,6 +952,7 @@ void R_SkyboxFrame(player_t *player)
// recalc necessary stuff for mouseaiming
// slopes are already calculated for the full possible view (which is 4*viewheight).
// 18/08/18: (No it's actually 8*viewheight, thanks MPC aka Jimita for finding this out)
if (rendermode == render_soft)
{
@ -1075,6 +1076,7 @@ void R_SetupFrame(player_t *player, boolean skybox)
// recalc necessary stuff for mouseaiming
// slopes are already calculated for the full possible view (which is 4*viewheight).
// 18/08/18: (No it's actually 8*viewheight, thanks MPC aka Jimita for finding this out)
if (rendermode == render_soft)
{

View File

@ -89,7 +89,7 @@ static fixed_t planeheight;
// (this is to calculate yslopes only when really needed)
// (when mouselookin', yslope is moving into yslopetab)
// Check R_SetupFrame, R_SetViewSize for more...
fixed_t yslopetab[MAXVIDHEIGHT*4];
fixed_t yslopetab[MAXVIDHEIGHT*8];
fixed_t *yslope;
fixed_t distscale[MAXVIDWIDTH];

View File

@ -75,7 +75,7 @@ extern INT16 *lastopening, *openings;
extern size_t maxopenings;
extern INT16 floorclip[MAXVIDWIDTH], ceilingclip[MAXVIDWIDTH];
extern fixed_t frontscale[MAXVIDWIDTH], yslopetab[MAXVIDHEIGHT*4];
extern fixed_t frontscale[MAXVIDWIDTH], yslopetab[MAXVIDHEIGHT*8];
extern fixed_t cachedheight[MAXVIDHEIGHT];
extern fixed_t cacheddistance[MAXVIDHEIGHT];
extern fixed_t cachedxstep[MAXVIDHEIGHT];