Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_GSA04_screen_Draw_0

(view raw script w/o annotations or w/e)
1
if (con < 0)
2
{
3
    if (show_overlay)
4
    {
5
        draw_set_color(c_black);
6
        ossafe_fill_rectangle(camerax(), cameray(), room_width, room_height);
7
        draw_set_color(c_white);
8
    }
9
    exit;
10
}
11
if (bg_sprite == -4)
12
{
13
    if (bg_surface == -4)
14
        bg_surface = surface_create(camera_get_view_width(0), camera_get_view_height(0));
15
    surface_set_target(bg_surface);
16
    draw_surface_ext(application_surface, 0, 0, 1, 1, 0, c_white, 1);
17
    surface_reset_target();
18
    bg_sprite = sprite_create_from_surface(bg_surface, 0, 0, room_width, room_height, false, true, 0, 0);
19
    surface_free(bg_surface);
20
}
21
else if (con == 2)
22
{
23
    draw_set_color(c_black);
24
    ossafe_fill_rectangle(camerax(), cameray(), room_width, room_height);
25
    draw_set_color(c_white);
26
    draw_sprite_ext(bg_sprite, 0, screen_pos_list[screen_pos_index].x, screen_pos_list[screen_pos_index].y, 3, 3, 0, c_white, 1);
27
}
28
if (show_overlay)
29
{
30
    draw_set_color(c_black);
31
    ossafe_fill_rectangle(camerax(), cameray(), room_width, room_height);
32
    draw_set_color(c_white);
33
}