- floatified bmaporgx and bmaporgy, allowing to remove the gross overflow prevention hacks present in the blockmap code.
This commit is contained in:
parent
f41afde545
commit
8fd76f0c8a
16 changed files with 74 additions and 154 deletions
|
|
@ -91,7 +91,7 @@ visplane_t *ceilingplane;
|
|||
// Empirically verified to be fairly uniform:
|
||||
|
||||
#define visplane_hash(picnum,lightlevel,height) \
|
||||
((unsigned)((picnum)*3+(lightlevel)+((height).fixD())*7) & (MAXVISPLANES-1))
|
||||
((unsigned)((picnum)*3+(lightlevel)+(FLOAT2FIXED((height).fD()))*7) & (MAXVISPLANES-1))
|
||||
|
||||
// These are copies of the main parameters used when drawing stacked sectors.
|
||||
// When you change the main parameters, you should copy them here too *unless*
|
||||
|
|
@ -605,7 +605,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
|
|||
// always necessary, but it is needed if a floor and ceiling sky are in the
|
||||
// same column but separated by a wall. If they both try to reside in the
|
||||
// same visplane, then only the floor sky will be drawn.
|
||||
plane.set(0, 0, height.fixC(), 0);
|
||||
plane.set(0., 0., height.fC(), 0.);
|
||||
isskybox = skybox != NULL && !skybox->bInSkybox;
|
||||
}
|
||||
else if (skybox != NULL && skybox->bAlways && !skybox->bInSkybox)
|
||||
|
|
@ -1564,7 +1564,7 @@ void R_DrawNormalPlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
|
|||
basexfrac = FixedMul (xscale, finecosine[planeang]) + x*xstepscale;
|
||||
baseyfrac = FixedMul (yscale, -finesine[planeang]) + x*ystepscale;
|
||||
|
||||
planeheight = abs (FixedMul (pl->height.fixD(), -pl->height.fixiC()) - viewz);
|
||||
planeheight = abs (int(pl->height.fD() * -pl->height.fiC() * 65536) - viewz);
|
||||
|
||||
GlobVis = FixedDiv (r_FloorVisibility, planeheight);
|
||||
if (fixedlightlev >= 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue