Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_initializer2_Step_0

(view raw script w/o annotations or w/e)
1
if (global.savedata_async_id >= 0)
2
    exit;
3
if (global.is_console)
4
{
5
    if (!variable_global_exists("init_prefetch"))
6
    {
7
        global.init_prefetch = true;
8
        
scr_prefetch_textures
scr_prefetch_textures

function
scr_prefetch_textures()
{ var texture_groups = ["Default", "ConsolePS4"]; if (global.is_console) { if (scr_is_switch_os()) texture_groups = ["Default", "ConsoleSwitch"]; texture_groups[array_length(texture_groups)] = "Console"; } for (var i = 0; i < array_length(texture_groups); i++) { var _tex_array = texturegroup_get_textures(texture_groups[i]); for (var j = 0; j < array_length(_tex_array); j++) { if (texture_is_ready(_tex_array[j])) continue; texture_prefetch(_tex_array[j]); } } }
();
9
    }
10
}
11
if (audio_group_is_loaded(1))
12
{
13
    roomchoice = PLACE_CONTACT;
14
    menu_go = 0;
15
    if (ossafe_file_exists("filech1_0"))
16
        menu_go = 1;
17
    if (ossafe_file_exists("filech1_1"))
18
        menu_go = 1;
19
    if (ossafe_file_exists("filech1_2"))
20
        menu_go = 1;
21
    if (ossafe_file_exists("filech1_3"))
22
        menu_go = 1;
23
    if (ossafe_file_exists("dr.ini"))
24
        menu_go = 1;
25
    if (ossafe_file_exists("filech1_3"))
26
        menu_go = 2;
27
    if (ossafe_file_exists("filech1_4"))
28
        menu_go = 2;
29
    if (ossafe_file_exists("filech1_5"))
30
        menu_go = 2;
31
    if (menu_go == 0)
32
    {
33
        if (os_type == os_ps5)
34
        {
35
            with (obj_event_manager)
36
                trigger_event(UnknownEnum.Value_2, UnknownEnum.Value_0);
37
        }
38
        roomchoice = PLACE_CONTACT;
39
    }
40
    else if (menu_go == 1)
41
    {
42
        roomchoice = PLACE_MENU;
43
    }
44
    else if (menu_go == 2)
45
    {
46
        
scr_windowcaption
scr_windowcaption

function
scr_windowcaption(arg0)
{ if (global.tempflag[10] == 1) window_set_caption(
DELTARUNE
scr_84_get_lang_string("scr_windowcaption_slash_scr_windowcaption_gml_1_0")
);
else window_set_caption(arg0); }
(
DELTARUNE
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_initializer2_slash_Step_0_gml_22_0")
);
47
        global.tempflag[10] = 1;
48
        roomchoice = room_legend;
49
        global.plot = 0;
50
    }
51
    room_goto(roomchoice);
52
}
53
54
enum UnknownEnum
55
{
56
    Value_0,
57
    Value_2 = 2
58
}