- made it compile again.

The software renderer float conversion removed viewx and viewy which are still needed for efficient position checks against nodes without constant float->fixed conversions.
This commit is contained in:
Christoph Oelckers 2016-04-23 10:50:19 +02:00
parent ba37854e44
commit 6450752399
4 changed files with 6 additions and 3 deletions

View file

@ -63,6 +63,7 @@ CVAR(Bool, gl_render_things, true, 0)
CVAR(Bool, gl_render_walls, true, 0) CVAR(Bool, gl_render_walls, true, 0)
CVAR(Bool, gl_render_flats, true, 0) CVAR(Bool, gl_render_flats, true, 0)
extern fixed_t viewx, viewy;
static void UnclipSubsector(subsector_t *sub) static void UnclipSubsector(subsector_t *sub)
{ {

View file

@ -388,6 +388,8 @@ angle_t Clipper::AngleToPseudo(angle_t ang)
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
fixed_t viewx, viewy;
void R_SetView() void R_SetView()
{ {
viewx = FLOAT2FIXED(ViewPos.X); viewx = FLOAT2FIXED(ViewPos.X);

View file

@ -272,7 +272,7 @@ void GLWall::SkyTop(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,vertex
// or it will cause glitches elsewhere. // or it will cause glitches elsewhere.
tex = TexMan(seg->sidedef->GetTexture(side_t::mid)); tex = TexMan(seg->sidedef->GetTexture(side_t::mid));
if (tex != NULL && !(seg->linedef->flags & ML_DONTPEGTOP) && if (tex != NULL && !(seg->linedef->flags & ML_DONTPEGTOP) &&
seg->sidedef->GetTextureYOffset(side_t::mid) > 0) seg->sidedef->GetTextureYOffsetF(side_t::mid) > 0)
{ {
ztop[0]=ztop[1]=32768.0f; ztop[0]=ztop[1]=32768.0f;
zbottom[0]=zbottom[1]= zbottom[0]=zbottom[1]=

View file

@ -644,7 +644,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, bool thruportal)
gltexture=NULL; gltexture=NULL;
} }
depth = (int)((x - ViewPos.X) * viewtancos + (y - ViewPos.Y) * viewtansin); depth = FloatToFixed((x - ViewPos.X) * ViewTanCos + (y - ViewPos.Y) * ViewTanSin);
// light calculation // light calculation
@ -945,7 +945,7 @@ void GLSprite::ProcessParticle (particle_t *particle, sector_t *sector)//, int s
z1=z-scalefac; z1=z-scalefac;
z2=z+scalefac; z2=z+scalefac;
depth = (int)((x - ViewPos.X) * viewtancos + (y - ViewPos.Y) * viewtansin); depth = FloatToFixed((x - ViewPos.X) * ViewTanCos + (y - ViewPos.Y) * ViewTanSin);
actor=NULL; actor=NULL;
this->particle=particle; this->particle=particle;