Undertale script viewer

← back to main script listing

gml_Script_draw_self_border_ext

(view raw script w/o annotations or w/e)
1
l = 0;
2
t = 0;
3
w = sprite_width;
4
h = sprite_height;
5
ll = (global.idealborder[0] - x) + 1;
6
tt = (global.idealborder[2] - y) + 1;
7
ww = ((x + w) - global.idealborder[1]) + 1;
8
hh = ((y + h) - global.idealborder[3]) + 1;
9
if (ll > 0)
10
    l += ll;
11
if (tt > 0)
12
    t += tt;
13
if (ww > 0)
14
    w -= ww;
15
if (hh > 0)
16
    h -= hh;
17
w = round(w);
18
h = round(h);
19
l = round(l);
20
t = round(t);
21
if (w > 0 && h > 0)
22
{
23
    if (l < w && t < h)
24
        draw_sprite_part_ext(sprite_index, image_index, l, t, w - l, h - t, x + l, y + t, argument0, argument1, argument2, argument3);
25
}