From: divverent Date: Fri, 26 Oct 2007 11:44:28 +0000 (+0000) Subject: fix the picture drawing fix X-Git-Tag: xonotic-v0.1.0preview~2828 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4915376d9debe00084f449c65dced6cc3d937617;p=xonotic%2Fdarkplaces.git fix the picture drawing fix git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7653 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_draw.c b/gl_draw.c index b6d8d065..6eb9378f 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -599,8 +599,8 @@ void DrawQ_Pic(float x, float y, cachepic_t *pic, float width, float height, flo // AK07: lets be texel correct on the corners { - float horz_offset = 0.5f / width; - float vert_offset = 0.5f / height; + float horz_offset = 0.5f / pic->width; + float vert_offset = 0.5f / pic->height; floats[12] = 0.0f + horz_offset;floats[13] = 0.0f + vert_offset; floats[14] = 1.0f - horz_offset;floats[15] = 0.0f + vert_offset; @@ -855,8 +855,8 @@ void DrawQ_SuperPic(float x, float y, cachepic_t *pic, float width, float height // AK07: lets be texel correct on the corners { - float horz_offset = 0.5f / width; - float vert_offset = 0.5f / height; + float horz_offset = 0.5f / pic->width; + float vert_offset = 0.5f / pic->height; floats[12] = s1 + horz_offset;floats[13] = t1 + vert_offset; floats[14] = s2 - horz_offset;floats[15] = t2 + vert_offset;