Skip to content

Instantly share code, notes, and snippets.

@Skylarity
Skylarity / draw_sprite_pos_fixed.gml
Created November 30, 2024 20:29
Updated version of `draw_sprite_pos_fixed` to work with modern GameMaker
function draw_pos_fixed(surface, top_left_x, top_left_y, top_right_x, top_right_y, bottom_right_x, bottom_right_y, bottom_left_x, bottom_left_y, colour, alpha) {
var cx, cy, s, t, q, v_buffer;
var texture = surface_get_texture(surface);
var uvs = texture_get_uvs(texture);
var ax = top_right_x - bottom_left_x;
var ay = top_right_y - bottom_left_y;
var bx = top_left_x - bottom_right_x;