From: Tobias Gläßer Date: Mon, 2 Feb 2004 17:25:15 +0000 (+0000) Subject: fixed FIXME X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f2a7b1f062d0630dabe9d6400829dad04d371843;p=supertux.git fixed FIXME SVN-Revision: 113 --- diff --git a/src/texture.c b/src/texture.c index 62171f9a4..303e7d839 100644 --- a/src/texture.c +++ b/src/texture.c @@ -174,7 +174,6 @@ void texture_draw_bg_gl(texture_type* ptexture, int update) void texture_draw_part_gl(texture_type* ptexture,float sx, float sy, float x, float y, float w, float h, int update) { -/*FIXME: The texture isn't drawn to the correct x,y positions.*/ glBindTexture(GL_TEXTURE_2D, ptexture->gl_texture); @@ -188,13 +187,13 @@ void texture_draw_part_gl(texture_type* ptexture,float sx, float sy, float x, fl glBegin(GL_QUADS); glTexCoord2f(sx / (float)power_of_two(ptexture->w), sy / (float)power_of_two(ptexture->h)); - glVertex2f(sx, sy); + glVertex2f(x, y); glTexCoord2f((float)(sx + w) / (float)power_of_two(ptexture->w), sy / (float)power_of_two(ptexture->h)); - glVertex2f(w+sx, sy); + glVertex2f(w+x, y); glTexCoord2f((sx+w) / (float)power_of_two(ptexture->w), (sy+h) / (float)power_of_two(ptexture->h)); - glVertex2f(w +sx, h+sy); + glVertex2f(w +x, h+y); glTexCoord2f(sx / (float)power_of_two(ptexture->w), (float)(sy+h) / (float)power_of_two(ptexture->h)); - glVertex2f(sx, h+sy); + glVertex2f(x, h+y); glEnd(); glDisable(GL_BLEND);