mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-24 03:32:22 +00:00
Merge branch 'node-shit' into 'next'
Fix a few rendering errors See merge request STJr/SRB2!1901
This commit is contained in:
commit
ca039ad49b
4 changed files with 16 additions and 16 deletions
|
@ -3009,7 +3009,7 @@ static inline void P_LoadSubsectors(UINT8 *data)
|
|||
for (i = 0; i < numsubsectors; i++, ss++, ms++)
|
||||
{
|
||||
ss->numlines = SHORT(ms->numsegs);
|
||||
ss->firstline = SHORT(ms->firstseg);
|
||||
ss->firstline = (UINT16)SHORT(ms->firstseg);
|
||||
P_InitializeSubsector(ss);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -399,8 +399,8 @@ static void R_AddLine(seg_t *line)
|
|||
return;
|
||||
|
||||
// big room fix
|
||||
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);
|
||||
curline = line;
|
||||
|
||||
// Clip to view edges.
|
||||
|
@ -620,8 +620,8 @@ static boolean R_CheckBBox(const fixed_t *bspcoord)
|
|||
check = checkcoord[boxpos];
|
||||
|
||||
// big room fix
|
||||
angle1 = R_PointToAngleEx(viewx, viewy, bspcoord[check[0]], bspcoord[check[1]]) - viewangle;
|
||||
angle2 = R_PointToAngleEx(viewx, viewy, bspcoord[check[2]], bspcoord[check[3]]) - viewangle;
|
||||
angle1 = R_PointToAngle64(bspcoord[check[0]], bspcoord[check[1]]) - viewangle;
|
||||
angle2 = R_PointToAngle64(bspcoord[check[2]], bspcoord[check[3]]) - viewangle;
|
||||
|
||||
if ((signed)angle1 < (signed)angle2)
|
||||
{
|
||||
|
|
|
@ -587,7 +587,7 @@ typedef struct subsector_s
|
|||
{
|
||||
sector_t *sector;
|
||||
INT16 numlines;
|
||||
UINT16 firstline;
|
||||
UINT32 firstline;
|
||||
struct polyobj_s *polyList; // haleyjd 02/19/06: list of polyobjects
|
||||
size_t validcount;
|
||||
} subsector_t;
|
||||
|
|
20
src/r_main.c
20
src/r_main.c
|
@ -266,13 +266,13 @@ INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *node)
|
|||
if (!node->dy)
|
||||
return y <= node->y ? node->dx < 0 : node->dx > 0;
|
||||
|
||||
x -= node->x;
|
||||
y -= node->y;
|
||||
fixed_t dx = (x >> 1) - (node->x >> 1);
|
||||
fixed_t dy = (y >> 1) - (node->y >> 1);
|
||||
|
||||
// Try to quickly decide by looking at sign bits.
|
||||
if ((node->dy ^ node->dx ^ x ^ y) < 0)
|
||||
return (node->dy ^ x) < 0; // (left is negative)
|
||||
return FixedMul(y, node->dx>>FRACBITS) >= FixedMul(node->dy>>FRACBITS, x);
|
||||
if ((node->dy ^ node->dx ^ dx ^ dy) < 0)
|
||||
return (node->dy ^ dx) < 0; // (left is negative)
|
||||
return FixedMul(dy, node->dx>>FRACBITS) >= FixedMul(node->dy>>FRACBITS, dx);
|
||||
}
|
||||
|
||||
// killough 5/2/98: reformatted
|
||||
|
@ -289,13 +289,13 @@ INT32 R_PointOnSegSide(fixed_t x, fixed_t y, seg_t *line)
|
|||
if (!ldy)
|
||||
return y <= ly ? ldx < 0 : ldx > 0;
|
||||
|
||||
x -= lx;
|
||||
y -= ly;
|
||||
fixed_t dx = (x >> 1) - (lx >> 1);
|
||||
fixed_t dy = (y >> 1) - (ly >> 1);
|
||||
|
||||
// Try to quickly decide by looking at sign bits.
|
||||
if ((ldy ^ ldx ^ x ^ y) < 0)
|
||||
return (ldy ^ x) < 0; // (left is negative)
|
||||
return FixedMul(y, ldx>>FRACBITS) >= FixedMul(ldy>>FRACBITS, x);
|
||||
if ((ldy ^ ldx ^ dx ^ dy) < 0)
|
||||
return (ldy ^ dx) < 0; // (left is negative)
|
||||
return FixedMul(dy, ldx>>FRACBITS) >= FixedMul(ldy>>FRACBITS, dx);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue