1 |
if (image_alpha < 1) |
2 |
{ |
3 |
if (sourcePlatter.image_angle == 90) |
4 |
scr_drawpart_cropscr_drawpart_cropfunction scr_drawpart_crop(arg0, arg1, arg2, arg3)
{
var _true_xanchor = x - abs(sprite_xoffset);
var _true_yanchor = y - abs(sprite_yoffset);
if (_true_xanchor > arg0 && (_true_xanchor + sprite_width) < arg2 && _true_yanchor > arg1 && (_true_yanchor + sprite_height) < arg3)
{
draw_self();
exit;
}
var _leftcrop = clamp(arg0 - _true_xanchor, 0, abs(sprite_width));
var _topcrop = clamp(arg1 - _true_yanchor, 0, abs(sprite_height));
var _rightcrop = clamp(arg2 - _true_xanchor, 0, abs(sprite_width));
var _bottomcrop = clamp(arg3 - _true_yanchor, 0, abs(sprite_height));
draw_sprite_part_ext(sprite_index, image_index, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (x - sprite_xoffset) + _leftcrop, (y - sprite_yoffset) + _topcrop, image_xscale, image_yscale, image_blend, image_alpha);
} (sourcePlatter.platterLid.x, y - 9, sourcePlatter.platterPlate.x, y + 9); |
5 |
else if (sourcePlatter.image_angle == 270 || sourcePlatter.image_angle == -90) |
6 |
scr_drawpart_cropscr_drawpart_cropfunction scr_drawpart_crop(arg0, arg1, arg2, arg3)
{
var _true_xanchor = x - abs(sprite_xoffset);
var _true_yanchor = y - abs(sprite_yoffset);
if (_true_xanchor > arg0 && (_true_xanchor + sprite_width) < arg2 && _true_yanchor > arg1 && (_true_yanchor + sprite_height) < arg3)
{
draw_self();
exit;
}
var _leftcrop = clamp(arg0 - _true_xanchor, 0, abs(sprite_width));
var _topcrop = clamp(arg1 - _true_yanchor, 0, abs(sprite_height));
var _rightcrop = clamp(arg2 - _true_xanchor, 0, abs(sprite_width));
var _bottomcrop = clamp(arg3 - _true_yanchor, 0, abs(sprite_height));
draw_sprite_part_ext(sprite_index, image_index, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (x - sprite_xoffset) + _leftcrop, (y - sprite_yoffset) + _topcrop, image_xscale, image_yscale, image_blend, image_alpha);
} (sourcePlatter.platterPlate.x, y - 9, sourcePlatter.platterLid.x, y + 9); |
7 |
else |
8 |
scr_drawpart_cropscr_drawpart_cropfunction scr_drawpart_crop(arg0, arg1, arg2, arg3)
{
var _true_xanchor = x - abs(sprite_xoffset);
var _true_yanchor = y - abs(sprite_yoffset);
if (_true_xanchor > arg0 && (_true_xanchor + sprite_width) < arg2 && _true_yanchor > arg1 && (_true_yanchor + sprite_height) < arg3)
{
draw_self();
exit;
}
var _leftcrop = clamp(arg0 - _true_xanchor, 0, abs(sprite_width));
var _topcrop = clamp(arg1 - _true_yanchor, 0, abs(sprite_height));
var _rightcrop = clamp(arg2 - _true_xanchor, 0, abs(sprite_width));
var _bottomcrop = clamp(arg3 - _true_yanchor, 0, abs(sprite_height));
draw_sprite_part_ext(sprite_index, image_index, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (x - sprite_xoffset) + _leftcrop, (y - sprite_yoffset) + _topcrop, image_xscale, image_yscale, image_blend, image_alpha);
} (x - 17, sourcePlatter.platterLid.y, x + 17, sourcePlatter.platterPlate.y); |
9 |
} |
10 |
else |
11 |
{ |
12 |
draw_self(); |
13 |
} |