/* ============= CG_TileClearBox This repeats a 64*64 tile graphic to fill the screen around a sized down refresh window. ============= */ static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShader ) { float s1, t1, s2, t2; s1 = x/64.0; t1 = y/64.0; s2 = (x+w)/64.0; t2 = (y+h)/64.0; cgi_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, hShader ); }
/* =============== CG_DrawChar Coordinates and size in 640*480 virtual screen size =============== */ void CG_DrawChar( int x, int y, int width, int height, int ch ) { int row, col; float frow, fcol; float size; float ax, ay, aw, ah; ch &= 255; if ( ch == ' ' ) { return; } ax = x; ay = y; aw = width; ah = height; row = ch>>4; col = ch&15; /* frow = row*0.0625; fcol = col*0.0625; size = 0.0625; cgi_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size, cgs.media.charsetShader ); */ float size2; frow = row*0.0625; fcol = col*0.0625; size = 0.03125; size2 = 0.0625; cgi_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size2, cgs.media.charsetShader ); }
/* ================ CG_DrawPic2 Coordinates are 640*480 virtual values A width of 0 will draw with the original image width Can also specify the exact texture coordinates ================= */ void CG_DrawPic2( float x, float y, float width, float height, float s1, float t1, float s2, float t2, qhandle_t hShader ) { cgi_R_DrawStretchPic( x, y, width, height, s1, t1, s2, t2, hShader ); }
/* ================ CG_DrawPic Coordinates are 640*480 virtual values A width of 0 will draw with the original image width ================= */ void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ) { cgi_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); }
/* ================ CG_FillRect Coordinates are 640*480 virtual values ================= */ void CG_FillRect( float x, float y, float width, float height, const float *color ) { cgi_R_SetColor( color ); cgi_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); cgi_R_SetColor( NULL ); }
void CG_DrawTopBottom(float x, float y, float w, float h, float size) { //size *= cgs.screenYScale; cgi_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); cgi_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); }
/* ================ CG_DrawSides Coords are virtual 640x480 ================ */ void CG_DrawSides(float x, float y, float w, float h, float size) { //size *= cgs.screenXScale; cgi_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); cgi_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); }