From 6f46092766013c95ccc1af46928d5619a5c5ca06 Mon Sep 17 00:00:00 2001 From: yugecin Date: Mon, 12 Dec 2016 08:33:57 +0100 Subject: [PATCH 1/2] follow-up to 1bf9186: don't color the reversearrow black on bright combo color, add mirror reverseerror fade out --- src/itdelatrisu/opsu/GameData.java | 5 +++++ src/itdelatrisu/opsu/objects/Slider.java | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/itdelatrisu/opsu/GameData.java b/src/itdelatrisu/opsu/GameData.java index 4fc84f19..d8beae19 100644 --- a/src/itdelatrisu/opsu/GameData.java +++ b/src/itdelatrisu/opsu/GameData.java @@ -1213,6 +1213,11 @@ public class GameData { public void sendRepeatSliderResult(int time, float x, float y, Color color, Curve curve, HitObjectType type) { hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, x, y, color, type, curve, true, true)); + if (Options.isMirror()) { + return; + } + float[] m = Utils.mirrorPoint(x, y); + hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, m[0], m[1], color, type, curve, true, true)); } /** diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 12d8fd83..41b9a0b4 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -660,9 +660,7 @@ public class Slider extends GameObject { posX = this.x; posY = this.y; } - float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; - Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; - data.sendRepeatSliderResult(trackPosition, posX, posY, arrowColor, curve, type); + data.sendRepeatSliderResult(trackPosition, posX, posY, Color.white, curve, type); } } From 1c5f66f1493262f537f553f4b3fc86e78ed33c90 Mon Sep 17 00:00:00 2001 From: yugecin Date: Mon, 12 Dec 2016 08:37:21 +0100 Subject: [PATCH 2/2] Option to disable reverse arrow hit anim --- src/itdelatrisu/opsu/Options.java | 7 ++++++ src/itdelatrisu/opsu/objects/Slider.java | 28 +++++++++++++----------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index 71cc6dbf..c4020cc8 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -512,6 +512,7 @@ public class Options { }, SHOW_HIT_LIGHTING ("Show Hit Lighting", "HitLighting", "Adds an effect behind hit explosions.", true), SHOW_HIT_ANIMATIONS ("Show Hit Animations", "HitAnimations", "Fade out circles and curves.", true), + SHOW_REVERSEARROW_ANIMATIONS ("Show reverse arrow animations", "ReverseArrowAnimations", "Fade out reverse arrows after passing.", true), SHOW_COMBO_BURSTS ("Show Combo Bursts", "ComboBurst", "A character image is displayed at combo milestones.", true), SHOW_PERFECT_HIT ("Show Perfect Hits", "PerfectHit", "Whether to show perfect hit result bursts (300s, slider ticks).", true), SHOW_FOLLOW_POINTS ("Show Follow Points", "FollowPoints", "Whether to show follow points between hit objects.", true), @@ -1423,6 +1424,12 @@ public class Options { */ public static boolean isHitAnimationEnabled() { return GameOption.SHOW_HIT_ANIMATIONS.getBooleanValue(); } + /** + * Returns whether or not hit animation effects are enabled. + * @return true if enabled + */ + public static boolean isReverseArrowAnimationEnabled() { return GameOption.SHOW_REVERSEARROW_ANIMATIONS.getBooleanValue(); } + /** * Returns whether or not combo burst effects are enabled. * @return true if enabled diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 41b9a0b4..b61725c1 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -647,20 +647,22 @@ public class Slider extends GameObject { isNewRepeat = true; tickExpandTime = TICK_EXPAND_TIME; - // send hit result, to fade out reversearrow - HitObjectType type; - float posX, posY; - if (currentRepeats % 2 == 1) { - type = HitObjectType.SLIDER_LAST; - Vec2f endPos = curve.pointAt(1); - posX = endPos.x; - posY = endPos.y; - } else { - type = HitObjectType.SLIDER_FIRST; - posX = this.x; - posY = this.y; + if (Options.isReverseArrowAnimationEnabled()) { + // send hit result, to fade out reversearrow + HitObjectType type; + float posX, posY; + if (currentRepeats % 2 == 1) { + type = HitObjectType.SLIDER_LAST; + Vec2f endPos = curve.pointAt(1); + posX = endPos.x; + posY = endPos.y; + } else { + type = HitObjectType.SLIDER_FIRST; + posX = this.x; + posY = this.y; + } + data.sendRepeatSliderResult(trackPosition, posX, posY, Color.white, curve, type); } - data.sendRepeatSliderResult(trackPosition, posX, posY, Color.white, curve, type); } }