Do I have mushy brain syndrome? I'm trying to draw a sprite from inside a texture page but the UV's seem to be way off. It draws a distorted image from a different part of the texture page.
The code is very simple so I'm really lost at what I'm doing wrong. Any help would be greatly appreciated. (Generous upvotes if that is any incentive to help.)
ww = sprite_get_width(_sprite); hh = sprite_get_height(_sprite); _texture = sprite_get_texture(_sprite,0); uvs = sprite_get_uvs(_sprite,0); _l = uvs; //left _t = uvs; //top _r = uvs; //right _b = uvs; //bottom draw_set_color(c_white); draw_primitive_begin_texture(pr_trianglelist,_texture) draw_vertex_texture(xx,yy,_l,_t); draw_vertex_texture(xx+ww,yy,_r,_t); draw_vertex_texture(xx+ww,yy+hh,_r,_b); draw_vertex_texture(xx+ww,yy+hh,_r,_b); draw_vertex_texture(xx,yy+hh,_l,_b); draw_vertex_texture(xx,yy,_l,_t); draw_primitive_end();