From bf97377b9eec8216dd18a538033aaa780091ba2f Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Mon, 1 Aug 2011 21:48:03 +0000 Subject: * (bug 5003) Improve implementation of cg_DrawSides, which is currently unused (/dev/humancontroller) --- src/cgame/cg_drawtools.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cgame/cg_drawtools.c b/src/cgame/cg_drawtools.c index 3fb721a2..f35ed235 100644 --- a/src/cgame/cg_drawtools.c +++ b/src/cgame/cg_drawtools.c @@ -126,10 +126,14 @@ Coords are virtual 640x480 */ void CG_DrawSides( float x, float y, float w, float h, float size ) { + float sizeY; + CG_AdjustFrom640( &x, &y, &w, &h ); + sizeY = size * cgs.screenYScale; size *= cgs.screenXScale; - trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); - trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); + + trap_R_DrawStretchPic( x, y + sizeY, size, h - ( sizeY * 2.0f ), 0, 0, 0, 0, cgs.media.whiteShader ); + trap_R_DrawStretchPic( x + w - size, y + sizeY, size, h - ( sizeY * 2.0f ), 0, 0, 0, 0, cgs.media.whiteShader ); } void CG_DrawTopBottom( float x, float y, float w, float h, float size ) -- cgit