1 | l = 0; |
2 | t = 0; |
3 | fw = sprite_width * image_xscale; |
4 | fh = sprite_height * image_yscale; |
5 | ll = (argument0 - x) + 1; |
6 | tt = (argument2 - y) + 1; |
7 | ww = (x + fw) - argument1 - 1; |
8 | hh = (y + fh) - argument3 - 1; |
9 | if (ll > 0) |
10 | l += ll; |
11 | if (tt > 0) |
12 | t += tt; |
13 | if (ww > 0) |
14 | fw -= ww; |
15 | if (hh > 0) |
16 | fh -= hh; |
17 | w = round(fw / image_xscale); |
18 | h = round(fh / image_yscale); |
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 / image_xscale, t / image_yscale, w - (l / image_xscale), h - (t / image_yscale), x + l, y + t, image_xscale, image_yscale, c_white, image_alpha); |
25 | } |