User:Monster Iestyn/Source Code Documentation/r_state.h
Jump to navigation
Jump to search
This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article. |
Online link | GitHub entry |
---|---|
File type | C header file |
#include guard | __R_STATE__
|
Includes
Typedefs
Name | Type | Description |
---|---|---|
sprcache_t
|
struct
|
sprcache_t
Data name | Data type | Description |
---|---|---|
width
|
fixed_t
|
|
offset
|
fixed_t
|
|
topoffset
|
fixed_t
|
|
height
|
fixed_t
|
Externs
Data name | Data type | Non-extern location(s) | Description |
---|---|---|---|
*spritecachedinfo
|
sprcache_t
|
r_data.c
|
|
*fadecolormap
|
lighttable_t
|
r_data.c
|
|
*colormaps
|
lighttable_t
|
r_data.c
|
|
num_extra_colormaps
|
size_t
|
r_main.c
|
|
*extra_colormaps
|
extracolormap_t
|
r_main.c
|
|
*texturetranslation
|
INT32 | r_data.c
|
|
numspritelumps max_spritelumps
|
size_t
|
r_data.c
|
|
Map data | |||
numsprites
|
size_t
|
r_things.c
|
The number of sprite names currently recognised by SRB2, except those for character skins. This is only set on game startup by R_InitSprites , where it is used to count the total number the number of sprite names found in sprnames – because sprnames has a size of NUMSPRITES and has a sprite name set in every slot, numsprites will always have a value of NUMSPRITES in unmodified SRB2.
|
*sprites
|
spritedef_t |
r_things.c
|
The lookup table for all sprite definitions in SRB2, except those for character skins. Has a size of numsprites . Individual sprite definitions may be updated whenever a WAD file that declares new sprite names or has replacements for existing sprites is loaded.
|
numvertexes
|
size_t
|
p_setup.c
|
The number of vertices in the current map. |
*vertexes
|
vertex_t
|
p_setup.c
|
The lookup table for the current map's vertices. Has a size of numvertexes .
|
numsegs
|
size_t
|
p_setup.c
|
The number of segs in the current map. |
*segs |
seg_t
|
p_setup.c
|
The lookup table for the current map's segs. Has a size of numsegs .
|
numsectors
|
size_t
|
p_setup.c
|
The number of sectors in the current map. |
*sectors |
sector_t
|
p_setup.c
|
The lookup table for the current map's sectors. Has a size of numsectors .
|
numsubsectors
|
size_t
|
p_setup.c
|
The number of subsector in the current map. |
*subsectors |
subsector_t
|
p_setup.c
|
The lookup table for the current map's subsectors. Has a size of numsubsectors .
|
numnodes
|
size_t
|
p_setup.c
|
The number of nodes in the current map. |
*nodes |
node_t
|
p_setup.c
|
The lookup table for the current map's nodes. Has a size of numnodes .
|
numlines
|
size_t
|
p_setup.c
|
The number of linedefs in the current map. |
*lines |
line_t
|
p_setup.c
|
The lookup table for the current map's linedefs. Has a size of numlines .
|
numsides
|
size_t
|
p_setup.c
|
The number of sidedefs in the current map. |
*sides |
side_t
|
p_setup.c
|
The lookup table for the current map's sidedefs. Has a size of numsides .
|
POV data | |||
viewx viewy viewz
|
fixed_t
|
r_main.c
|
The X, Y and Z coordinates of the point of view (POV) to render the level from for the current frame. |
viewangle aimingangle
|
angle_t
|
r_main.c
|
viewangle is the absolute horizontal angle the POV is looking in for the current frame.
|
*viewsector
|
sector_t
|
r_main.c
|
|
*viewplayer
|
player_t
|
r_main.c
|
|
cv_allowmlook
|
consvar_t
|
r_main.c
|
allowmlook console variable struct
|
cv_maxportals
|
consvar_t
|
r_main.c
|
maxportals console variable struct
|
clipangle
|
angle_t
|
r_main.c
|
|
doubleclipangle
|
angle_t
|
r_main.c
|
|
viewangletox[FINEANGLES/2]
|
INT32 | r_main.c
|
The lookup table for converting view angles to screen X coordinates. The given view angle must be shifted down to fine angle scale with ANGLETOFINESHIFT first in order to get the corresponding X coordinate. This table will be updated whenever the screen resolution is changed.
|
xtoviewangle[MAXVIDWIDTH+1]
|
angle_t
|
r_main.c
|
The lookup table for converting screen X coordinates to view angles. Specifically, this gives the smallest view angle that maps to each X coordinate. This table will be updated whenever the screen resolution is changed. |
rw_distance
|
fixed_t
|
r_segs.c
|
A calculated "distance" value from the POV to the current seg being drawn, used by R_ScaleFromGlobalAngle to determine the texture mapping scales to draw the seg at on the screen (the larger the rw_distance value is the smaller the scales given will be). Specifically, this is calculated to be the closest distance the POV would be from the seg if both ends of the seg's line were extended infinitely.
|
rw_normalangle
|
angle_t
|
r_segs.c
|
The absolute angle of the normal of the current seg being drawn (i.e.: the angle perpendicular to the seg's angle, directed towards the POV). |
rw_angle1
|
angle_t
|
r_segs.c
|
The absolute angle of the POV to the left vertex (v1) of the current seg being drawn. |