Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_dbox

(view raw script w/o annotations or w/e)
1
function scr_dbox
scr_dbox

function scr_dbox() { xxx = camerax(); yyy = cameray(); if (global.darkzone == 0) { var off = side * 155; draw_sprite_ext(spr_pxwhite, 0, xxx + 16, yyy + 5 + off, 289, 76, 0, c_white, 1); draw_sprite_ext(spr_pxwhite, 0, xxx + 19, yyy + 8 + off, 283, 70, 0, c_black, 1); } if (global.darkzone == 1) { if (side == 0) { draw_set_color(c_black); draw_rectangle(xxx + 38, yyy + 16, xxx + 602, yyy + 154, false); scr_darkbox((xxx + 32) - 8, (yyy + 10) - 8, xxx + 608 + 8, yyy + 160 + 8); } else { draw_set_color(c_black); draw_rectangle(xxx + 38, yyy + 326, xxx + 602, yyy + 464, false); scr_darkbox((xxx + 32) - 8, (yyy + 320) - 8, xxx + 608 + 8, yyy + 470 + 8); } } }
()
2
{
3
    xxx = camerax();
4
    yyy = cameray();
5
    if (global.darkzone == 0)
6
    {
7
        var off = side * 155;
8
        draw_sprite_ext(spr_pxwhite, 0, xxx + 16, yyy + 5 + off, 289, 76, 0, c_white, 1);
9
        draw_sprite_ext(spr_pxwhite, 0, xxx + 19, yyy + 8 + off, 283, 70, 0, c_black, 1);
10
    }
11
    if (global.darkzone == 1)
12
    {
13
        if (side == 0)
14
        {
15
            draw_set_color(c_black);
16
            draw_rectangle(xxx + 38, yyy + 16, xxx + 602, yyy + 154, false);
17
            scr_darkbox
scr_darkbox

function scr_darkbox(arg0, arg1, arg2, arg3) { cur_jewel += 1; textbox_width = arg2 - arg0 - 63; if (textbox_width < 0) textbox_width = 0; textbox_height = arg3 - arg1 - 63; if (textbox_height < 0) textbox_height = 0; if (textbox_width > 0) { draw_sprite_stretched(spr_textbox_top, 0, arg0 + 32, arg1, textbox_width, 32); draw_sprite_ext(spr_textbox_top, 0, arg0 + 32, arg3 + 1, textbox_width, -2, 0, c_white, 1); } if (textbox_height > 0) { draw_sprite_ext(spr_textbox_left, 0, arg2 + 1, arg1 + 32, -2, textbox_height, 0, c_white, 1); draw_sprite_ext(spr_textbox_left, 0, arg0, arg1 + 32, 2, textbox_height, 0, c_white, 1); } if (global.flag[8 simplify_vfx] == 0) { draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg0, arg1, 2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg2 + 1, arg1, -2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg0, arg3 + 1, 2, -2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1); } else { draw_sprite_ext(spr_textbox_topleft, 0, arg0, arg1, 2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, 0, arg2 + 1, arg1, -2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, 0, arg0, arg3 + 1, 2, -2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, 0, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1); } }
((xxx + 32) - 8, (yyy + 10) - 8, xxx + 608 + 8, yyy + 160 + 8);
18
        }
19
        else
20
        {
21
            draw_set_color(c_black);
22
            draw_rectangle(xxx + 38, yyy + 326, xxx + 602, yyy + 464, false);
23
            scr_darkbox
scr_darkbox

function scr_darkbox(arg0, arg1, arg2, arg3) { cur_jewel += 1; textbox_width = arg2 - arg0 - 63; if (textbox_width < 0) textbox_width = 0; textbox_height = arg3 - arg1 - 63; if (textbox_height < 0) textbox_height = 0; if (textbox_width > 0) { draw_sprite_stretched(spr_textbox_top, 0, arg0 + 32, arg1, textbox_width, 32); draw_sprite_ext(spr_textbox_top, 0, arg0 + 32, arg3 + 1, textbox_width, -2, 0, c_white, 1); } if (textbox_height > 0) { draw_sprite_ext(spr_textbox_left, 0, arg2 + 1, arg1 + 32, -2, textbox_height, 0, c_white, 1); draw_sprite_ext(spr_textbox_left, 0, arg0, arg1 + 32, 2, textbox_height, 0, c_white, 1); } if (global.flag[8 simplify_vfx] == 0) { draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg0, arg1, 2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg2 + 1, arg1, -2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg0, arg3 + 1, 2, -2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, cur_jewel / 10, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1); } else { draw_sprite_ext(spr_textbox_topleft, 0, arg0, arg1, 2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, 0, arg2 + 1, arg1, -2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, 0, arg0, arg3 + 1, 2, -2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft, 0, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1); } }
((xxx + 32) - 8, (yyy + 320) - 8, xxx + 608 + 8, yyy + 470 + 8);
24
        }
25
    }
26
}