Deltarune script viewer

← back to main script listing

gml_Object_obj_smallface_Draw_64

(view raw script w/o annotations or w/e)
1
if (global.darkzone == 0)
2
{
3
    cx = camerax();
4
    cy = cameray();
5
    if (instance_exists(obj_dialoguer))
6
    {
7
        if (obj_dialoguer.side == 0)
8
            cy += 84;
9
    }
10
    if (facealpha < 1)
11
        facealpha += 0.2;
12
    draw_sprite_ext(sprite_index, image_index, x - cx, y - cy, image_xscale, image_yscale, image_angle, image_blend, facealpha);
13
    draw_set_alpha(facealpha);
14
    if (type == 0 || type == 3)
15
    {
16
        scr_84_set_draw_font
scr_84_set_draw_font

function scr_84_set_draw_font(arg0) { global.chemg_font = arg0; draw_set_font(scr_84_get_font(arg0)); }
("main");
17
        draw_set_color(mycolor);
18
        draw_text((x + 70) - cx, (y + 10) - cy, string_hash_to_newline(mystring));
19
    }
20
    if (type == 1 && active == 1 && getrid == 0)
21
    {
22
        scr_84_set_draw_font
scr_84_set_draw_font

function scr_84_set_draw_font(arg0) { global.chemg_font = arg0; draw_set_font(scr_84_get_font(arg0)); }
("main");
23
        draw_set_color(mycolor);
24
        draw_text((x + 70) - cx, (y + 15) - cy, string_hash_to_newline(mystring));
25
        finished = 1;
26
    }
27
    if (type == 2 || type == 4)
28
    {
29
        if (active == 1)
30
        {
31
            scr_84_set_draw_font
scr_84_set_draw_font

function scr_84_set_draw_font(arg0) { global.chemg_font = arg0; draw_set_font(scr_84_get_font(arg0)); }
("main");
32
            draw_set_color(mycolor);
33
            if (finished == 0)
34
            {
35
                partstring += string_char_at(mystring, part);
36
                part += 1;
37
                if (part >= (string_length(mystring) + 1))
38
                    finished = 1;
39
            }
40
            draw_text((x + 70 + random(1)) - cx, (y + 15 + random(1)) - cy, string_hash_to_newline(partstring));
41
        }
42
    }
43
    if (i_ex(writergod))
44
    {
45
        if (finished == 1 && getrid == 0)
46
            finished = 2;
47
    }
48
    else
49
    {
50
        instance_destroy();
51
    }
52
    if (getrid == 1)
53
    {
54
        direction = -nowdir;
55
        speed += 2;
56
        if (type == 3 || type == 4)
57
            instance_destroy();
58
    }
59
    draw_set_alpha(1);
60
}