Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts: # src/r_defs.h
This commit is contained in:
commit
f7553fcd51
34 changed files with 389 additions and 606 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include "p_lnspec.h"
|
||||
#include "p_setup.h"
|
||||
|
||||
#include "r_local.h"
|
||||
#include "r_main.h"
|
||||
#include "r_plane.h"
|
||||
#include "r_draw.h"
|
||||
|
|
@ -394,8 +395,8 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec,
|
|||
}
|
||||
}
|
||||
|
||||
fixed_t refceilz = s->ceilingplane.ZatPoint (viewx, viewy);
|
||||
fixed_t orgceilz = sec->ceilingplane.ZatPoint (viewx, viewy);
|
||||
fixed_t refceilz = s->ceilingplane.ZatPointFixed (viewx, viewy);
|
||||
fixed_t orgceilz = sec->ceilingplane.ZatPointFixed(viewx, viewy);
|
||||
|
||||
#if 1
|
||||
// [RH] Allow viewing underwater areas through doors/windows that
|
||||
|
|
@ -404,8 +405,8 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec,
|
|||
// sectors at the same time.
|
||||
if (back && !r_fakingunderwater && curline->frontsector->heightsec == NULL)
|
||||
{
|
||||
if (rw_frontcz1 <= s->floorplane.ZatPoint (curline->v1->fixX(), curline->v1->fixY()) &&
|
||||
rw_frontcz2 <= s->floorplane.ZatPoint (curline->v2->fixX(), curline->v2->fixY()))
|
||||
if (rw_frontcz1 <= s->floorplane.ZatPointFixed (curline->v1) &&
|
||||
rw_frontcz2 <= s->floorplane.ZatPointFixed(curline->v2))
|
||||
{
|
||||
// Check that the window is actually visible
|
||||
for (int z = WallC.sx1; z < WallC.sx2; ++z)
|
||||
|
|
@ -555,7 +556,7 @@ void R_AddLine (seg_t *line)
|
|||
|
||||
// reject lines that aren't seen from the portal (if any)
|
||||
// [ZZ] 10.01.2016: lines inside a skybox shouldn't be clipped, although this imposes some limitations on portals in skyboxes.
|
||||
if (!CurrentPortalInSkybox && CurrentPortal && P_ClipLineToPortal(line->linedef, CurrentPortal->dst, DVector2(FIXED2DBL(viewx), FIXED2DBL(viewy))))
|
||||
if (!CurrentPortalInSkybox && CurrentPortal && P_ClipLineToPortal(line->linedef, CurrentPortal->dst, ViewPos))
|
||||
return;
|
||||
|
||||
vertex_t *v1, *v2;
|
||||
|
|
@ -580,10 +581,10 @@ void R_AddLine (seg_t *line)
|
|||
{
|
||||
backsector = line->backsector;
|
||||
}
|
||||
rw_frontcz1 = frontsector->ceilingplane.ZatPoint (line->v1->fixX(), line->v1->fixY());
|
||||
rw_frontfz1 = frontsector->floorplane.ZatPoint (line->v1->fixX(), line->v1->fixY());
|
||||
rw_frontcz2 = frontsector->ceilingplane.ZatPoint (line->v2->fixX(), line->v2->fixY());
|
||||
rw_frontfz2 = frontsector->floorplane.ZatPoint (line->v2->fixX(), line->v2->fixY());
|
||||
rw_frontcz1 = frontsector->ceilingplane.ZatPointFixed(line->v1);
|
||||
rw_frontfz1 = frontsector->floorplane.ZatPointFixed(line->v1);
|
||||
rw_frontcz2 = frontsector->ceilingplane.ZatPointFixed(line->v2);
|
||||
rw_frontfz2 = frontsector->floorplane.ZatPointFixed(line->v2);
|
||||
|
||||
rw_mustmarkfloor = rw_mustmarkceiling = false;
|
||||
rw_havehigh = rw_havelow = false;
|
||||
|
|
@ -602,10 +603,10 @@ void R_AddLine (seg_t *line)
|
|||
}
|
||||
doorclosed = 0; // killough 4/16/98
|
||||
|
||||
rw_backcz1 = backsector->ceilingplane.ZatPoint (line->v1->fixX(), line->v1->fixY());
|
||||
rw_backfz1 = backsector->floorplane.ZatPoint (line->v1->fixX(), line->v1->fixY());
|
||||
rw_backcz2 = backsector->ceilingplane.ZatPoint (line->v2->fixX(), line->v2->fixY());
|
||||
rw_backfz2 = backsector->floorplane.ZatPoint (line->v2->fixX(), line->v2->fixY());
|
||||
rw_backcz1 = backsector->ceilingplane.ZatPointFixed (line->v1);
|
||||
rw_backfz1 = backsector->floorplane.ZatPointFixed(line->v1);
|
||||
rw_backcz2 = backsector->ceilingplane.ZatPointFixed(line->v2);
|
||||
rw_backfz2 = backsector->floorplane.ZatPointFixed(line->v2);
|
||||
|
||||
// Cannot make these walls solid, because it can result in
|
||||
// sprite clipping problems for sprites near the wall
|
||||
|
|
@ -1183,9 +1184,9 @@ void R_Subsector (subsector_t *sub)
|
|||
fakeFloor->validcount = validcount;
|
||||
R_3D_NewClip();
|
||||
}
|
||||
fakeHeight = FLOAT2FIXED(fakeFloor->top.plane->ZatPoint(frontsector->centerspot));
|
||||
if (fakeHeight < viewz &&
|
||||
fakeHeight > FLOAT2FIXED(frontsector->floorplane.ZatPoint(frontsector->centerspot)))
|
||||
double fakeHeight = fakeFloor->top.plane->ZatPoint(frontsector->centerspot);
|
||||
if (fakeHeight < ViewPos.Z &&
|
||||
fakeHeight > frontsector->floorplane.ZatPoint(frontsector->centerspot))
|
||||
{
|
||||
fake3D = FAKE3D_FAKEFLOOR;
|
||||
tempsec = *fakeFloor->model;
|
||||
|
|
@ -1245,9 +1246,9 @@ void R_Subsector (subsector_t *sub)
|
|||
fakeFloor->validcount = validcount;
|
||||
R_3D_NewClip();
|
||||
}
|
||||
fakeHeight = FLOAT2FIXED(fakeFloor->bottom.plane->ZatPoint(frontsector->centerspot));
|
||||
if (fakeHeight > viewz &&
|
||||
fakeHeight < FLOAT2FIXED(frontsector->ceilingplane.ZatPoint(frontsector->centerspot)))
|
||||
double fakeHeight = fakeFloor->bottom.plane->ZatPoint(frontsector->centerspot);
|
||||
if (fakeHeight > ViewPos.Z &&
|
||||
fakeHeight < frontsector->ceilingplane.ZatPoint(frontsector->centerspot))
|
||||
{
|
||||
fake3D = FAKE3D_FAKECEILING;
|
||||
tempsec = *fakeFloor->model;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue