Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_initializer2_Step_0

(view raw script w/o annotations or w/e)
1
if (!instance_exists(obj_time))
2
    scr_input_manager_process();
3
if (global.is_console)
4
{
5
    if (global.savedata_async_id >= 0)
6
        exit;
7
    if (!variable_global_exists("chapter"))
8
        exit;
9
    if (!textures_loaded)
10
        textures_loaded = loadtex.loaded;
11
    if (textures_loaded)
12
        show_debug_message_concat("TEXTURES LOADED");
13
    else
14
        exit;
15
}
16
var CH = string(global.chapter);
17
if (audio_group_is_loaded(1))
18
{
19
    roomchoice = PLACE_CONTACT;
20
    menu_go = 0;
21
    if (scr_chapter_save_file_exists(global.chapter) || ossafe_file_exists("dr.ini"))
22
        menu_go = 1;
23
    if (scr_completed_chapter_any_slot(global.chapter))
24
        menu_go = 2;
25
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
26
        menu_go = 3;
27
    if (menu_go == 0 || menu_go == 1)
28
    {
29
        if (global.is_console)
30
            global.screen_border_alpha = 0;
31
        roomchoice = room_intro;
32
    }
33
    if (menu_go == 2)
34
    {
35
        if (global.is_console)
36
            global.screen_border_alpha = 1;
37
        
scr_windowcaption
scr_windowcaption

function
scr_windowcaption(arg0)
{ if (global.tempflag[10] != 1 && global.chapter == 1) window_set_caption(arg0); else window_set_caption("DELTARUNE Chapter " + string(global.chapter)); }
("DELTARUNE");
38
        global.tempflag[10] = 1;
39
        roomchoice = room_legend;
40
        global.plot = 0;
41
    }
42
    if (menu_go == 3)
43
    {
44
        if (global.is_console)
45
            global.screen_border_alpha = 0;
46
        roomchoice = room_next(room);
47
    }
48
    room_goto(roomchoice);
49
}
50
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
51
{
52
    if (!instance_exists(obj_debugProfiler))
53
        instance_create_depth(0, 0, 0, obj_debugProfiler);
54
}