Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_credits_final_neutral_Draw_64

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
draw_set_font(fnt_main)
4
var x_offset = 20
5
var line_counter = 0
6
var line_offset = 20
7
var section_offset = 30
8
var header_offset = 10
9
var y_current = 0
10
draw_set_alpha(draw_alpha)
11
draw_set_color(c_black)
12
draw_rectangle(0, 0, 640, 480, false)
13
draw_set_alpha(text_alpha)
14
if (global.hotland_flag[10] != 0)
15
{
16
    draw_sprite_ext(spr_logo_undertale, 1, 160, (-144 + y_offset), 0.5, 0.5, 0, c_white, 1)
17
    draw_sprite_ext(logo_yellow, 1, 160, (-112 + y_offset), 0.5, 0.5, 0, c_white, 1)
18
}
19
var category_number = array_length(credits_entry)
20
for (var a = 0; a < category_number; a++)
21
{
22
    var category_size = array_length(credits_entry[a])
23
    for (var i = 0; i < category_size; i++)
24
    {
25
        draw_set_color(c_white)
26
        if (i == 0)
27
            draw_set_color(c_yellow)
28
        var last_line = (i == (category_size - 1) && a == (category_number - 1))
29
        if last_line
30
        {
31
            x_offset = 160
32
            draw_set_halign(fa_center)
33
        }
34
        else
35
            draw_set_halign(fa_left)
36
        var current_text_y_placement = y_offset + y_current
37
        if (last_line == true && y_slow_down == false && current_text_y_placement < (110 + slow_down_treshold * 0.5))
38
            y_slow_down = true
39
        draw_text(x_offset, floor(current_text_y_placement), credits_entry[a][i])
40
        y_current += (line_offset + (i == 0) * header_offset + (i == (category_size - 1)) * section_offset)
41
        line_counter++
42
    }
43
}
44
if (y_max == -1)
45
    y_max = y_current - 160
46
draw_set_alpha(1)