Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_sprite_mirror

(view raw script w/o annotations or w/e)
1
function sprite_mirror(arg0, arg1)
2
{
3
    if (arg0)
4
    {
5
        var _bb = bbox_left;
6
        image_xscale *= -1;
7
        x -= (bbox_left - _bb);
8
    }
9
    if (arg1)
10
    {
11
        var _bb = bbox_top;
12
        image_yscale *= -1;
13
        y -= (bbox_top - _bb);
14
    }
15
}