mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- 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:
parent
ba37854e44
commit
6450752399
4 changed files with 6 additions and 3 deletions
|
@ -63,6 +63,7 @@ CVAR(Bool, gl_render_things, true, 0)
|
|||
CVAR(Bool, gl_render_walls, true, 0)
|
||||
CVAR(Bool, gl_render_flats, true, 0)
|
||||
|
||||
extern fixed_t viewx, viewy;
|
||||
|
||||
static void UnclipSubsector(subsector_t *sub)
|
||||
{
|
||||
|
|
|
@ -388,6 +388,8 @@ angle_t Clipper::AngleToPseudo(angle_t ang)
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
fixed_t viewx, viewy;
|
||||
|
||||
void R_SetView()
|
||||
{
|
||||
viewx = FLOAT2FIXED(ViewPos.X);
|
||||
|
|
|
@ -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.
|
||||
tex = TexMan(seg->sidedef->GetTexture(side_t::mid));
|
||||
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;
|
||||
zbottom[0]=zbottom[1]=
|
||||
|
|
|
@ -644,7 +644,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, bool thruportal)
|
|||
gltexture=NULL;
|
||||
}
|
||||
|
||||
depth = (int)((x - ViewPos.X) * viewtancos + (y - ViewPos.Y) * viewtansin);
|
||||
depth = FloatToFixed((x - ViewPos.X) * ViewTanCos + (y - ViewPos.Y) * ViewTanSin);
|
||||
|
||||
// light calculation
|
||||
|
||||
|
@ -945,7 +945,7 @@ void GLSprite::ProcessParticle (particle_t *particle, sector_t *sector)//, int s
|
|||
z1=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;
|
||||
this->particle=particle;
|
||||
|
|
Loading…
Reference in a new issue