From 70d006b645b3014161605c2a0c24720d55c41526 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 1 Oct 2016 13:12:02 +0200 Subject: [PATCH 1/3] make reversearrows scale to the bpm --- src/itdelatrisu/opsu/objects/Slider.java | 6 +++++- src/itdelatrisu/opsu/states/Game.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 0e7fd12f..052ef735 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -32,7 +32,6 @@ import itdelatrisu.opsu.states.Game; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.animations.AnimationEquation; -import org.lwjgl.opengl.GL11; import org.newdawn.slick.Color; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; @@ -114,6 +113,8 @@ public class Slider extends GameObject { private static Color curveColor = new Color(0, 0, 0, 20); + public static double bpm; + /** * Initializes the Slider data type with images and dimensions. * @param container the game container @@ -282,6 +283,9 @@ public class Slider extends GameObject { arrow.setAlpha((float) (t - Math.floor(t))); } else arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); + float sc = (float) (1 + 0.3d * (trackPosition % bpm) / bpm); + System.out.println(sc); + arrow = arrow.getScaledCopy(sc); if (tcurRepeat % 2 == 0) { // last circle arrow.setRotation(curve.getEndAngle()); diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index f6374db2..6a5acd3a 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1313,6 +1313,8 @@ public class Game extends BasicGameState { SoundController.mute(false); } + Slider.bpm = beatmap.bpmMin * GameMod.getSpeedMultiplier(); + skipButton.resetHover(); if (isReplay || GameMod.AUTO.isActive()) playbackSpeed.getButton().resetHover(); From 9dc566ca4e266bda76f7a8a267286888f61e2115 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 1 Oct 2016 13:14:31 +0200 Subject: [PATCH 2/3] always use white reversearrows --- src/itdelatrisu/opsu/objects/Slider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 052ef735..1b44341d 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -274,8 +274,9 @@ public class Slider extends GameObject { for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) { if (hitObject.getRepeatCount() - 1 > tcurRepeat) { Image arrow = GameImage.REVERSEARROW.getImage(); - float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; - Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; + //float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; + //Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; + Color arrowColor = Color.white; if (tcurRepeat != currentRepeats) { if (sliderTime == 0) continue; From 58b22cadd6fdd72f25054d3c3b9a127ad3161318 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 1 Oct 2016 13:14:58 +0200 Subject: [PATCH 3/3] remove debug println --- src/itdelatrisu/opsu/objects/Slider.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 1b44341d..e8160e55 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -284,9 +284,7 @@ public class Slider extends GameObject { arrow.setAlpha((float) (t - Math.floor(t))); } else arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); - float sc = (float) (1 + 0.3d * (trackPosition % bpm) / bpm); - System.out.println(sc); - arrow = arrow.getScaledCopy(sc); + arrow = arrow.getScaledCopy((float) (1 + 0.3d * (trackPosition % bpm) / bpm)); if (tcurRepeat % 2 == 0) { // last circle arrow.setRotation(curve.getEndAngle());