Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_final_flowey_Draw_64

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (message_current > (array_length_1d(prt) - 1) || prt[message_current] == 0)
4
    portrait = false;
5
else
6
    portrait = true;
7
var line_sep = 18;
8
draw_set_font(dialogue_font);
9
draw_set_color(c_white);
10
draw_set_halign(fa_left);
11
message_actual = string_copy(message[message_current], 0, cutoff);
12
draw_text_ext(xx, yy + 10, string_hash_to_newline(message_actual), line_sep, -1);
13
if (color == true)
14
{
15
    if (color_set == false)
16
    {
17
        for (var i = 0; i < (array_length_1d(message) - 1); i++)
18
        {
19
            var len = array_length_2d(message_col, i);
20
            if (len == 0)
21
            {
22
                message_col[i][0] = "";
23
            }
24
            else if (len > 0)
25
            {
26
                for (var j = 0; j < (array_length_1d(col_modif) - 1); j++)
27
                {
28
                    if (j < array_length_2d(message_col, i) && message_col[i][j] == 0)
29
                        message_col[i][j] = "";
30
                }
31
            }
32
        }
33
        color_set = true;
34
    }
35
    for (var j = 0; j < array_length_2d(message_col, message_current); j++)
36
    {
37
        message_actual_col[j] = string_copy(message_col[message_current][j], 0, cutoff);
38
        draw_set_color(col_modif[j]);
39
        draw_text_ext(xx, yy + 10, string_hash_to_newline(message_actual_col[j]), line_sep, -1);
40
    }
41
}
42
draw_set_color(c_white);
43
if (dialogue_is_minishop == true)
44
{
45
    var minishop_box_xx = 204;
46
    var minishop_box_yy = 92;
47
    draw_set_color(c_white);
48
    draw_rectangle(minishop_box_xx, minishop_box_yy, minishop_box_xx + 100, minishop_box_yy + 53, false);
49
    draw_set_color(c_black);
50
    draw_rectangle(minishop_box_xx + 3, minishop_box_yy + 3, (minishop_box_xx + 100) - 3, (minishop_box_yy + 53) - 3, false);
51
    draw_set_font(fnt_battle);
52
    draw_set_color(c_white);
53
    var item_count;
54
    for (item_count = 1; item_count <= 8; item_count++)
55
    {
56
        if (global.item_slot[item_count] == "Nothing")
57
            break;
58
    }
59
    draw_text(217, 100, string_hash_to_newline("$ - " + string(global.player_gold) + "#SPACE - " + string(item_count - 1) + "/8"));
60
}
61
var width1 = string_width(string_hash_to_newline(ch[1])) * 0.5;
62
var width2 = string_width(string_hash_to_newline(ch[2])) * 0.5;
63
xpos1 = xx - width1;
64
xpos2 = (xpos1 + 122) - width2;
65
xpos3 = xpos1;
66
xpos4 = xpos2;
67
draw_set_alpha(1);
68
draw_set_halign(fa_left);