Merge branch 'blankart-dev' into neotabranking

This commit is contained in:
NepDisk 2025-09-02 22:07:26 -04:00
commit 8f16625831
2 changed files with 13 additions and 13 deletions

View file

@ -101,17 +101,6 @@ void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *Line, vector3_t
return;
}
//
// P_PointOnLineSide
// Returns 0 or 1
//
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line)
{
// use cross product to determine side quickly
INT64 v = ((INT64)y - line->v1->y) * line->dx - ((INT64)x - line->v1->x) * line->dy;
return v > 0;
}
//
// P_BoxOnLineSide
// Considers the line to be infinite
@ -149,7 +138,7 @@ INT32 P_BoxOnLineSide(const fixed_t *tmbox, const line_t *ld)
// P_PointOnDivlineSide
// Returns 0 or 1.
//
static INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line)
FUNCMATH FUNCINLINE static ATTRINLINE INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line)
{
// use cross product to determine side quickly
INT64 v = ((INT64)y - line->y) * line->dx - ((INT64)x - line->x) * line->dy;

View file

@ -48,7 +48,18 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2,
#define P_AproxDistance(dx, dy) FixedHypot(dx, dy)
void P_ClosestPointOnLine(fixed_t x, fixed_t y, const line_t *line, vertex_t *result);
void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *line, vector3_t *result);
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line);
//
// P_PointOnLineSide
// Returns 0 or 1
//
FUNCMATH FUNCINLINE static ATTRINLINE INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line)
{
// use cross product to determine side quickly
INT64 v = ((INT64)y - line->v1->y) * line->dx - ((INT64)x - line->v1->x) * line->dy;
return v > 0;
}
void P_MakeDivline(const line_t *li, divline_t *dl);
struct opening_t