Fixed HANE's degree of jump up curve.
authorKoichi KAMICHI <kamichi@fonts.jp>
Mon, 9 Aug 2010 10:25:56 +0000 (10:25 +0000)
committerKoichi KAMICHI <kamichi@fonts.jp>
Mon, 9 Aug 2010 10:25:56 +0000 (10:25 +0000)
engine/kagecd.js

index a6c6410..1bc8525 100755 (executable)
@@ -534,25 +534,13 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t
     }\r
     \r
     if(a2 == 15){ //jump up ... it can change 15->5\r
-      if(sy2 == y2){\r
-        poly = new Polygon();\r
-        poly.push(x2, y2 - kMinWidthT + 1);\r
-        poly.push(x2 + 2, y2 - kMinWidthT - kage.kWidth * 5);\r
-        poly.push(x2, y2 - kMinWidthT - kage.kWidth * 5);\r
-        poly.push(x2 - kMinWidthT, y2 - kMinWidthT + 1);\r
-        polygons.push(poly);\r
-      }\r
-      else{\r
-        poly = new Polygon();\r
-        poly.push(x2 + (kMinWidthT - 1) * Math.sin(rad) * v, y2 - (kMinWidthT - 1) * Math.cos(rad) * v);\r
-        poly.push(x2 + 2 * Math.cos(rad) * v + (kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
-                  y2 + 2 * Math.sin(rad) * v - (kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
-        poly.push(x2 + (kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
-                  y2 - (kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
-        poly.push(x2 + (kMinWidthT - 1) * Math.sin(rad) * v - kMinWidthT * Math.cos(rad) * v,\r
-                  y2 - (kMinWidthT - 1) * Math.cos(rad) * v - kMinWidthT * Math.sin(rad) * v);\r
-        polygons.push(poly);\r
-      }\r
+      // anytime same degree\r
+      poly = new Polygon();\r
+      poly.push(x2, y2 - kMinWidthT + 1);\r
+      poly.push(x2 + 2, y2 - kMinWidthT - kage.kWidth * 5);\r
+      poly.push(x2, y2 - kMinWidthT - kage.kWidth * 5);\r
+      poly.push(x2 - kMinWidthT, y2 - kMinWidthT + 1);\r
+      polygons.push(poly);\r
     }\r
     \r
     if(a2 == 14){ //jump to left, allways go left\r