Branch using perspective-divide equations for rendering walls more accurately (take 2).

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3638 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Remove angle-based clipping from R_AddLine.
-In the future, rw_frontfz1, rw_backfz1, etc. should be calculated in R_AddLine once and not calculated again in R_StoreWallRange. This will require lclip1 and lclip2 to be properly clipped to the screen edges in R_AddLine.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3639 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Change R_AddLine to properly set lclip1 and lclip2 as lines are clipped to the sides fo the screen.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3640 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Add proper clipping for linesegs in widescreen modes.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3641 b0bcef46-2027-0410-bd56-ab726e9a1d04
-R_StoreWallRange no longer calculates rw_frontcz1, etc. These values are now calculated in R_AddLine, doing away with R_ColumnToPointOnSeg and the inaccuracy that function incurs.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3642 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Add a new function R_PrepWall that takes care of calculating the values for the walltopf, wallbottomf, walltopb, and wallbottomb arrays.
-This code has been removed from R_StoreWallRange and called directly from R_AddLine before the line is clipped into additional segments.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3643 b0bcef46-2027-0410-bd56-ab726e9a1d04
-R_PrepWall now calculates the scale for the endpoints of the lineseg itself rather than calling R_ScaleFromGlobalAngle.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3644 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Add function R_ClipEndPoints to clip a line's endpoints using lclip1 and lclip2.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3645 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Calculate the screen coordinates of wall vertices using perspective divide.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3646 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Prevent integer overflows when calculating the top and bottom screen heights for wall columns.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3647 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Round when calculating x1 and x2 in R_AddLine.
-Fix horizon lines.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3648 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Clean up BlastColumn and R_PrepWall.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3649 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Simplify BlastColumn().
-Change walltopf, walltopb, wallbottomf, & wallbottomb back to arrays of ints so that they match ceilingclip and floorclip.
-The min and max values for ceilingclip and floorclip are now 0 and viewheight-1.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3650 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Fix a bug with windows into underwater areas (R_FakeFlat)
-Don't recalculate frontsector and backsector in R_PrepWall
-Minor code cleanup.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3651 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Simplify calculation of dc_texturefrac a tad.
-remove global array distscale.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3652 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Factor the calculation of dc_iscale out of R_SetTextureParams. It is now calculated in BlastColumn and the same value is used for all wall tiers.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3653 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Pre-calculate a table of scale values for each column along a wall in R_PrepWall, avoiding R_ScaleFromGlobalAngle. Fixes subtle vertical jiggling of textures as the player moved closer.
-Remove the multiply from the inner-loop of R_FillWallHeightArray.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3654 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Remove R_ScaleFromGlobalAngle as it's no longer used.
-Remove a bit of code from R_FillWallHeightArray that accidentally worked its way in there.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3655 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Move the declaration of lclip1 and lclip2 from file-scope to the top of R_AddLine.
-Clamp the dist parameters slightly in R_FillWallHeightArray to prevent integer overflows and divide-by-zeros.
-Some code clean-up.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3656 b0bcef46-2027-0410-bd56-ab726e9a1d04
-Calculate the texture-column using standard perspective-divide equations instead of using xtoviewangle.
-Use double-precision floating point math to prevent integer overflows when calculating which texture column to use and when calculating wall projections. Tested with 6000 unit long walls and found no texture jiggling.
-Calculate a seg's length when loading the map and store it in seg_t.
-Remove some unused globals related to wall texture-mapping.

git-svn-id: http://odamex.net/svn/root/branches/persdiv@3657 b0bcef46-2027-0410-bd56-ab726e9a1d04