Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_npc_jackenstein_Draw_0

(view raw script w/o annotations or w/e)
1
anim_index += anim_speed;
2
draw_sprite_ext(current_sprite_index, anim_index, x, y, image_xscale, 2, 0, c_white, base_alpha);
3
if (darkened)
4
{
5
    gpu_set_blendenable(false);
6
    gpu_set_colorwriteenable(false, false, false, true);
7
    draw_sprite_ext(current_sprite_index, anim_index, x, y, 2, 2, 0, c_white, 1);
8
    if (state == 2)
9
    {
10
        draw_set_alpha(0);
11
        ossafe_fill_rectangle(x + 20, (y + (sprite_get_height(current_sprite_index) * 2)) - 20, (x + (sprite_get_width(current_sprite_index) * 2)) - 20, y + (sprite_get_height(current_sprite_index) * 2), 0);
12
        draw_set_alpha(1);
13
    }
14
    gpu_set_blendenable(true);
15
    gpu_set_colorwriteenable(true, true, true, true);
16
    gpu_set_blendmode_ext(bm_dest_alpha, bm_inv_dest_alpha);
17
    gpu_set_alphatestenable(true);
18
    draw_sprite_ext(current_sprite_index, anim_index, x + 2, y + 2, 2, 2, 0, c_black, base_alpha);
19
    gpu_set_alphatestenable(false);
20
    gpu_set_blendmode(bm_normal);
21
    if (state == 0)
22
    {
23
        if (is_laughing)
24
            eyes_anim += 0.2;
25
        if (current_eyes_sprite == 824)
26
            eyes_anim += 0.16666666666666666;
27
        draw_sprite_ext(current_eyes_sprite, eyes_anim, x, y, 2, 2, 0, c_white, eyes_alpha);
28
    }
29
}
30
if (state == 5)
31
{
32
    draw_set_color(c_white);
33
    draw_set_alpha(beam_alpha);
34
    d_circle(x + 25, y + 50, 15 + (sin(beam_siner) * 2), false);
35
    d_circle(x + 50, y + 45, 15 + (sin(beam_siner) * 2), false);
36
    draw_set_alpha(1);
37
    for (var i = 0; i < 6; i++)
38
    {
39
        
scr_draw_beam
scr_draw_beam

function
scr_draw_beam(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
{ var __xx = arg0; var __yy = arg1; var _end0 =
scr_rotatevector(new Vector2(arg2), arg4);
_end0.x += __xx; _end0.y += __yy; var _end1 =
scr_rotatevector(new Vector2(arg2), arg4 + (arg3 / 2));
_end1.x += __xx; _end1.y += __yy; var _end2 =
scr_rotatevector(new Vector2(arg2), arg4 - (arg3 / 2));
_end2.x += __xx; _end2.y += __yy; var _col = draw_get_color(); var _alpha = draw_get_alpha(); draw_set_color(arg5); draw_set_alpha(arg6); if (arg7) d_circle(_end0.x, _end0.y, arg3 / 2, 0); d_triangle(__xx, __yy, _end1.x, _end1.y, _end2.x, _end2.y, 0); draw_set_color(_col); draw_set_alpha(_alpha); }
(x + 25, y + 48, 800, beam_width, beam_rotation + (60 * i), c_white, 1, false);
40
        
scr_draw_beam
scr_draw_beam

function
scr_draw_beam(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
{ var __xx = arg0; var __yy = arg1; var _end0 =
scr_rotatevector(new Vector2(arg2), arg4);
_end0.x += __xx; _end0.y += __yy; var _end1 =
scr_rotatevector(new Vector2(arg2), arg4 + (arg3 / 2));
_end1.x += __xx; _end1.y += __yy; var _end2 =
scr_rotatevector(new Vector2(arg2), arg4 - (arg3 / 2));
_end2.x += __xx; _end2.y += __yy; var _col = draw_get_color(); var _alpha = draw_get_alpha(); draw_set_color(arg5); draw_set_alpha(arg6); if (arg7) d_circle(_end0.x, _end0.y, arg3 / 2, 0); d_triangle(__xx, __yy, _end1.x, _end1.y, _end2.x, _end2.y, 0); draw_set_color(_col); draw_set_alpha(_alpha); }
(x + 50, y + 44, 800, beam_width, beam_rotation + 25 + (60 * i), c_white, 1, false);
41
    }
42
    draw_set_alpha(1);
43
}
44
if (state == 7 || state == 8)
45
{
46
    if (heal_marker != -4)
47
        heal_marker.image_index = anim_index;
48
}
49
if (destroyoverlay == true)
50
{
51
    with (obj_darkness_overlay)
52
        instance_destroy();
53
    destroyoverlay = false;
54
}