diff --git a/source/arm9/gl2d.c b/source/arm9/gl2d.c index 0450dcef..9495fcf7 100644 --- a/source/arm9/gl2d.c +++ b/source/arm9/gl2d.c @@ -546,12 +546,12 @@ void glSprite( int x, int y, int flipmode, const glImage *spr ) int x2 = x + spr->width; int y2 = y + spr->height; - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height); - + if ( spr->textureID != gCurrentTexture ) { @@ -591,7 +591,7 @@ void glSpriteScale( int x, int y, s32 scale, int flipmode, const glImage *spr ) int x2 = spr->width; int y2 = spr->height; - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width-1); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height-1); @@ -643,7 +643,7 @@ void glSpriteScaleXY( int x, int y, s32 scaleX, s32 scaleY, int flipmode, const int x2 = spr->width; int y2 = spr->height; - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width-1); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height-1); @@ -698,7 +698,7 @@ void glSpriteRotate( int x, int y, s32 angle, int flipmode, const glImage *spr ) int y2 = s_half_y; - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width-1); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height-1); @@ -755,7 +755,7 @@ void glSpriteRotateScale( int x, int y, s32 angle, s32 scale, int flipmode, cons int x2 = s_half_x; int y2 = s_half_y; - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width-1); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height-1); @@ -815,7 +815,7 @@ void glSpriteRotateScaleXY( int x, int y, s32 angle, s32 scaleX, s32 scaleY, int int x2 = s_half_x; int y2 = s_half_y; - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width-1); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height-1); @@ -967,7 +967,7 @@ void glSpriteOnQuad( int x1, int y1, ) { - int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); + int u1 = spr->u_off + (( flipmode & GL_FLIP_H ) ? spr->width-1 : 0); int u2 = spr->u_off + (( flipmode & GL_FLIP_H ) ? 0 : spr->width-1); int v1 = spr->v_off + (( flipmode & GL_FLIP_V ) ? spr->height-1 : 0); int v2 = spr->v_off + (( flipmode & GL_FLIP_V ) ? 0 : spr->height-1);