\r
// suiheisen ni setsuzoku 2\r
if(a1 == 22){\r
- var index = 0;\r
- while(true){\r
- if(poly2.array[index].y <= y1 && y1 <= poly2.array[index + 1].y){\r
- break;\r
+ if(x1 > sx1){\r
+ var index = 0;\r
+ while(true){\r
+ if(poly2.array[index].y <= y1 && y1 <= poly2.array[index + 1].y){\r
+ break;\r
+ }\r
+ index++;\r
}\r
- index++;\r
- }\r
- newx1 = poly2.array[index + 1].x + (poly2.array[index].x - poly2.array[index + 1].x) *\r
- (poly2.array[index + 1].y - y1) / (poly2.array[index + 1].y - poly2.array[index].y);\r
- newy1 = y1;\r
- newx2 = poly.array[0].x + (poly.array[0].x - poly.array[1].x - 1) * (poly.array[0].y - y1) /\r
- (poly.array[1].y - poly.array[0].y);\r
- newy2 = y1 + 1;\r
- \r
- for(var i = 0; i < index; i++){\r
- poly2.shift();\r
+ newx1 = poly2.array[index + 1].x + (poly2.array[index].x - poly2.array[index + 1].x) *\r
+ (poly2.array[index + 1].y - y1) / (poly2.array[index + 1].y - poly2.array[index].y);\r
+ newy1 = y1;\r
+ newx2 = poly.array[0].x + (poly.array[0].x - poly.array[1].x - 1) * (poly.array[0].y - y1) /\r
+ (poly.array[1].y - poly.array[0].y);\r
+ newy2 = y1 + 1;\r
+ \r
+ for(var i = 0; i < index; i++){\r
+ poly2.shift();\r
+ }\r
+ poly2.set(0, newx1, newy1);\r
+ poly.unshift(newx2, newy2);\r
}\r
- poly2.set(0, newx1, newy1);\r
- poly.unshift(newx2, newy2);\r
}\r
\r
poly2.reverse();\r
x2 - Math.sin(rad) * kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kMinWidthT) * Math.cos(rad) * v,\r
y2 + Math.cos(rad) * kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kMinWidthT) * Math.sin(rad) * v);\r
break;\r
+ case 24:\r
+ poly.set(1, x2 + (kMinWidthT * v) / Math.sin(rad), y2);\r
+ poly.set(2, x2 - (kMinWidthT * v) / Math.sin(rad), y2);\r
+ break;\r
case 32:\r
poly.set(1, x2 + (kMinWidthT * v) / Math.sin(rad), y2);\r
poly.set(2, x2 - (kMinWidthT * v) / Math.sin(rad), y2);\r
}\r
\r
polygons.push(poly);\r
- \r
+\r
+ if(a2 == 24){ //for T design\r
+ poly = new Polygon();\r
+ poly.push(x2, y2 + kage.kMinWidthY);\r
+ poly.push(x2 + kMinWidthT * 0.5, y2 - kage.kMinWidthY * 4);\r
+ poly.push(x2 + kMinWidthT * 2, y2 - kage.kMinWidthY);\r
+ poly.push(x2 + kMinWidthT * 2, y2 + kage.kMinWidthY);\r
+ polygons.push(poly);\r
+ }\r
+\r
if((a1 == 6) && (a2 == 0 || a2 == 5)){ //KAGI NO YOKO BOU NO SAIGO NO MARU\r
poly = new Polygon();\r
if(kage.kUseCurve){\r
\r
if(a2 == 13 && opt2 == 4){ //for new GTH box's left bottom corner MUKI KANKEINASHI\r
poly = new Polygon();\r
- poly.push(x2 - kMinWidthT, y2 - kage.kMinWidthY * 3);\r
- poly.push(x2 - kMinWidthT * 2, y2);\r
- poly.push(x2 - kage.kMinWidthY, y2 + kage.kMinWidthY * 5);\r
- poly.push(x2 + kMinWidthT, y2 + kage.kMinWidthY);\r
+ var m = 0;\r
+ if(x1 > x2 && y1 != y2){\r
+ m = Math.floor((x1 - x2) / (y2 - y1) * 3);\r
+ }\r
+ poly.push(x2 + m, y2 - kage.kMinWidthY * 5);\r
+ poly.push(x2 - kMinWidthT * 2 + m, y2);\r
+ poly.push(x2 - kage.kMinWidthY + m, y2 + kage.kMinWidthY * 5);\r
+ poly.push(x2 + kMinWidthT + m, y2 + kage.kMinWidthY);\r
+ poly.push(x2 + m, y2);\r
polygons.push(poly);\r
}\r
\r