//----------------------------------------// Name: MaskCheck()//----------------------------------------public MaskCheck(x,y,width,height,angle){ new dist = max(width,height); new ang = floatround(floatdiv(float(angle), 45.00)) * 45; new chk[5] = {0,23,45,68,90}; new point[5]; new string[20]; /*for(new n; n < 3; n++) { new float: fx = float(dist) * Cos(ang - 45 + (45 * n)); new float: fy = float(dist) * Sin(ang - 45 + (45 * n)); point[n] = DCheckMask(clamp(floatround((x + (width / 2)) - fx),x + (width / 5),x + width - (width / 5)),clamp(floatround((y + (height / 2)) - fy),y + (height / 5),y + height - (height / 5)),true); } return min(min(point[0], point[1]), point[2]); */ for(new n; n < 5; n++) { new fx = floatround(float(dist) * Cos((ang - 45 + chk[n]))); new fy = floatround(float(dist) * Sin((ang - 45 + chk[n]))); point[n] = DCheckMask(clamp((x + (width / 2)) - fx,x + (width / 5),x + width - (width / 5)),clamp((y + (height / 2)) - fy,y + (height / 5),y + height - (height / 5)),true); } return min(min(min(point[0], point[1]), min(point[2], point[3])),point[4]);}

//----------------------------------------// Name: MaskCheck()//----------------------------------------public MaskCheck(x,y,width,height,angle){ new dist = max(width,height); new ang = floatround(floatdiv(float(angle), 45.00)) * 45; new chk[5] = {0,35,45,55,90}; new point[5]; for(new n; n < 5; n++) { new fx = floatround(float(dist) * Cos(((ang - 45 + chk[n])%360))); new fy = floatround(float(dist) * Sin((ang - 45 + chk[n])%360)); point[n] = DCheckMask(clamp((x + (width / 2)) - fx,x + (width / 5),x + width - (width / 5)),clamp((y + (height / 2)) - fy,y + (height / 5),y + height - (height / 5)),true); } return min(min(min(point[0], point[1]), min(point[2], point[3])),point[4]);}