diff --git a/src/r_things.cpp b/src/r_things.cpp index 7408ba3b1..74b2bd82f 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -94,13 +94,6 @@ static drawseg_xrange_item_t *drawsegs_xrange; static size_t drawsegs_xrange_size = 0; static INT32 drawsegs_xrange_count = 0; -INT32 R_ThingLightLevel(mobj_t* thing) -{ - INT32 lightlevel = thing->lightlevel; - - return lightlevel; -} - // // Sprite rotation 0 is facing the viewer, // rotation 1 is one angle turn CLOCKWISE around the axis. diff --git a/src/r_things.h b/src/r_things.h index 9cba7340d..2f9269c68 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -63,7 +63,10 @@ extern fixed_t windowtop; extern fixed_t windowbottom; extern INT32 lengthcol; -INT32 R_ThingLightLevel(mobj_t *thing); +FUNCINLINE static ATTRINLINE INT32 R_ThingLightLevel(mobj_t* thing) +{ + return (INT32)thing->lightlevel; +} fixed_t R_GetSpriteDirectionalLighting(angle_t angle); fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope); @@ -83,7 +86,7 @@ typedef struct { size_t drawsegs[2]; size_t vissprites[2]; - fixed_t viewx, viewy, viewz; /**< View z stored at the time of the BSP traversal for the view/portal. Masked sorting/drawing needs it. */ + fixed_t viewx, viewy, viewz; /**< View z stored at the time of the BSP traversal for the view/portal. Masked sorting/drawing needs it. */ sector_t* viewsector; } maskcount_t;