| 1 |
if (x != global.idealborder[0]) |
| 2 |
{ |
| 3 |
if (abs(x - global.idealborder[0]) <= 15) |
| 4 |
x = global.idealborder[0]; |
| 5 |
else if (x > global.idealborder[0]) |
| 6 |
x -= 15; |
| 7 |
else |
| 8 |
x += 15; |
| 9 |
} |
| 10 |
if (y != global.idealborder[3]) |
| 11 |
{ |
| 12 |
if (abs(y - global.idealborder[3]) <= 15) |
| 13 |
{ |
| 14 |
y = global.idealborder[3]; |
| 15 |
} |
| 16 |
else |
| 17 |
{ |
| 18 |
if (y > global.idealborder[3]) |
| 19 |
y -= 15; |
| 20 |
else |
| 21 |
y += 15; |
| 22 |
if (obj_uborder.y > global.idealborder[2] && obj_dborder.y > global.idealborder[3]) |
| 23 |
y -= 15; |
| 24 |
if (obj_uborder.y < global.idealborder[2] && obj_dborder.y < global.idealborder[3]) |
| 25 |
y += 15; |
| 26 |
} |
| 27 |
} |
| 28 |
size = round((global.idealborder[2] - global.idealborder[3]) / 5); |
| 29 |
if (x == global.idealborder[0] || global.idealborder[2] > (y + (image_yscale * 5))) |
| 30 |
{ |
| 31 |
if (image_yscale != size) |
| 32 |
{ |
| 33 |
if (abs(size - image_yscale) <= 3) |
| 34 |
image_yscale = size; |
| 35 |
if (image_yscale > size) |
| 36 |
image_yscale -= 3; |
| 37 |
if (image_yscale < size) |
| 38 |
image_yscale += 3; |
| 39 |
if (obj_uborder.y > global.idealborder[2] && obj_dborder.y > global.idealborder[3]) |
| 40 |
image_yscale += 3; |
| 41 |
if (obj_uborder.y < global.idealborder[2] && obj_dborder.y < global.idealborder[3]) |
| 42 |
image_yscale -= 3; |
| 43 |
} |
| 44 |
} |
| 45 |
y = obj_dborder.y; |
| 46 |
image_yscale = (obj_uborder.y - obj_dborder.y) / 5; |
| 47 |
if (instaborder == 1) |
| 48 |
{ |
| 49 |
x = global.idealborder[0]; |
| 50 |
y = global.idealborder[2]; |
| 51 |
image_yscale = (global.idealborder[3] - global.idealborder[2]) / 5; |
| 52 |
} |