Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_draw_sprite_center_pivot

(view raw script w/o annotations or w/e)
1
function draw_sprite_center_pivot(arg0, arg1, arg2, arg3)
2
{
3
    var __theta = point_direction(sprite_width / 2, sprite_height / 2, 0, 0);
4
    var __radius = point_distance(sprite_width / 2, sprite_height / 2, 0, 0);
5
    __theta += image_angle;
6
    var __xx = arg2 + (sprite_width / 2) + lengthdir_x(__radius, __theta);
7
    var __yy = arg3 + (sprite_height / 2) + lengthdir_y(__radius, __theta);
8
    draw_sprite_ext(arg0, arg1, __xx, __yy, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
9
}