projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fc52ab8
)
fixed FIXME
author
Tobias Gläßer
<tobi.web@gmx.de>
Mon, 2 Feb 2004 17:25:15 +0000
(17:25 +0000)
committer
Tobias Gläßer
<tobi.web@gmx.de>
Mon, 2 Feb 2004 17:25:15 +0000
(17:25 +0000)
SVN-Revision: 113
src/texture.c
patch
|
blob
|
history
diff --git
a/src/texture.c
b/src/texture.c
index
62171f9
..
303e7d8
100644
(file)
--- 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)
{
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);
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));
glBegin(GL_QUADS);
glTexCoord2f(sx / (float)power_of_two(ptexture->w), sy / (float)power_of_two(ptexture->h));
- glVertex2f(
sx, s
y);
+ glVertex2f(
x,
y);
glTexCoord2f((float)(sx + w) / (float)power_of_two(ptexture->w), sy / (float)power_of_two(ptexture->h));
glTexCoord2f((float)(sx + w) / (float)power_of_two(ptexture->w), sy / (float)power_of_two(ptexture->h));
- glVertex2f(w+
sx, s
y);
+ glVertex2f(w+
x,
y);
glTexCoord2f((sx+w) / (float)power_of_two(ptexture->w), (sy+h) / (float)power_of_two(ptexture->h));
glTexCoord2f((sx+w) / (float)power_of_two(ptexture->w), (sy+h) / (float)power_of_two(ptexture->h));
- glVertex2f(w +
sx, h+s
y);
+ glVertex2f(w +
x, h+
y);
glTexCoord2f(sx / (float)power_of_two(ptexture->w), (float)(sy+h) / (float)power_of_two(ptexture->h));
glTexCoord2f(sx / (float)power_of_two(ptexture->w), (float)(sy+h) / (float)power_of_two(ptexture->h));
- glVertex2f(
sx, h+s
y);
+ glVertex2f(
x, h+
y);
glEnd();
glDisable(GL_BLEND);
glEnd();
glDisable(GL_BLEND);