From 4915376d9debe00084f449c65dced6cc3d937617 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 26 Oct 2007 11:44:28 +0000 Subject: [PATCH 1/1] fix the picture drawing fix git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7653 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_draw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.2