remove R_PointToAngleEx
R_PointToAngle64 does its job better anyways
This commit is contained in:
1 parent
072bb75504
commit
8387a00b75
3 files changed
+2
-26
No files matched your search
@@ -5948,8 +5948,8 @@ static void HWR_PortalClipping(gl_portal_t *portal)
|
||||
|
||||
line_t *line = &lines[portal->clipline];
|
||||
|
||||
angle1 = R_PointToAngleEx(viewx, viewy, line->v1->x, line->v1->y);
|
||||
angle2 = R_PointToAngleEx(viewx, viewy, line->v2->x, line->v2->y);
|
||||
angle1 = R_PointToAngle64(line->v1->x, line->v1->y);
|
||||
angle2 = R_PointToAngle64(line->v2->x, line->v2->y);
|
||||
|
||||
// clip things that are not inside the portal window from our viewpoint
|
||||
gld_clipper_SafeAddClipRange(angle2, angle1);
|
||||
|
||||
@@ -483,29 +483,6 @@ fixed_t R_PointToDist(fixed_t x, fixed_t y)
|
||||
return R_PointToDist2(viewx, viewy, x, y);
|
||||
}
|
||||
|
||||
angle_t R_PointToAngleEx(INT32 x2, INT32 y2, INT32 x1, INT32 y1)
|
||||
{
|
||||
INT64 dx = x1-x2;
|
||||
INT64 dy = y1-y2;
|
||||
if (dx < INT32_MIN || dx > INT32_MAX || dy < INT32_MIN || dy > INT32_MAX)
|
||||
{
|
||||
x1 = (int)(dx / 2 + x2);
|
||||
y1 = (int)(dy / 2 + y2);
|
||||
}
|
||||
return (y1 -= y2, (x1 -= x2) || y1) ?
|
||||
x1 >= 0 ?
|
||||
y1 >= 0 ?
|
||||
(x1 > y1) ? tantoangle[SlopeDivEx(y1,x1)] : // octant 0
|
||||
ANGLE_90-tantoangle[SlopeDivEx(x1,y1)] : // octant 1
|
||||
x1 > (y1 = -y1) ? 0-tantoangle[SlopeDivEx(y1,x1)] : // octant 8
|
||||
ANGLE_270+tantoangle[SlopeDivEx(x1,y1)] : // octant 7
|
||||
y1 >= 0 ? (x1 = -x1) > y1 ? ANGLE_180-tantoangle[SlopeDivEx(y1,x1)] : // octant 3
|
||||
ANGLE_90 + tantoangle[SlopeDivEx(x1,y1)] : // octant 2
|
||||
(x1 = -x1) > (y1 = -y1) ? ANGLE_180+tantoangle[SlopeDivEx(y1,x1)] : // octant 4
|
||||
ANGLE_270-tantoangle[SlopeDivEx(x1,y1)] : // octant 5
|
||||
0;
|
||||
}
|
||||
|
||||
//
|
||||
// R_ScaleFromGlobalAngle
|
||||
// Returns the texture mapping scale for the current line (horizontal span)
|
||||
|
||||
@@ -70,7 +70,6 @@ INT32 R_PointOnSegSide(fixed_t x, fixed_t y, seg_t *line);
|
||||
angle_t R_PointToAngle(fixed_t x, fixed_t y);
|
||||
angle_t R_PointToAngle64(INT64 x, INT64 y);
|
||||
angle_t R_PointToAngle2(fixed_t px2, fixed_t py2, fixed_t px1, fixed_t py1);
|
||||
angle_t R_PointToAngleEx(INT32 x2, INT32 y2, INT32 x1, INT32 y1);
|
||||
fixed_t R_PointToDist(fixed_t x, fixed_t y);
|
||||
fixed_t R_PointToDist2(fixed_t px2, fixed_t py2, fixed_t px1, fixed_t py1);
|
||||
angle_t R_PlayerSliptideAngle(player_t *player);
|
||||
|
||||
Reference in new issue
Block a user