Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_ballcon_Draw_0

(view raw script w/o annotations or w/e)
1
if (appearcon == 0 || appearcon == 2)
2
{
3
    appearx1 = lerp(x + (width / 2), x, appeartimer / fadeAmount);
4
    appearx2 = lerp(x + (width / 2), x + width, appeartimer / fadeAmount);
5
    appeary1 = lerp(y + (height / 2), y, appeartimer / fadeAmount);
6
    appeary2 = lerp(y + (height / 2), y + height, appeartimer / fadeAmount);
7
    draw_set_color(c_white);
8
    ossafe_fill_rectangle(appearx1, appeary1, appearx2, appeary2, true);
9
    ossafe_fill_rectangle(appearx1 + 1, appeary1 + 1, appearx2 - 1, appeary2 - 1, true);
10
    if (appearcon == 0)
11
    {
12
        appeartimer += 1;
13
        if (appeartimer >= fadeAmount)
14
            appearcon = 1;
15
    }
16
    if (appearcon == 2)
17
    {
18
        appeartimer -= 1;
19
        if (appeartimer <= 0)
20
        {
21
            appearcon = 99;
22
            instance_destroy();
23
        }
24
    }
25
}
26
if (appearcon == 1)
27
{
28
    draw_set_color(c_white);
29
    ossafe_fill_rectangle(x + 16, y + 16, (x + width) - 16, (y + height) - 16, false);
30
    draw_sprite_ext(spr_ch3_ballcon_corner, 0, x, y, 2, 2, 0, c_white, 1);
31
    draw_sprite_ext(spr_ch3_ballcon_corner, 0, x + width, y, -2, 2, 0, c_white, 1);
32
    draw_sprite_ext(spr_ch3_ballcon_corner, 0, x, y + height, 2, -2, 0, c_white, 1);
33
    draw_sprite_ext(spr_ch3_ballcon_corner, 0, x + width, y + height, -2, -2, 0, c_white, 1);
34
    draw_sprite_ext(spr_ch3_ballcon_line, 0, x + 12, y, width - 24, 2, 0, c_white, 1);
35
    draw_sprite_ext(spr_ch3_ballcon_line, 0, x + 12, y + height, width - 24, -2, 0, c_white, 1);
36
    draw_sprite_ext(spr_ch3_ballcon_lineside, 0, x, y + 12, 2, height - 24, 0, c_white, 1);
37
    draw_sprite_ext(spr_ch3_ballcon_lineside, 0, x + width, y + 12, -2, height - 24, 0, c_white, 1);
38
    if (triangle == 1)
39
    {
40
        if (trianglesprite != 4981)
41
        {
42
            if (triangleside == 0)
43
                draw_sprite_ext(trianglesprite, 0, x + 6, (y - 32) + (height / 2), 2, 2, 0, c_white, 1);
44
            if (triangleside == 1)
45
                draw_sprite_ext(trianglesprite, 0, (x + width) - 6, (y - 32) + (height / 2), -2, 2, 0, c_white, 1);
46
        }
47
        else
48
        {
49
            if (triangleside == 0)
50
                draw_sprite_ext(trianglesprite, 0, x, y, 2, 2, 0, c_white, 1);
51
            if (triangleside == 1)
52
                draw_sprite_ext(trianglesprite, 0, x + width, y, -2, 2, 0, c_white, 1);
53
        }
54
    }
55
    if (char > 0)
56
        draw_sprite_ext(spr_ch3_ballcon_charface, char, x + 25, y + 20, 2, 2, 0, c_white, 1);
57
}