From 4f0f093b756c7135d8b80a7a9e3da80b858398d9 Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Mon, 23 Feb 2015 18:12:31 -0500 Subject: [PATCH] Very slightly tweaked slider rendering. Increased color alpha level, and don't fade the begin/end circles. Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/objects/Slider.java | 8 +++----- .../opsu/objects/curves/CircumscribedCircle.java | 11 +++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index b12bb36f..79140bf1 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -148,12 +148,10 @@ public class Slider implements HitObject { float scale = timeDiff / (float) game.getApproachTime(); float approachScale = 1 + scale * 3; float x = hitObject.getX(), y = hitObject.getY(); + float alpha = Utils.clamp(1 - scale, 0, 1); float oldAlpha = color.a; - float oldAlphaFade = Utils.COLOR_WHITE_FADE.a; - float alpha = (1 - scale); - color.a = Utils.clamp(alpha * 0.5f, 0, 1); - alpha = Utils.clamp(alpha, 0, 1); + color.a = alpha; Utils.COLOR_WHITE_FADE.a = alpha; // curve @@ -171,6 +169,7 @@ public class Slider implements HitObject { Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage(); Image hitCircle = GameImage.HITCIRCLE.getImage(); color.a = alpha; + Utils.COLOR_WHITE_FADE.a = 1f; // end circle float[] endPos = curve.pointAt(1); @@ -187,7 +186,6 @@ public class Slider implements HitObject { hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight()); color.a = oldAlpha; - Utils.COLOR_WHITE_FADE.a = oldAlphaFade; // repeats for(int tcurRepeat = currentRepeats; tcurRepeat<=currentRepeats+1; tcurRepeat++){ diff --git a/src/itdelatrisu/opsu/objects/curves/CircumscribedCircle.java b/src/itdelatrisu/opsu/objects/curves/CircumscribedCircle.java index 84302c04..743f0974 100644 --- a/src/itdelatrisu/opsu/objects/curves/CircumscribedCircle.java +++ b/src/itdelatrisu/opsu/objects/curves/CircumscribedCircle.java @@ -172,14 +172,13 @@ public class CircumscribedCircle extends Curve { public void draw() { Image hitCircle = GameImage.HITCIRCLE.getImage(); Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage(); + float[][] xy = new float[(int) step + 1][]; for (int i = 0; i < step; i++) { - float[] xy = pointAt(i / step); - hitCircleOverlay.drawCentered(xy[0], xy[1], Utils.COLOR_WHITE_FADE); - } - for (int i = 0; i < step; i++) { - float[] xy = pointAt(i / step); - hitCircle.drawCentered(xy[0], xy[1], color); + xy[i] = pointAt(i / step); + hitCircleOverlay.drawCentered(xy[i][0], xy[i][1], Utils.COLOR_WHITE_FADE); } + for (int i = 0; i < step; i++) + hitCircle.drawCentered(xy[i][0], xy[i][1], color); } @Override