icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
143 #define STRINGER(x) "x"
210 for (m=0 ; m<4 ; m++)
213 for (
y=0 ;
y< (16>>m) ;
y++)
214 for (
x=0 ;
x< (16>>m) ;
x++)
216 if ( (
y< (8>>m) ) ^ (
x< (8>>m) ) )
235 for (
i=0 ;
i<1280 ;
i++)
300 int R_Init(
void *hInstance,
void *wndProc )
330 if (
SWimp_Init( hInstance, wndProc ) ==
false)
468 if (vis[cluster>>3] & (1<<(cluster&7)))
484 if (vis[
i>>3] & (1<<(
i&7)))
516 qboolean translucent_entities =
false;
528 translucent_entities =
true;
567 if ( !translucent_entities )
621 int i, *pindex, clipflags;
622 vec3_t acceptpt, rejectpt;
627 for (
i=0 ;
i<4 ;
i++)
635 rejectpt[0] = minmaxs[pindex[0]];
636 rejectpt[1] = minmaxs[pindex[1]];
637 rejectpt[2] = minmaxs[pindex[2]];
645 acceptpt[0] = minmaxs[pindex[3+0]];
646 acceptpt[1] = minmaxs[pindex[3+1]];
647 acceptpt[2] = minmaxs[pindex[3+2]];
688 splitplane = node->
plane;
716 if (!angles[0] && !angles[1] && !angles[2])
723 for (
i=0 ;
i<3 ;
i++)
731 for (
i = 0;
i < 8;
i++ )
753 for (
j=0 ;
j<3 ;
j++)
922 byte palette[256][4], *in, *out;
924 float alpha, one_minus_alpha;
948 one_minus_alpha = (1.0 -
alpha);
952 for (
i=0 ;
i<256 ;
i++, in+=4, out+=4)
954 for (
j=0 ;
j<3 ;
j++)
956 v = premult[
j] + one_minus_alpha * in[
j];
1094 void SetStereoBuffer(
int buf);
1103 SetStereoBuffer((camera_separation <= 0.0) ? 0 : 1);
1164 for (
i = 0;
i < 256;
i++ )
1179 byte palette32[1024];
1188 for (
j=0 ;
j<
w ;
j++)
1196 for (
i = 0;
i < 256;
i++ )
1198 palette32[
i*4+0] = palette[
i*3+0];
1199 palette32[
i*4+1] = palette[
i*3+1];
1200 palette32[
i*4+2] = palette[
i*3+2];
1201 palette32[
i*4+3] = 0xFF;
1226 for (
i=0 ;
i<256 ;
i++)
1231 for (
i=0 ;
i<256 ;
i++)
1233 inf = 255 * pow ( (
i+0.5)/255.5 , g ) + 0.5;
1247 #define NUM_BEAM_SEGS 6
1252 vec3_t direction, normalized_direction;
1254 vec3_t oldorigin, origin;
1260 origin[0] = e->
origin[0];
1261 origin[1] = e->
origin[1];
1262 origin[2] = e->
origin[2];
1264 normalized_direction[0] = direction[0] = oldorigin[0] - origin[0];
1265 normalized_direction[1] = direction[1] = oldorigin[1] - origin[1];
1266 normalized_direction[2] = direction[2] = oldorigin[2] - origin[2];
1277 VectorAdd( start_points[
i], origin, start_points[
i] );
1278 VectorAdd( start_points[
i], direction, end_points[
i] );
1301 char *
suf[6] = {
"rt",
"bk",
"lf",
"ft",
"up",
"dn"};
1313 for (
i=0 ;
i<6 ;
i++)
1339 for (
i=0 ;
i<256 ;
i++, out+=4)
1382 re.DrawScaledPic = Draw_ScaledPic;
1383 re.AddStain = R_AddStain;
1409 #ifndef REF_HARD_LINKED
1416 va_start (argptr, error);
1417 vsprintf (text, error, argptr);
1428 va_start (argptr, fmt);
1429 vsprintf (text, fmt, argptr);
1441 void Draw_ScaledPic (
int x,
int y,
float scale,
float alpha,
char *pic) {
mvertex_t * r_pcurrentvertbase
struct image_s *(* RegisterSkin)(char *name)
refexport_t GetRefAPI(refimport_t rimp)
mtexinfo_t r_skytexinfo[6]
void(* Cmd_RemoveCommand)(char *name)
cvar_t * sw_reportedgeout
void R_BeginEdgeFrame(void)
void R_DrawBeam(entity_t *e)
#define VectorSubtract(a, b, c)
void R_ShutdownImages(void)
void R_BeginRegistration(char *map)
int R_BmodelCheckBBox(float *minmaxs)
cvar_t * sw_reportsurfout
void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
void R_ScreenShot_f(void)
#define BOX_ON_PLANE_SIDE(emins, emaxs, p)
void R_PushDlights(model_t *model)
void Draw_StretchRaw(int x, int y, int w, int h, int cols, int rows, byte *data)
void R_SurfacePatch(void)
#define BMODEL_FULLY_CLIPPED
void R_SetSky(char *name, float rotate, vec3_t axis)
void(* DrawStretchRaw)(int x, int y, int w, int h, int cols, int rows, byte *data)
int(* Init)(void *hinstance, void *wndproc)
void R_InitGraphics(int width, int height)
unsigned d_8to24table[256]
struct image_s *(* RegisterPic)(char *name)
void(* DrawFill)(int x, int y, int w, int h, int c)
void R_LightPoint(vec3_t p, vec3_t color)
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
cvar_t * sw_surfcacheoverride
image_t * R_FindImage(char *name, imagetype_t type)
void SWimp_AppActivate(qboolean active)
void SWimp_Shutdown(void)
byte r_notexture_buffer[1024]
struct mnode_s * children[2]
void R_DrawSolidClippedSubmodelPolygons(model_t *pmodel, mnode_t *topnode)
void(* AppActivate)(qboolean activate)
image_t * r_notexture_mip
void(* EndRegistration)(void)
void SWimp_SetPalette(const unsigned char *palette)
void Draw_GetPalette(void)
int r_frustum_indexes[4 *6]
int R_Init(void *hInstance, void *wndProc)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void(* Con_Printf)(int print_level, char *str,...)
void R_SetLightLevel(void)
void(* DrawFadeScreen)(void)
void RotatedBBox(vec3_t mins, vec3_t maxs, vec3_t angles, vec3_t tmins, vec3_t tmaxs)
void Draw_FadeScreen(void)
void R_DrawEntitiesOnList(void)
void SWimp_EndFrame(void)
void Draw_InitLocal(void)
void R_InitTextures(void)
void(* Cmd_AddCommand)(char *name, void(*cmd)(void))
float verticalFieldOfView
void R_GammaCorrectAndSetPalette(const unsigned char *palette)
void PerpendicularVector(vec3_t dst, const vec3_t src)
void R_RotateBmodel(void)
void R_DrawParticles(void)
void(* Sys_Error)(int err_level, char *str,...)
void R_PrintAliasStats(void)
void Draw_TileClear(int x, int y, int w, int h, char *name)
vec_t VectorNormalize(vec3_t v)
void(* DrawGetPicSize)(int *w, int *h, char *name)
void(* CinematicSetPalette)(const unsigned char *palette)
rserr_t SWimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
void R_DrawNullModel(void)
void(* DrawPic)(int x, int y, char *name)
GLfloat GLfloat GLfloat alpha
void R_CinematicSetPalette(const unsigned char *palette)
struct model_s *(* RegisterModel)(char *name)
void(* BeginRegistration)(char *map)
#define VectorAdd(a, b, c)
void R_RenderFrame(refdef_t *fd)
int * pfrustum_indexes[4]
struct model_s * R_RegisterModel(char *name)
void R_IMFlatShadedQuad(vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha)
mnode_t * R_FindTopnode(vec3_t mins, vec3_t maxs)
void Draw_BuildGammaTable(void)
void(* BeginFrame)(float camera_separation)
void R_EdgeCodeStart(void)
void(* SetSky)(char *name, float rotate, vec3_t axis)
void R_EndRegistration(void)
void Draw_GetPicSize(int *w, int *h, char *pic)
int SWimp_Init(void *hInstance, void *wndProc)
clipplane_t view_clipplanes[4]
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
void(* DrawStretchPic)(int x, int y, int w, int h, char *name)
void Draw_Pic(int x, int y, char *name)
void R_AliasDrawModel(void)
void R_TransformFrustum(void)
void(* DrawTileClear)(int x, int y, int w, int h, char *name)
void(* DrawChar)(int x, int y, int c)
void R_PrintDSpeeds(void)
void R_DrawAlphaSurfaces(void)
image_t * Draw_FindPic(char *name)
byte r_warpbuffer[WARP_WIDTH *WARP_HEIGHT]
GLdouble GLdouble GLdouble w
void R_DrawBEntitiesOnList(void)
void R_DrawSubmodelPolygons(model_t *pmodel, int clipflags, mnode_t *topnode)
void(* Cvar_SetValue)(char *name, float value)
int Sys_Milliseconds(void)
void Draw_StretchPic(int x, int y, int w, int h, char *name)
void Sys_Error(char *error,...)
byte currentpalette[1024]
void Mod_Modellist_f(void)
void R_BeginFrame(float camera_separation)
byte * Mod_ClusterPVS(int cluster, model_t *model)
@ rserr_invalid_fullscreen
struct image_s * R_RegisterSkin(char *name)
void Com_Printf(char *fmt,...)
void Com_sprintf(char *dest, int size, char *fmt,...)
void(* RenderFrame)(refdef_t *fd)
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees)