User:Monster Iestyn/Source Code Documentation/r_segs.h

From SRB2 Wiki
Jump to navigation Jump to search
Online link GitHub entry
File type C header file
#include guard __R_SEGS__

This header file contains prototypes for the functions used to draw individual wall segments (or "segs").

Function name Return type Params Defined in Description
R_RenderMaskedSegRange void drawseg_t *ds,
INT32 x1,
INT32 x2
r_segs.c Renders a masked seg (a segment of a middle texture for a double-sided linedef) in the given range.
R_RenderThickSideRange void drawseg_t *ds,
INT32 x1,
INT32 x2,
ffloor_t *pffloor1
r_segs.c Renders a thick side (a segment of an FOF wall texture) in the given range.
R_StoreWallRange void INT32 start,
INT32 stop
r_segs.c A wall segment will be drawn between start and stop pixels (inclusive). This function also handles clipping for adjacent floor/ceiling planes, marking the boundaries of where their floor/ceiling textures can be drawn later in the same tic.

The following can be drawn by this function via R_RenderSegLoop:

  • bottom and/or top textures if they exist, if the wall segment's linedef is double-sided
  • the middle texture only, if the wall segment's linedef is one-sided (i.e.: has no back sector).

The following won't be drawn by this function, but may be detected and marked to draw later in the same tic:

  • middle textures for double-sided linedefs
  • any unblocked segments of FOF wall textures present between the highest and lowest points of the wall segment

1 Named "pfloor" instead in the function definition given in r_segs.c