more opitmizations stuff
This commit is contained in:
1 parent
cbe78cc50f
commit
8461449f2f
5 files changed
+12
-8
No files matched your search
@@ -249,6 +249,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) // >= GCC 3.1
|
||||
#define FUNCDEAD __attribute__ ((deprecated))
|
||||
#define FUNCINLINE __attribute__((always_inline))
|
||||
#define PUREFUNC __attribute__((pure))
|
||||
#define FUNCNONNULL __attribute__((nonnull))
|
||||
#endif
|
||||
|
||||
@@ -321,6 +322,9 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#ifndef ATTRNOINLINE
|
||||
#define ATTRNOINLINE
|
||||
#endif
|
||||
#ifndef PUREFUNC
|
||||
#define PUREFUNC
|
||||
#endif
|
||||
|
||||
/* Miscellaneous types that don't fit anywhere else (Can this be changed?) */
|
||||
|
||||
|
||||
@@ -2690,7 +2690,7 @@ doaddline:
|
||||
//
|
||||
// modified to use local variables
|
||||
|
||||
boolean HWR_CheckBBox(fixed_t *bspcoord)
|
||||
boolean HWR_CheckBBox(const fixed_t *bspcoord)
|
||||
{
|
||||
INT32 boxpos;
|
||||
fixed_t px1, py1, px2, py2;
|
||||
@@ -3443,7 +3443,7 @@ skip_stuff_for_portals:
|
||||
// use returned value as multiplier for the added values from p_thrust thing
|
||||
// P_InterceptVector needs divlines which need dx and dy, dx=x2-x1 dy=y2-y1
|
||||
|
||||
static boolean HWR_PortalCheckBBox(fixed_t *bspcoord)
|
||||
static boolean HWR_PortalCheckBBox(const fixed_t *bspcoord)
|
||||
{
|
||||
vertex_t closest_point;
|
||||
if (!portalclipline)
|
||||
@@ -3494,7 +3494,7 @@ void HWR_RenderBSPNode(INT32 bspnum)
|
||||
|
||||
while (!(bspnum & NF_SUBSECTOR)) // Found a subsector?
|
||||
{
|
||||
node_t *bsp = &nodes[bspnum];
|
||||
const node_t *bsp = &nodes[bspnum];
|
||||
|
||||
// Decide which side the view point is on.
|
||||
INT32 side = R_PointOnSide(viewx, viewy, bsp);
|
||||
|
||||
@@ -140,7 +140,7 @@ void HWR_AddPolyObjectSegs(void);
|
||||
void HWR_RenderBSPNode(INT32 bspnum);
|
||||
void HWR_Subsector(size_t num);
|
||||
void HWR_AddLine(seg_t *line);
|
||||
boolean HWR_CheckBBox(fixed_t *bspcoord);
|
||||
boolean HWR_CheckBBox(const fixed_t *bspcoord);
|
||||
void HWR_RenderDrawNodes(void);
|
||||
|
||||
// hw_main.c: Sprites
|
||||
|
||||
+2
-2
@@ -331,7 +331,7 @@ static void FlipCam4_OnChange(void)
|
||||
//
|
||||
// killough 5/2/98: reformatted
|
||||
//
|
||||
INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *restrict node)
|
||||
PUREFUNC INT32 R_PointOnSide(fixed_t x, fixed_t y, const node_t *restrict node)
|
||||
{
|
||||
if (!node->dx)
|
||||
return x <= node->x ? node->dy > 0 : node->dy < 0;
|
||||
@@ -350,7 +350,7 @@ INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *restrict node)
|
||||
}
|
||||
|
||||
// killough 5/2/98: reformatted
|
||||
INT32 R_PointOnSegSide(fixed_t x, fixed_t y, seg_t *line)
|
||||
PUREFUNC INT32 R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line)
|
||||
{
|
||||
fixed_t lx = line->v1->x;
|
||||
fixed_t ly = line->v1->y;
|
||||
|
||||
+2
-2
@@ -65,8 +65,8 @@ extern lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
||||
#define NUMCOLORMAPS 32
|
||||
|
||||
// Utility functions.
|
||||
INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *node);
|
||||
INT32 R_PointOnSegSide(fixed_t x, fixed_t y, seg_t *line);
|
||||
INT32 R_PointOnSide(fixed_t x, fixed_t y, const node_t *node);
|
||||
INT32 R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line);
|
||||
angle_t R_PointToAngle(fixed_t x, fixed_t y);
|
||||
angle_t R_PointToAngle64(INT64 x, INT64 y);
|
||||
angle_t R_PointToAngleEx(INT32 x2, INT32 y2, INT32 x1, INT32 y1);
|
||||
|
||||
Reference in new issue
Block a user