Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_arcade_intro_Draw_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
draw_set_color(c_white)
4
if (arc_controls_open == true)
5
{
6
    var xx = room_width / 2
7
    var yy = room_height / 2
8
    draw_sprite(spr_arcade_controls, 0, xx, yy)
9
    var action_key = 0
10
    var cancel_key = 0
11
    switch global.action_key
12
    {
13
        case "X":
14
            action_key = 0
15
            break
16
        case "Z":
17
            action_key = 1
18
            break
19
        case "A":
20
            action_key = 2
21
            break
22
        case "B":
23
            action_key = 3
24
            break
25
        case "Y":
26
            cancel_key = 4
27
            break
28
    }
29
30
    switch global.cancel_key
31
    {
32
        case "X":
33
            cancel_key = 0
34
            break
35
        case "Z":
36
            cancel_key = 1
37
            break
38
        case "A":
39
            cancel_key = 2
40
            break
41
        case "B":
42
            cancel_key = 3
43
            break
44
        case "Y":
45
            cancel_key = 4
46
            break
47
    }
48
49
    draw_sprite(spr_arcade_controls_buttons, cancel_key, (xx - 79 + 14), (yy - 72 + 72))
50
    draw_sprite(spr_arcade_controls_buttons, action_key, (xx - 79 + 102), (yy - 72 + 132))
51
    return;
52
}
53
if (scene == 1)
54
{
55
    draw_set_alpha(arc_logos_alpha)
56
    draw_sprite(spr_arcade_logo, 0, (room_width / 2), (room_height / 2))
57
    draw_set_alpha(1)
58
}
59
if (scene == 2)
60
{
61
    draw_set_color(c_white)
62
    draw_rectangle(80, 48, 239, 206, false)
63
}
64
if (scene >= 3 && scene < 6)
65
{
66
    draw_sprite(spr_arcade_menu, 0, (room_width / 2), (room_height / 2))
67
    if (arc_title_x > 160)
68
        var title_index = 0
69
    else
70
        title_index = 1
71
    draw_sprite(spr_arcade_title, title_index, arc_title_x, 80)
72
}
73
if (scene >= 5)
74
{
75
    yy = 140
76
    xx = 130
77
    draw_set_font(fnt_arcade)
78
    draw_text_transformed(xx, yy, string_hash_to_newline("Play"), 0.5, 0.5, 0)
79
    draw_text_transformed(xx, (yy + 15), string_hash_to_newline("Help"), 0.5, 0.5, 0)
80
    draw_text_transformed(xx, (yy + 30), string_hash_to_newline("Quit"), 0.5, 0.5, 0)
81
    switch arc_cursor_pos
82
    {
83
        case 1:
84
            yy = 145
85
            break
86
        case 2:
87
            yy = 160
88
            break
89
        case 3:
90
            yy = 175
91
            break
92
    }
93
94
    if (scene == 5)
95
        draw_sprite(spr_arcade_heart, 0, (xx - 8), yy)
96
    if (scene == 6)
97
        draw_sprite(spr_arcade_heart, -1, (xx - 8), yy)
98
}