diff options
Diffstat (limited to 'src/gl_local.h')
-rw-r--r-- | src/gl_local.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/src/gl_local.h b/src/gl_local.h index 51b4f2d..7c8b722 100644 --- a/src/gl_local.h +++ b/src/gl_local.h @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* * gl_main.c - * + * */ #define MAX_TMUS 2 @@ -55,8 +55,8 @@ typedef struct { float entity_modulate; float inverse_intensity; float sintab[256]; -#define TAB_SIN(x) gl_static.sintab[(x)&255] -#define TAB_COS(x) gl_static.sintab[((x)+64)&255] +#define TAB_SIN(x) gl_static.sintab[(x) & 255] +#define TAB_COS(x) gl_static.sintab[((x) + 64) & 255] byte latlngtab[NUMVERTEXNORMALS][2]; byte lightstylemap[MAX_LIGHTSTYLES]; } glStatic_t; @@ -168,21 +168,21 @@ typedef enum { CULL_CLIP } glCullResult_t; -glCullResult_t GL_CullBox( vec3_t bounds[2] ); -glCullResult_t GL_CullSphere( const vec3_t origin, float radius ); -glCullResult_t GL_CullLocalBox( const vec3_t origin, vec3_t bounds[2] ); +glCullResult_t GL_CullBox(vec3_t bounds[2]); +glCullResult_t GL_CullSphere(const vec3_t origin, float radius); +glCullResult_t GL_CullLocalBox(const vec3_t origin, vec3_t bounds[2]); -//void GL_DrawBox( const vec3_t origin, vec3_t bounds[2] ); +//void GL_DrawBox(const vec3_t origin, vec3_t bounds[2]); -qboolean GL_AllocBlock( int width, int height, int *inuse, - int w, int h, int *s, int *t ); +qboolean GL_AllocBlock(int width, int height, int *inuse, + int w, int h, int *s, int *t); -void GL_ClearErrors( void ); -qboolean GL_ShowErrors( const char *func ); +void GL_ClearErrors(void); +qboolean GL_ShowErrors(const char *func); /* * gl_model.c - * + * */ typedef struct maliastc_s { @@ -218,11 +218,11 @@ typedef struct maliasmesh_s { /* * gl_surf.c - * + * */ #define DLIGHT_CUTOFF 64 -#define LIGHT_STYLE(surf,i) \ +#define LIGHT_STYLE(surf, i) \ &glr.fd.lightstyles[gl_static.lightstylemap[(surf)->styles[i]]] #define LM_MAX_LIGHTMAPS 32 @@ -240,15 +240,15 @@ typedef struct { extern lightmap_builder_t lm; -void GL_AdjustColor( vec3_t color ); -void GL_BeginLights( void ); -void GL_EndLights( void ); -void GL_PushLights( mface_t *surf ); +void GL_AdjustColor(vec3_t color); +void GL_BeginLights(void); +void GL_EndLights(void); +void GL_PushLights(mface_t *surf); -void LM_RebuildSurfaces( void ); +void LM_RebuildSurfaces(void); -void GL_LoadWorld( const char *name ); -void GL_FreeWorld( void ); +void GL_LoadWorld(const char *name); +void GL_FreeWorld(void); /* * gl_state.c @@ -262,15 +262,15 @@ typedef enum { typedef enum { GLS_DEFAULT = 0, - GLS_DEPTHMASK_FALSE = ( 1 << 0 ), - GLS_DEPTHTEST_DISABLE = ( 1 << 1 ), - GLS_BLEND_BLEND = ( 1 << 2 ), - GLS_BLEND_ADD = ( 1 << 3 ), - GLS_BLEND_MODULATE = ( 1 << 4 ), - GLS_ALPHATEST_ENABLE = ( 1 << 5 ) + GLS_DEPTHMASK_FALSE = (1 << 0), + GLS_DEPTHTEST_DISABLE = (1 << 1), + GLS_BLEND_BLEND = (1 << 2), + GLS_BLEND_ADD = (1 << 3), + GLS_BLEND_MODULATE = (1 << 4), + GLS_ALPHATEST_ENABLE = (1 << 5) } glStateBits_t; -#define GLS_BLEND_MASK (GLS_BLEND_BLEND|GLS_BLEND_ADD|GLS_BLEND_MODULATE) +#define GLS_BLEND_MASK (GLS_BLEND_BLEND | GLS_BLEND_ADD | GLS_BLEND_MODULATE) typedef struct { int tmu; @@ -283,21 +283,21 @@ typedef struct { extern glState_t gls; -void GL_BindTexture( int texnum ); -void GL_SelectTMU( int tmu ); -void GL_TexEnv( GLenum texenv ); -void GL_CullFace( glCullFace_t cull ); -void GL_Bits( glStateBits_t bits ); -void GL_Setup2D( void ); -void GL_Setup3D( void ); +void GL_BindTexture(int texnum); +void GL_SelectTMU(int tmu); +void GL_TexEnv(GLenum texenv); +void GL_CullFace(glCullFace_t cull); +void GL_Bits(glStateBits_t bits); +void GL_Setup2D(void); +void GL_Setup3D(void); -void GL_SetDefaultState( void ); -void GL_InitPrograms( void ); -void GL_ShutdownPrograms( void ); -void GL_EnableWarp( void ); -void GL_DisableWarp( void ); -void GL_EnableOutlines( void ); -void GL_DisableOutlines( void ); +void GL_SetDefaultState(void); +void GL_InitPrograms(void); +void GL_ShutdownPrograms(void); +void GL_EnableWarp(void); +void GL_DisableWarp(void); +void GL_EnableOutlines(void); +void GL_DisableOutlines(void); /* @@ -313,13 +313,13 @@ typedef struct { extern drawStatic_t draw; #ifdef _DEBUG -void Draw_Stringf( int x, int y, const char *fmt, ... ); -void Draw_Stats( void ); -void Draw_Lightmaps( void ); -void Draw_Scrap( void ); +void Draw_Stringf(int x, int y, const char *fmt, ...); +void Draw_Stats(void); +void Draw_Lightmaps(void); +void Draw_Scrap(void); #endif -void GL_Blend( void ); +void GL_Blend(void); /* @@ -327,7 +327,7 @@ void GL_Blend( void ); * */ -#define LUMINANCE(r,g,b) ((r)*0.2126f + (g)*0.7152f + (b)*0.0722f) +#define LUMINANCE(r, g, b) ((r) * 0.2126f + (g) * 0.7152f + (b) * 0.0722f) // auto textures enum { @@ -340,20 +340,20 @@ enum { TEXNUM_LIGHTMAP // must be the last one }; -#define NUM_TEXNUMS (TEXNUM_LIGHTMAP+LM_MAX_LIGHTMAPS-TEXNUM_DEFAULT) +#define NUM_TEXNUMS (TEXNUM_LIGHTMAP + LM_MAX_LIGHTMAPS - TEXNUM_DEFAULT) extern mtexinfo_t *upload_texinfo; -void Scrap_Upload( void ); +void Scrap_Upload(void); -void GL_InitImages( void ); -void GL_ShutdownImages( void ); +void GL_InitImages(void); +void GL_ShutdownImages(void); -void GL_UpdateGammaTable( qboolean realTime ); +void GL_UpdateGammaTable(qboolean realTime); -image_t *R_ImageForHandle( qhandle_t hPic ); -qhandle_t R_RegisterSkin( const char *name ); -qhandle_t R_RegisterPic( const char *name ); +image_t *R_ImageForHandle(qhandle_t hPic); +qhandle_t R_RegisterSkin(const char *name); +qhandle_t R_RegisterPic(const char *name); /* @@ -361,13 +361,13 @@ qhandle_t R_RegisterPic( const char *name ); * */ #define TESS_MAX_FACES 256 -#define TESS_MAX_VERTICES ( 16 * TESS_MAX_FACES ) -#define TESS_MAX_INDICES ( 3 * TESS_MAX_VERTICES ) +#define TESS_MAX_VERTICES (16 * TESS_MAX_FACES) +#define TESS_MAX_INDICES (3 * TESS_MAX_VERTICES) typedef struct { vec_t vertices[VERTEX_SIZE*TESS_MAX_VERTICES]; int indices[TESS_MAX_INDICES]; - byte colors[4*TESS_MAX_VERTICES]; + byte colors[4 * TESS_MAX_VERTICES]; int texnum[MAX_TMUS]; int numverts; int numindices; @@ -376,35 +376,35 @@ typedef struct { extern tesselator_t tess; -void GL_Flush2D( void ); -void GL_DrawParticles( void ); -void GL_DrawBeams( void ); +void GL_Flush2D(void); +void GL_DrawParticles(void); +void GL_DrawBeams(void); -void GL_AddAlphaFace( mface_t *face ); -void GL_AddSolidFace( mface_t *face ); -void GL_DrawAlphaFaces( void ); -void GL_DrawSolidFaces( void ); +void GL_AddAlphaFace(mface_t *face); +void GL_AddSolidFace(mface_t *face); +void GL_DrawAlphaFaces(void); +void GL_DrawSolidFaces(void); /* * gl_world.c * */ -void GL_DrawBspModel( mmodel_t *model ); -void GL_DrawWorld( void ); -void _R_LightPoint( vec3_t origin, vec3_t color ); +void GL_DrawBspModel(mmodel_t *model); +void GL_DrawWorld(void); +void _R_LightPoint(vec3_t origin, vec3_t color); /* * gl_sky.c * */ -void R_AddSkySurface( mface_t *surf ); -void R_ClearSkyBox( void ); -void R_DrawSkyBox( void ); -void R_SetSky( const char *name, float rotate, vec3_t axis ); +void R_AddSkySurface(mface_t *surf); +void R_ClearSkyBox(void); +void R_DrawSkyBox(void); +void R_SetSky(const char *name, float rotate, vec3_t axis); /* * gl_mesh.c * */ -void GL_DrawAliasModel( model_t *model ); +void GL_DrawAliasModel(model_t *model); |