// in this example spr_cat has is 8 x 8 cat in a 32 x 32 sprite ( in pixels )
// the 8 x 8 portion of the cat will be stretched to fill in the empty pixels
var h = 32;
var w = 32;
draw_set_colour(c_white);
var tex = sprite_get_texture(spr_cat,0);
draw_primitive_begin_texture(pr_trianglestrip, tex);
draw_vertex_texture_colour(0, h, 0, 1,c_white,1);
draw_vertex_texture_colour(w, h, 1, 1,c_white,1);
draw_vertex_texture_colour(0, 0, 0, 0,c_white,1);
draw_vertex_texture_colour(w, 0, 1, 0,c_white,1);
draw_primitive_end();
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.