Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_giga_Draw_64

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