Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_time_Draw_77

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
{
3
    if (sunkus_kb_check_pressed(71) && !sunkus_kb_check(17) && gif_recording == 0)
4
    {
5
        gif_recording = 1;
6
        gif_timer = 0;
7
        gif_date = string(date_get_year(date_current_datetime())) + "_" + string(date_get_month(date_current_datetime())) + "_" + string(date_get_day(date_current_datetime())) + "_" + string(date_get_hour(date_current_datetime())) + "_" + string(date_get_minute(date_current_datetime())) + "_" + string(date_get_second(date_current_datetime()));
8
    }
9
    if (gif_recording)
10
    {
11
        var gif_release = 0;
12
        if (sunkus_kb_check_released(71))
13
            gif_release = 1;
14
        if (gif_timer == 0)
15
        {
16
            gif_image = gif_open(640, 480);
17
        }
18
        else if (gif_timer < 600 && gif_release == 0)
19
        {
20
            if (sunkus_kb_check(16))
21
                gif_add_surface(gif_image, application_surface, 10);
22
            else
23
                gif_add_surface(gif_image, application_surface, 3.3333333333333335);
24
        }
25
        else
26
        {
27
            gif_save(gif_image, "game_" + gif_date + ".gif");
28
            gif_timer = 0;
29
            gif_recording = false;
30
        }
31
        gif_timer++;
32
    }
33
}
34
if (!global.is_console)
35
{
36
    var nowfullscreen = window_get_fullscreen();
37
    if (nowfullscreen != isfullscreen)
38
    {
39
        ini_open("true_config.ini");
40
        ini_write_real("SCREEN", "FULLSCREEN", nowfullscreen);
41
        ini_close();
42
        show_debug_message("fullscreen switched:" + string(nowfullscreen));
43
        if (!nowfullscreen)
44
        {
45
            window_set_size(640 * window_size_multiplier, 480 * window_size_multiplier);
46
            alarm[2]
 = 1;
gml_Object_obj_time_Alarm_2.gml

window_center();
47
        }
48
    }
49
    isfullscreen = nowfullscreen;
50
}