Deltarune 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 = __view_get(e__VW.XView, 0); yyy = __view_get(e__VW.YView, 0); if (global.darkzone == 0) { if (side == 0) { draw_set_color(c_white); draw_rectangle(xxx + 16, yyy + 5, xxx + 304, yyy + 80, false); draw_set_color(c_black); draw_rectangle(xxx + 19, yyy + 8, xxx + 301, yyy + 77, false); } else { draw_set_color(c_white); draw_rectangle(xxx + 16, yyy + 160, xxx + 304, yyy + 235, false); draw_set_color(c_black); draw_rectangle(xxx + 19, yyy + 163, xxx + 301, yyy + 232, false); } } 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); } } } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
()
2
{
3
    xxx = __view_get(e__VW.XView, 0);
4
    yyy = __view_get(e__VW.YView, 0);
5
    if (global.darkzone == 0)
6
    {
7
        if (side == 0)
8
        {
9
            draw_set_color(c_white);
10
            draw_rectangle(xxx + 16, yyy + 5, xxx + 304, yyy + 80, false);
11
            draw_set_color(c_black);
12
            draw_rectangle(xxx + 19, yyy + 8, xxx + 301, yyy + 77, false);
13
        }
14
        else
15
        {
16
            draw_set_color(c_white);
17
            draw_rectangle(xxx + 16, yyy + 160, xxx + 304, yyy + 235, false);
18
            draw_set_color(c_black);
19
            draw_rectangle(xxx + 19, yyy + 163, xxx + 301, yyy + 232, false);
20
        }
21
    }
22
    if (global.darkzone == 1)
23
    {
24
        if (side == 0)
25
        {
26
            draw_set_color(c_black);
27
            draw_rectangle(xxx + 38, yyy + 16, xxx + 602, yyy + 154, false);
28
            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);
29
        }
30
        else
31
        {
32
            draw_set_color(c_black);
33
            draw_rectangle(xxx + 38, yyy + 326, xxx + 602, yyy + 464, false);
34
            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);
35
        }
36
    }
37
}
38
39
enum e__VW
40
{
41
    XView,
42
    YView,
43
    WView,
44
    HView,
45
    Angle,
46
    HBorder,
47
    VBorder,
48
    HSpeed,
49
    VSpeed,
50
    Object,
51
    Visible,
52
    XPort,
53
    YPort,
54
    WPort,
55
    HPort,
56
    Camera,
57
    SurfaceID
58
}