Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_splashscreen_Step_0

(view raw script w/o annotations or w/e)
1
if (loaded)
2
{
3
    if (visit_shop)
4
    {
5
        if (os_type == os_ps4 || os_type == os_ps5)
6
        {
7
            if (commerce_dialog_open == true)
8
            {
9
                var result = psn_np_commerce_dialog_tick();
10
                if (result != 0)
11
                    commerce_dialog_open = false;
12
            }
13
        }
14
        buffer++;
15
        if (left_p())
16
        {
17
            snd_play(snd_menumove);
18
            heart_pos_x = heart_pos_x_default;
19
        }
20
        if (right_p())
21
        {
22
            snd_play(snd_menumove);
23
            heart_pos_x = heart_pos_x_default + heart_pos_x_h_padding;
24
        }
25
        if (button1_p() && buffer >= 3)
26
        {
27
            buffer = 0;
28
            snd_play(snd_menumove);
29
            if (heart_pos_x == heart_pos_x_default)
30
            {
31
                if (scr_is_switch_os())
32
                {
33
                    switch_show_store(72199087622348800);
34
                }
35
                else if (os_type == os_ps4 || os_type == os_ps5)
36
                {
37
                }
38
            }
39
            else if (heart_pos_x == (heart_pos_x_default + heart_pos_x_h_padding))
40
            {
41
                visit_shop = false;
42
            }
43
        }
44
        if (button2_p())
45
        {
46
            snd_play(snd_menumove);
47
            visit_shop = false;
48
        }
49
    }
50
    else
51
    {
52
        if (up_p())
53
        {
54
            snd_play(snd_menumove);
55
            if (global.lang == "en")
56
            {
57
                if (heart_pos_y == (yy + 288 + line_height))
58
                    heart_pos_y -= line_height;
59
            }
60
            else if (heart_pos_y_ja == (yy + 328 + select_padding))
61
            {
62
                heart_pos_y_ja -= select_padding;
63
            }
64
        }
65
        if (down_p())
66
        {
67
            snd_play(snd_menumove);
68
            if (global.lang == "en")
69
            {
70
                if (heart_pos_y == (yy + 288))
71
                    heart_pos_y += line_height;
72
            }
73
            else if (heart_pos_y_ja == (yy + 328))
74
            {
75
                heart_pos_y_ja += select_padding;
76
            }
77
        }
78
        if (button1_p())
79
        {
80
            snd_play(snd_menumove);
81
            if (global.lang == "en")
82
            {
83
                if (heart_pos_y == (yy + 288))
84
                {
85
                    heart_pos_x = heart_pos_x_default;
86
                    visit_shop = true;
87
                }
88
                else if (heart_pos_y == (yy + 288 + line_height))
89
                {
90
                    room_goto(PLACE_CONTACT );
91
                }
92
            }
93
            else if (heart_pos_y_ja == (yy + 328))
94
            {
95
                heart_pos_x = heart_pos_x_default;
96
                visit_shop = true;
97
            }
98
            else if (heart_pos_y_ja == (yy + 328 + select_padding))
99
            {
100
                room_goto(PLACE_CONTACT );
101
            }
102
        }
103
    }
104
}
105
else
106
{
107
    if (text_alpha_a < 1)
108
        text_alpha_a += 0.015;
109
    if (text_alpha_a >= 1)
110
    {
111
        if (text_alpha_b < 1)
112
            text_alpha_b += 0.015;
113
    }
114
    loaded = text_alpha_b >= 1;
115
}