Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_redshape_Draw_0

(view raw script w/o annotations or w/e)
1
if (!surface_exists(my_surface))
2
    my_surface = surface_create(46, 46);
3
surface_set_target(my_surface);
4
draw_clear_alpha(c_black, 0);
5
draw_sprite_ext(sprite_index, timer * 0.25, 23, 23, 1, 1, image_angle, image_blend, image_alpha);
6
var hdir = point_direction(x, y, obj_heart.x + 10, obj_heart.y + 10);
7
draw_sprite_ext(spr_darkshape_eye, 0, 23, 23, 1, 1, 0, image_blend, image_alpha);
8
draw_sprite_ext(spr_darkshape_iris, 0, 23 + lengthdir_x(2, hdir), 23 + lengthdir_y(2, hdir) + 1, 1, 1, 0, image_blend, image_alpha);
9
surface_reset_target();
10
var xoff = 0;
11
var yoff = 0;
12
if (shakeme)
13
{
14
    xoff = choose(-1, 0, 1);
15
    yoff = choose(-1, 0, 1);
16
}
17
for (a = 0; a < 46; a++)
18
{
19
    var side = 1;
20
    draw_surface_part(my_surface, 0, a, 46, 1, (x - 23) + (sin((a + timer) * 1) * (4 - (image_alpha * 4)) * side) + xoff, (y - 23) + a + yoff);
21
}