Follow-up to #49.
Allowed toggling HD image loading in-game; changed some names; other minor formatting changes. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -55,7 +55,7 @@ public class CircumscribedCircle extends Curve {
|
||||
|
||||
/** The number of steps in the curve to draw. */
|
||||
private float step;
|
||||
|
||||
|
||||
/** Points along the curve. */
|
||||
private Vec2f[] curve;
|
||||
|
||||
@@ -123,7 +123,8 @@ public class CircumscribedCircle extends Curve {
|
||||
// finds the angles to draw for repeats
|
||||
this.drawEndAngle = (float) ((endAng + (startAng > endAng ? HALF_PI : -HALF_PI)) * 180 / Math.PI);
|
||||
this.drawStartAngle = (float) ((startAng + (startAng > endAng ? -HALF_PI : HALF_PI)) * 180 / Math.PI);
|
||||
|
||||
|
||||
// calculate points
|
||||
curve = new Vec2f[(int) step + 1];
|
||||
for (int i = 0; i < curve.length; i++) {
|
||||
float[] xy = pointAt(i / step);
|
||||
@@ -181,9 +182,8 @@ public class CircumscribedCircle extends Curve {
|
||||
public void draw() {
|
||||
Image hitCircle = GameImage.HITCIRCLE.getImage();
|
||||
Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage();
|
||||
for (int i = 0; i < step; i++) {
|
||||
for (int i = 0; i < step; i++)
|
||||
hitCircleOverlay.drawCentered(curve[i].x, curve[i].y, Utils.COLOR_WHITE_FADE);
|
||||
}
|
||||
for (int i = 0; i < step; i++)
|
||||
hitCircle.drawCentered(curve[i].x, curve[i].y, color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user