Deltarune (Chapter Select) script viewer

← back to main script listing

gml_Object_obj_CHAPTER_SELECT_old_Draw_77

(view raw script w/o annotations or w/e)
1
if (os_type == os_switch || os_type == os_ps4)
2
{
3
    var ww = window_get_width();
4
    var wh = window_get_height();
5
    var sw = surface_get_width(application_surface);
6
    var sh = surface_get_height(application_surface);
7
    var xx = floor((ww - (sw * global.window_scale)) / 2);
8
    var yy = floor((wh - (sh * global.window_scale)) / 2);
9
    global.window_xofs = xx;
10
    global.window_yofs = yy;
11
    if (os_type == os_switch && wh == 720)
12
        texture_set_interpolation(true);
13
    else
14
        texture_set_interpolation(false);
15
    draw_enable_alphablend(false);
16
    draw_surface_ext(application_surface, xx, yy, global.window_scale, global.window_scale, 0, c_white, 1);
17
    draw_enable_alphablend(true);
18
    texture_set_interpolation(false);
19
}
20
else
21
{
22
    global.window_xofs = 0;
23
    global.window_yofs = 0;
24
}
25
if (!global.is_console)
26
{
27
    var nowfullscreen = window_get_fullscreen();
28
    if (nowfullscreen != isfullscreen)
29
    {
30
        ini_open("true_config.ini");
31
        ini_write_real("SCREEN", "FULLSCREEN", nowfullscreen);
32
        ini_close();
33
        show_debug_message("fullscreen switched:" + string(nowfullscreen));
34
        if (!nowfullscreen)
35
        {
36
            window_set_size(640 * window_size_multiplier, 480 * window_size_multiplier);
37
            alarm[2]
 = 1;
gml_Object_obj_CHAPTER_SELECT_old_Alarm_2.gml

audio_stop_all(); var chapstring = string(chaptertoload_temp); var parameters = get_chapter_switch_parameters(); switch (os_type) { case os_windows: game_change("/chapter" + chapstring + "_windows", "-game data.win" + parameters); break; case os_switch: game_change("rom:/chapter" + chapstring + "_switch/", parameters); break; case os_ps4: game_change("", "-game /app0/games/chapter" + chapstring + "_ps4/game.win" + parameters); break; case os_ps5: game_change("", "-game /app0/games/chapter" + chapstring + "_ps5/game.win" + parameters); break; case os_macosx: game_change("chapter" + chapstring + "_mac", parameters); break; }
38
        }
39
    }
40
    isfullscreen = nowfullscreen;
41
}