Deltarune (Chapter 3) 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
    var topside = 0;
4
    if (i_ex(obj_writer))
5
    {
6
        if (obj_writer.y < (cameray() + 120))
7
            topside = 1;
8
    }
9
    cx = camerax() - xoffset_console;
10
    cy = (cameray() - yoffset_console) + (topside * 71);
11
    if (instance_exists(obj_dialoguer))
12
    {
13
        if (obj_dialoguer.side == 0)
14
            cy += 84;
15
    }
16
    if (facealpha < 1)
17
        facealpha += 0.2;
18
    draw_sprite_ext(sprite_index, image_index, x - cx, y - cy, image_xscale, image_yscale, image_angle, image_blend, facealpha);
19
    draw_set_alpha(facealpha);
20
    if (type == 0 || type == 3)
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 + 10) - cy, string_hash_to_newline(mystring));
25
    }
26
    if (type == 1 && active == 1 && getrid == 0)
27
    {
28
        
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");
29
        draw_set_color(mycolor);
30
        draw_text((x + 70) - cx, (y + 15) - cy, string_hash_to_newline(mystring));
31
        finished = 1;
32
    }
33
    if (type == 2 || type == 4)
34
    {
35
        if (active == 1)
36
        {
37
            
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");
38
            draw_set_color(mycolor);
39
            if (finished == 0)
40
            {
41
                partstring += string_char_at(mystring, part);
42
                part += 1;
43
                if (part >= (string_length(mystring) + 1))
44
                    finished = 1;
45
            }
46
            draw_text((x + 70 + random(1)) - cx, (y + 15 + random(1)) - cy, string_hash_to_newline(partstring));
47
        }
48
    }
49
    if (i_ex(writergod))
50
    {
51
        if (finished == 1 && getrid == 0)
52
            finished = 2;
53
    }
54
    else
55
    {
56
        instance_destroy();
57
    }
58
    if (getrid == 1)
59
    {
60
        direction = -nowdir;
61
        speed += 2;
62
        if (type == 3 || type == 4)
63
            instance_destroy();
64
    }
65
    draw_set_alpha(1);
66
}