Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_PTB02_roaringknight_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 0)
2
{
3
    draw_sprite_ext(sprite_index, image_index, x + shakex, y + shakey, image_xscale, 2, 0, c_white, 1);
4
    if (eye_shine)
5
        draw_sprite_ext(spr_shine_white, eye_shine_anim, (x + 100 + 38) - 4, y + 16 + 8 + 4 + 2, 2, 2, 0, c_white, 1);
6
    if (undyne_catch)
7
    {
8
        undyne_anim += 0.3;
9
        draw_sprite_ext(spr_undyne_dw_caught, undyne_anim, x + 28, y + 26, 2, 2, 0, c_white, 1);
10
        if (!undyne_hat_release)
11
            draw_sprite_ext(spr_undyne_dw_hat, 0, x + 56, y + 30, 2, 2, 0, c_white, 1);
12
    }
13
    if (sword_active)
14
    {
15
        if (sword_appear)
16
        {
17
            alpha_siner += 1.5;
18
            if (sword_flash)
19
                current_alpha = sword_alpha + sin(alpha_siner);
20
            else
21
                current_alpha = 1;
22
            gpu_set_blendenable(false);
23
            gpu_set_colorwriteenable(false, false, false, true);
24
            draw_sprite_ext(spr_roaringknight_sword_mask, 0, x, y + y_base_pos, 2, 2, 0, c_white, current_alpha);
25
            draw_set_alpha(0);
26
            ossafe_fill_rectangle(x + 24 + 10, y + 58, x + 25 + 40 + 10, room_height, 0);
27
            draw_set_alpha(1);
28
            gpu_set_blendenable(true);
29
            gpu_set_colorwriteenable(true, true, true, true);
30
            gpu_set_blendmode_ext(bm_dest_alpha, bm_inv_dest_alpha);
31
            gpu_set_alphatestenable(true);
32
            draw_sprite_ext(spr_roaringknight_sword, 0, x, y + y_base_pos, 2, 2, 0, c_white, 1);
33
            gpu_set_alphatestenable(false);
34
            gpu_set_blendmode(bm_normal);
35
        }
36
        else
37
        {
38
            draw_sprite_ext(spr_roaringknight_sword, 0, x, y + y_base_pos, 2, 2, 0, c_white, 1);
39
        }
40
    }
41
    if (grab_hand)
42
        draw_sprite_ext(spr_roaringknight_sword_grab_hand_new, image_index, x, y, 2, 2, 0, c_white, 1);
43
}
44
if (state == 1)
45
{
46
    draw_sprite_ext(reach_sprite, 3, x, y, 2, 2, 0, c_white, 1);
47
    if (susie_grab)
48
    {
49
        draw_sprite_ext(spr_susie_dw_fell_grab_no_hand, 0, susie_grab_x, susie_grab_y, 2, 2, 0, c_white, 1);
50
        susie_shake_timer--;
51
        if (susie_shake_timer <= 0)
52
        {
53
            susie_shake_timer = susie_shake_time;
54
            shake_offset = choose(0, 2);
55
        }
56
        draw_sprite_ext(spr_susie_dw_fell_grab_hand, 0, susie_grab_x + shake_offset, susie_grab_y, 2, 2, 0, c_white, 1);
57
    }
58
}
59
if (state == 6)
60
{
61
    draw_sprite_ext(spr_roaringknight_look_down_full, 0, x, y, 2, 2, 0, c_white, 1);
62
    if (susie_grab)
63
        draw_sprite_ext(spr_susie_dw_fell_grab, 0, susie_grab_x, susie_grab_y, 2, 2, 0, c_white, 1);
64
}
65
if (state >= 2)
66
    draw_sprite_ext(sprite_index, image_index, x + shakex, y + shakey, 2, 2, 0, c_white, 1);