#include "r_local.h"
Go to the source code of this file.
Functions | |
void | R_DrawSurfaceBlock8_mip0 (void) |
void | R_DrawSurfaceBlock8_mip1 (void) |
void | R_DrawSurfaceBlock8_mip2 (void) |
void | R_DrawSurfaceBlock8_mip3 (void) |
static void | R_DrawSurfaceBlock8RGBX_mip0 (void) |
static void | R_DrawSurfaceBlock8RGBX_mip1 (void) |
static void | R_DrawSurfaceBlock8RGBX_mip2 (void) |
static void | R_DrawSurfaceBlock8RGBX_mip3 (void) |
void | R_BuildLightMap (void) |
image_t * | R_TextureAnimation (mtexinfo_t *tex) |
void | R_DrawSurface (void) |
void | R_InitCaches (void) |
void | D_FlushCaches (void) |
surfcache_t * | D_SCAlloc (int width, int size) |
void | D_SCDump (void) |
int | MaskForNum (int num) |
int | D_log2 (int num) |
void | R_BuildLightMapRGB (void) |
surfcache_t * | D_CacheSurface (msurface_t *surface, int miplevel) |
Variables | |
drawsurf_t | r_drawsurf |
int | lightleft |
int | sourcesstep |
int | blocksize |
int | sourcetstep |
int | lightdelta |
int | lightdeltastep |
int | lightright |
int | lightleftstep |
int | lightrightstep |
int | blockdivshift |
unsigned | blockdivmask |
void * | prowdestbase |
unsigned char * | pbasesource |
int | surfrowbytes |
int * | r_lightptr |
int | r_stepback |
int | r_lightwidth |
int | r_numhblocks |
int | r_numvblocks |
unsigned char * | r_source |
unsigned char * | r_sourcemax |
static void(* | surfmiptable [4])(void) |
int | lightlefta [3] |
int | lightrighta [3] |
int | lightleftstepa [3] |
int | lightrightstepa [3] |
static void(* | surfmiptable8RGB [4])(void) |
byte | palmap2 [64][64][64] |
unsigned | blocklights [18 *18 *3] |
float | surfscale |
qboolean | r_cache_thrash |
int | sc_size |
surfcache_t * | sc_rover |
surfcache_t * | sc_base |
#define FinishLightDelta | ( | ) | { psource += sourcetstep; lightrighta[0] += lightrightstepa[0];lightlefta[0] += lightleftstepa[0];lightdelta[0] += lightdeltastep[0]; lightrighta[1] += lightrightstepa[1];lightlefta[1] += lightleftstepa[1];lightdelta[1] += lightdeltastep[1]; lightrighta[2] += lightrightstepa[2];lightlefta[2] += lightleftstepa[2];lightdelta[2] += lightdeltastep[2]; prowdest += surfrowbytes;} |
#define MakeLightDelta | ( | ) | { light[0] = lightrighta[0]; light[1] = lightrighta[1]; light[2] = lightrighta[2];}; |
#define Mip0Stuff | ( | i | ) | { MakeLightDelta(); i(15); PushLightDelta(); i(14); PushLightDelta(); PushLightDelta(); i(13); PushLightDelta(); i(12); PushLightDelta(); i(11); PushLightDelta(); i(10); PushLightDelta(); i(9); PushLightDelta(); i(8); PushLightDelta(); i(7); PushLightDelta(); i(6); PushLightDelta(); i(5); PushLightDelta(); i(4); PushLightDelta(); i(3); PushLightDelta(); i(2); PushLightDelta(); i(1); PushLightDelta(); i(0); FinishLightDelta();} |
#define Mip1Stuff | ( | i | ) | { MakeLightDelta(); i(7); PushLightDelta(); i(6); PushLightDelta(); i(5); PushLightDelta(); i(4); PushLightDelta(); i(3); PushLightDelta(); i(2); PushLightDelta(); i(1); PushLightDelta(); i(0); FinishLightDelta();} |
#define Mip2Stuff | ( | i | ) | { MakeLightDelta();i(3); PushLightDelta(); i(2); PushLightDelta(); i(1); PushLightDelta(); i(0); FinishLightDelta();} |
#define Mip3Stuff | ( | i | ) | { MakeLightDelta(); i(1); PushLightDelta(); i(0); FinishLightDelta();} |
#define MIP8RGBX | ( | i | ) |
#define PushLightDelta | ( | ) | { light[0] += lightdelta[0]; light[1] += lightdelta[1]; light[2] += lightdelta[2]; }; |
surfcache_t* D_CacheSurface | ( | msurface_t * | surface, |
int | miplevel | ||
) |
Definition at line 638 of file r_surf.c.
Referenced by D_SolidSurf(), and R_BuildPolygonFromSurface().
Definition at line 481 of file r_surf.c.
Referenced by R_BeginRegistration(), R_InitGraphics(), R_SetupFrame(), and R_Shutdown().
surfcache_t* D_SCAlloc | ( | int | width, |
int | size | ||
) |
Definition at line 732 of file r_light.c.
Referenced by D_CacheSurface().
image_t* R_TextureAnimation | ( | mtexinfo_t * | tex | ) |
unsigned blockdivmask |
Definition at line 29 of file r_surf.c.
Referenced by R_DrawSurface().
int blockdivshift |
Definition at line 28 of file r_surf.c.
Referenced by R_DrawSurface().
unsigned blocklights[18 *18 *3] |
Definition at line 444 of file r_light.c.
Referenced by R_AddDynamicLights(), R_AddDynamicLightsRGB(), R_BuildLightMap(), R_BuildLightMapRGB(), and R_DrawSurface().
int blocksize |
Definition at line 26 of file r_surf.c.
Referenced by R_DrawSurface().
int lightdelta |
Definition at line 27 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int lightdeltastep |
Definition at line 27 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int lightleft |
Definition at line 26 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), and R_DrawSurfaceBlock8_mip3().
int lightlefta[3] |
Definition at line 59 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int lightleftstep |
Definition at line 28 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), and R_DrawSurfaceBlock8_mip3().
int lightleftstepa[3] |
Definition at line 61 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int lightright |
Definition at line 28 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), and R_DrawSurfaceBlock8_mip3().
int lightrighta[3] |
Definition at line 61 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int lightrightstep |
Definition at line 28 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), and R_DrawSurfaceBlock8_mip3().
int lightrightstepa[3] |
Definition at line 61 of file r_surf.c.
Referenced by R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
byte palmap2[64][64][64] |
Definition at line 91 of file r_draw.c.
Referenced by Draw_InitRGBMap(), FindColor(), and R_PolysetDrawSpans8_Opaque_Coloured().
unsigned char* pbasesource |
Definition at line 31 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
void* prowdestbase |
Definition at line 30 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
qboolean r_cache_thrash |
Definition at line 110 of file r_surf.c.
Referenced by D_SCAlloc().
drawsurf_t r_drawsurf |
Definition at line 24 of file r_surf.c.
Referenced by D_CacheSurface(), R_AddDynamicLights(), R_AddDynamicLightsRGB(), R_BuildLightMap(), R_BuildLightMapRGB(), and R_DrawSurface().
int* r_lightptr |
Definition at line 34 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int r_lightwidth |
Definition at line 36 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int r_numhblocks |
Definition at line 37 of file r_surf.c.
Referenced by R_DrawSurface().
int r_numvblocks |
Definition at line 37 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
unsigned char* r_source |
Definition at line 38 of file r_surf.c.
Referenced by R_DrawSurface().
unsigned char * r_sourcemax |
Definition at line 38 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
int r_stepback |
Definition at line 35 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), R_DrawSurfaceBlock8_mip3(), R_DrawSurfaceBlock8RGBX_mip0(), R_DrawSurfaceBlock8RGBX_mip1(), R_DrawSurfaceBlock8RGBX_mip2(), and R_DrawSurfaceBlock8RGBX_mip3().
surfcache_t * sc_base |
Definition at line 113 of file r_surf.c.
Referenced by D_FlushCaches(), D_SCAlloc(), D_SCDump(), and R_InitCaches().
surfcache_t* sc_rover |
Definition at line 113 of file r_surf.c.
Referenced by D_FlushCaches(), D_SCAlloc(), D_SCDump(), R_InitCaches(), and R_SetupFrame().
int sc_size |
Definition at line 112 of file r_surf.c.
Referenced by D_FlushCaches(), D_SCAlloc(), and R_InitCaches().
int sourcetstep |
Definition at line 26 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), and R_DrawSurfaceBlock8_mip3().
int surfrowbytes |
Definition at line 32 of file r_surf.c.
Referenced by R_DrawSurface(), R_DrawSurfaceBlock8_mip0(), R_DrawSurfaceBlock8_mip1(), R_DrawSurfaceBlock8_mip2(), and R_DrawSurfaceBlock8_mip3().
float surfscale |
Definition at line 109 of file r_surf.c.
Referenced by D_CacheSurface().