Deltarune script viewer

← back to main script listing

gml_GlobalScript_scr_darkbox_ch1

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

function scr_darkbox_ch1(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_ch1, 0, arg0 + 32, arg1, textbox_width, 32); draw_sprite_ext(spr_textbox_top_ch1, 0, arg0 + 32, arg3 + 1, textbox_width, -2, 0, c_white, 1); } if (textbox_height > 0) { draw_sprite_ext(spr_textbox_left_ch1, 0, arg2 + 1, arg1 + 32, -2, textbox_height, 0, c_white, 1); draw_sprite_ext(spr_textbox_left_ch1, 0, arg0, arg1 + 32, 2, textbox_height, 0, c_white, 1); } if (global.flag[8 simplify_vfx] == 0) { draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg0, arg1, 2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg2 + 1, arg1, -2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg0, arg3 + 1, 2, -2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1); } else { draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg0, arg1, 2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg2 + 1, arg1, -2, 2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg0, arg3 + 1, 2, -2, 0, c_white, 1); draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1); } }
(arg0, arg1, arg2, arg3)
2
{
3
    cur_jewel += 1;
4
    textbox_width = arg2 - arg0 - 63;
5
    if (textbox_width < 0)
6
        textbox_width = 0;
7
    textbox_height = arg3 - arg1 - 63;
8
    if (textbox_height < 0)
9
        textbox_height = 0;
10
    if (textbox_width > 0)
11
    {
12
        draw_sprite_stretched(spr_textbox_top_ch1, 0, arg0 + 32, arg1, textbox_width, 32);
13
        draw_sprite_ext(spr_textbox_top_ch1, 0, arg0 + 32, arg3 + 1, textbox_width, -2, 0, c_white, 1);
14
    }
15
    if (textbox_height > 0)
16
    {
17
        draw_sprite_ext(spr_textbox_left_ch1, 0, arg2 + 1, arg1 + 32, -2, textbox_height, 0, c_white, 1);
18
        draw_sprite_ext(spr_textbox_left_ch1, 0, arg0, arg1 + 32, 2, textbox_height, 0, c_white, 1);
19
    }
20
    if (global.flag[8 simplify_vfx] == 0)
21
    {
22
        draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg0, arg1, 2, 2, 0, c_white, 1);
23
        draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg2 + 1, arg1, -2, 2, 0, c_white, 1);
24
        draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg0, arg3 + 1, 2, -2, 0, c_white, 1);
25
        draw_sprite_ext(spr_textbox_topleft_ch1, cur_jewel / 10, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1);
26
    }
27
    else
28
    {
29
        draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg0, arg1, 2, 2, 0, c_white, 1);
30
        draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg2 + 1, arg1, -2, 2, 0, c_white, 1);
31
        draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg0, arg3 + 1, 2, -2, 0, c_white, 1);
32
        draw_sprite_ext(spr_textbox_topleft_ch1, 0, arg2 + 1, arg3 + 1, -2, -2, 0, c_white, 1);
33
    }
34
}