Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_fusuma_mask

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

function
scr_fusuma_mask()
{ if (other.y == y && far_background == other.far_background) { mask = other; other.fusuma[other.count] = id; other.count++; if (other.depth > depth && !far_background) other.depth = depth - 1; if (object_index == obj_plat_fusumawall) other.mask_height = max(other.mask_height, image_yscale * 20); } else { var _found = false; with (obj_fusuma_mask) { if (other.y == y && far_background == other.far_background) { other.mask = self; fusuma[count] = other; count++; if (depth > other.depth && !far_background) depth = other.depth - 1; _found = true; if (other.object_index == obj_plat_fusumawall) mask_height = max(mask_height, other.image_yscale * 20); break; } } if (!_found) { var _mask = instance_create(0, y, obj_fusuma_mask); mask = _mask; if (far_background) _mask.depth = 15775099; else _mask.depth = depth - 1; _mask.fusuma[0] = id; _mask.far_background = far_background; _mask.count++; _mask.image_yscale = 2; _mask.image_xscale = 2; _mask.mask_height = _mask.sprite_height; _mask.first = false; _found = true; if (object_index == obj_plat_fusumawall) _mask.mask_height = max(_mask.mask_height, image_yscale * 20); } } }
()
2
{
3
    if (other.y == y && far_background == other.far_background)
4
    {
5
        mask = other;
6
        other.fusuma[other.count] = id;
7
        other.count++;
8
        if (other.depth > depth && !far_background)
9
            other.depth = depth - 1;
10
        if (object_index == obj_plat_fusumawall)
11
            other.mask_height = max(other.mask_height, image_yscale * 20);
12
    }
13
    else
14
    {
15
        var _found = false;
16
        with (obj_fusuma_mask)
17
        {
18
            if (other.y == y && far_background == other.far_background)
19
            {
20
                other.mask = self;
21
                fusuma[count] = other;
22
                count++;
23
                if (depth > other.depth && !far_background)
24
                    depth = other.depth - 1;
25
                _found = true;
26
                if (other.object_index == obj_plat_fusumawall)
27
                    mask_height = max(mask_height, other.image_yscale * 20);
28
                break;
29
            }
30
        }
31
        if (!_found)
32
        {
33
            var _mask = instance_create(0, y, obj_fusuma_mask);
34
            mask = _mask;
35
            if (far_background)
36
                _mask.depth = 15775099;
37
            else
38
                _mask.depth = depth - 1;
39
            _mask.fusuma[0] = id;
40
            _mask.far_background = far_background;
41
            _mask.count++;
42
            _mask.image_yscale = 2;
43
            _mask.image_xscale = 2;
44
            _mask.mask_height = _mask.sprite_height;
45
            _mask.first = false;
46
            _found = true;
47
            if (object_index == obj_plat_fusumawall)
48
                _mask.mask_height = max(_mask.mask_height, image_yscale * 20);
49
        }
50
    }
51
}