Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_thrash_missiles_Draw_0

(view raw script w/o annotations or w/e)
1
if (vspeed <= 0)
2
{
3
    
scr_drawpart_crop
scr_drawpart_crop

function
scr_drawpart_crop(arg0, arg1, arg2, arg3)
{ var _true_xanchor = x - abs(sprite_xoffset); var _true_yanchor = y - abs(sprite_yoffset); if (_true_xanchor > arg0 && (_true_xanchor + sprite_width) < arg2 && _true_yanchor > arg1 && (_true_yanchor + sprite_height) < arg3) { draw_self(); exit; } var _leftcrop = clamp(arg0 - _true_xanchor, 0, abs(sprite_width)); var _topcrop = clamp(arg1 - _true_yanchor, 0, abs(sprite_height)); var _rightcrop = clamp(arg2 - _true_xanchor, 0, abs(sprite_width)); var _bottomcrop = clamp(arg3 - _true_yanchor, 0, abs(sprite_height)); draw_sprite_part_ext(sprite_index, image_index, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (x - sprite_xoffset) + _leftcrop, (y - sprite_yoffset) + _topcrop, image_xscale, image_yscale, image_blend, image_alpha); }
(x - 15, y - (sprite_height / 2), x + (sprite_height / 2), ystart - 26);
4
    if (y > (ystart - 16))
5
        hspeed = -4;
6
    else if (hspeed < 0)
7
        hspeed += 0.5;
8
}
9
else
10
{
11
    draw_self();
12
}