User:Monster Iestyn/Source Code Documentation/hardware/hw_main.h
![]() |
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 | __HWR_MAIN_H__
|
Includes
- hw_data.h
- hw_defs.h
- ../am_map.h
- ../d_player.h
- ../r_defs.h
Function prototypes
Function name | Return type | Params | Defined in | Attributes | Description |
---|---|---|---|---|---|
HWR_Startup
|
void | none | hw_main.c
|
Initalises the hardware renderer. | |
HWR_Shutdown
|
void | none | hw_main.c
|
Frees resources allocated by the hardware renderer. | |
HWR_drawAMline
|
void | const fline_t *fl ,INT32 color
|
hw_draw.c
|
Draws a line on the automap to the screen. | |
HWR_FadeScreenMenuBack
|
void | UINT32 color ,INT32 height
|
hw_draw.c
|
Hardware version of V_DrawFadeScreen .
| |
HWR_DrawConsoleBack
|
void | UINT32 color ,INT32 height
|
hw_draw.c
|
Hardware version of V_DrawFadeConsBack .
| |
HWR_RenderSkyboxView
|
void | INT32 viewnumber ,player_t *player
|
hw_main.c
|
Renders the skybox view. Called only by HWR_RenderPlayerView .
| |
HWR_RenderPlayerView
|
void | INT32 viewnumber ,player_t *player
|
hw_main.c
|
Hardware version of R_RenderPlayerView .
| |
HWR_DrawViewBorder
|
void | INT32 clearlines
|
hw_draw.c
|
Hardware version of R_DrawViewBorder . (Note: R_DrawViewBorder is disabled as of v2.1, so this function is unused)
| |
HWR_DrawFlatFill
|
void | INT32 x ,INT32 y ,INT32 w ,INT32 h ,lumpnum_t flatlumpnum
|
hw_draw.c
|
Hardware version of V_DrawFlatFill .
| |
HWR_InitTextureMapping
|
void | none | hw_main.c
|
Hardware version of R_InitTextureMapping .
| |
HWR_SetViewSize
|
void | none | hw_main.c
|
||
HWR_DrawPatch
|
void | GLPatch_t *gpatch ,INT32 x ,INT32 y ,INT32 option
|
hw_draw.c
|
||
HWR_DrawFixedPatch
|
void | GLPatch_t *gpatch ,fixed_t x ,fixed_t y ,INT32 option ,fixed_t scale ,const UINT8 *colormap
|
hw_draw.c
|
Hardware version of V_DrawFixedPatch .
| |
HWR_DrawCroppedPatch
|
void | GLPatch_t *gpatch ,fixed_t x ,fixed_t y ,fixed_t scale ,INT32 option ,fixed_t sx ,fixed_t sy ,fixed_t w ,fixed_t h
|
hw_draw.c
|
Hardware version of V_DrawCroppedPatch .
| |
HWR_DrawCroppedPatch
|
void | GLPatch_t *gpatch ,fixed_t x ,fixed_t y ,INT32 option ,fixed_t scale ,fixed_t sx ,fixed_t sy ,fixed_t w ,fixed_t h
|
hw_draw.c
|
Hardware version of V_DrawCroppedPatch . (Duplicate prototype)
| |
HWR_MakePatch
|
void | const patch_t *patch ,GLPatch_t *grPatch ,GLMipmap_t *grMipmap ,boolean makebitmap
|
hw_cache.c
|
||
HWR_CreatePlanePolygons
|
void | INT32 bspnum
|
hw_bsp.c
|
||
HWR_CreateStaticLightmaps
|
void | INT32 bspnum
|
hw_light.c
|
||
HWR_PrepLevelCache
|
void | size_t pnumtextures
|
hw_cache.c
|
||
HWR_DrawFill
|
void | INT32 x ,INT32 y ,INT32 w ,INT32 h ,INT32 color
|
hw_draw.c
|
Hardware version of V_DrawFill .
| |
HWR_DrawConsoleFill
|
void | INT32 x ,INT32 y ,INT32 w ,INT32 h ,INT32 color ,INT32 options
|
hw_draw.c
|
Hardware version of V_DrawConsoleFill .
| |
HWR_DrawPic
|
void | INT32 x ,INT32 y ,lumpnum_t flatlumpnum
|
hw_draw.c
|
Hardware version of V_DrawScaledPic .
| |
HWR_GetScreenshot
|
UINT8 *
|
none | hw_draw.c
|
Saves the screen to a buffer, and returns the buffer. Returns NULL if the buffer could not be made. Called by M_SaveFrame to save a frame for an APNG movie if using OpenGL.
| |
HWR_Screenshot
|
boolean | const char *pathname
|
hw_draw.c
|
Saves the screen to a buffer, and saves the buffer to a PNG file which is created in the chosen screenshot folder. pathname is the file name (including file path) to write the PNG to. Returns true if successful, returns false if the buffer could not be made or the PNG file could not be created. Called by M_DoScreenShot to take a screenshot if using OpenGL.
| |
HWR_AddCommands
|
void | none | hw_main.c
|
Registers OpenGL-exclusive console variables. | |
HWR_CorrectSWTricks
|
void | none | hw_trick.c
|
Corrects Software mode tricks in the current map to look okay in the OpenGL renderer, if gr_correcttricks is enabled. This function is only called during level setup.
| |
transform
|
void | float *cx ,float *cy ,float *cz
|
hw_main.c
|
||
HWR_TranstableToAlpha
|
FBITFIELD
|
INT32 transtablenum ,FSurfaceInfo *pSurf
|
hw_main.c
|
Converts a translucency map number (tr_trans10 through tr_trans90 ) to a byte alpha value, where 0 is invisible and 255 is opaque. This alpha is then applied to the surface info supplied. Returns PF_Translucent .
| |
HWR_SetPaletteColor
|
void | INT32 palcolor
|
hw_main.c
|
Sets a palette color, using an RGB color code. If non-zero, this palette color can then be used to tint the colors of drawn polygons by another color. (?) Note that this function is currently called only with the value 0 in SRB2's source code, so no palette color is ever set. | |
HWR_GetTextureUsed
|
INT32 | none | hw_main.c
|
||
HWR_DoPostProcessor
|
void | player_t *player
|
hw_main.c
|
||
HWR_StartScreenWipe
|
void | none | hw_main.c
|
||
HWR_EndScreenWipe
|
void | none | hw_main.c
|
||
HWR_DrawIntermissionBG
|
void | none | hw_main.c
|
||
HWR_DoWipe
|
void | UINT8 wipenum ,UINT8 scrnnum
|
hw_main.c
|
Hardware version of f_wipe.c 's F_DoWipe .
| |
HWR_MakeScreenFinalTexture
|
void | none | hw_main.c
|
||
HWR_DrawScreenFinalTexture
|
void | int width ,int height
|
hw_main.c
|
||
HWR_Lighting
|
UINT32 | INT32 light ,UINT32 color ,UINT32 fadecolor ,boolean fogblockpoly ,boolean plane
|
hw_main.c
|
Calculates and returns the needed lighting from the arguments given as an RGBA color code. (fogblockpoly is unused) | |
LightLevelToLum
|
UINT8 | INT32 l
|
hw_main.c
|
FUNCMATH
|
Externs
Data name | Data type | Non-extern location(s) | Description |
---|---|---|---|
granisotropicmode_cons_t[]
|
CV_PossibleValue_t
|
hw_main.c
|
Possible values for cv_granisotropicmode
|
cv_grdynamiclighting
|
consvar_t
|
../v_video.c
|
Declared only if ALAM_LIGHTING is defined
|
cv_grstaticlighting
|
consvar_t
|
../v_video.c
|
Declared only if ALAM_LIGHTING is defined
|
cv_grcoronas
|
consvar_t
|
../v_video.c
|
Declared only if ALAM_LIGHTING is defined
|
cv_grcoronasize
|
consvar_t
|
../v_video.c
|
Declared only if ALAM_LIGHTING is defined
|
cv_grfov
|
consvar_t
|
hw_main.c
|
gr_fov console variable struct
|
cv_grmd2
|
consvar_t
|
../v_video.c
|
gr_md2 console variable struct
|
cv_grfog
|
consvar_t
|
../v_video.c
|
gr_fog console variable struct
|
cv_grfogcolor
|
consvar_t
|
../v_video.c
|
gr_fogcolor console variable struct
|
cv_grfogdensity
|
consvar_t
|
hw_main.c
|
gr_fogdensity console variable struct
|
cv_grsoftwarefog
|
consvar_t
|
../v_video.c
|
gr_softwarefog console variable struct
|
cv_grgammared
|
consvar_t
|
../v_video.c
|
gr_gammared console variable struct
|
cv_grgammagreen
|
consvar_t
|
../v_video.c
|
gr_gammagreen console variable struct
|
cv_grgammablue
|
consvar_t
|
../v_video.c
|
gr_gammablue console variable struct
|
cv_grfiltermode
|
consvar_t
|
hw_main.c
|
gr_filtermode console variable struct
|
cv_granisotropicmode
|
consvar_t
|
hw_main.c
|
gr_anisotropicmode console variable struct
|
cv_grcorrecttricks
|
consvar_t
|
hw_main.c
|
gr_correcttricks console variable struct
|
cv_voodoocompatibility
|
consvar_t
|
../v_video.c
|
gr_voodoocompatibility console variable struct
|
cv_grfovchange
|
consvar_t
|
../v_video.c
|
gr_fovchange console variable struct
|
cv_grsolvetjoin
|
consvar_t
|
hw_main.c
|
gr_solvetjoin console variable struct
|
cv_grspritebillboarding
|
consvar_t
|
../v_video.c
|
gr_spritebillboarding console variable struct
|
gr_viewwidth gr_viewheight gr_baseviewwindowy
|
float
|
hw_main.c
|
gr_viewwidth : The width of the view window in the OpenGL renderer. In SRB2 this should always be vid.width converted to a float.
|
gr_viewwindowx gr_basewindowcentery
|
float
|
hw_main.c
|
gr_viewwindowx : The X screen coordinate of the view window's top left corner in the OpenGL renderer. In SRB2 this should always be 0; however, if gr_viewwidth and vid.width were not the same somehow, this would be (vid.width - gr_viewwidth) / 2 instead.
|
*hwbbox
|
fixed_t
|
hw_main.c
|
A pointer to the bbox of the current BSP node being rendered in HWR_RenderBSPNode . This is currently used only by HWR_PlaneLighting , if the macro ALAM_LIGHTING is defined.
|
atransform
|
FTransform
|
hw_main.c
|
Typedefs
Name | Type | Description |
---|---|---|
floorinfo_t
|
struct
|
Unused |
floorinfo_t
Data name | Data type | Description |
---|---|---|
floorVerts[4]
|
wallVert3D
|
|
Surf
|
FSurfaceInfo
|
|
texnum
|
INT32 | |
blend
|
INT32 | |
drawcount
|
INT32 |