From 5061b45f84b2cfa5508bac12dde664ae92245d74 Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Wed, 18 Mar 2015 23:23:34 -0400 Subject: [PATCH] Added an option to disable follow points. Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/Options.java | 12 ++++++++++++ src/itdelatrisu/opsu/states/Game.java | 2 ++ src/itdelatrisu/opsu/states/OptionsMenu.java | 1 + 3 files changed, 15 insertions(+) diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index b429edb5..442f3217 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -194,6 +194,7 @@ public class Options { SHOW_HIT_LIGHTING ("Show Hit Lighting", "Adds an effect behind hit explosions.", true), SHOW_COMBO_BURSTS ("Show Combo Bursts", "A character image is displayed at combo milestones.", true), SHOW_PERFECT_HIT ("Show Perfect Hits", "Whether to show perfect hit result bursts (300s, slider ticks).", true), + SHOW_FOLLOW_POINTS ("Show Follow Points", "Whether to show follow points between hit objects.", true), NEW_CURSOR ("Enable New Cursor", "Use the new cursor style (may cause higher CPU usage).", true) { @Override public void click(GameContainer container) { @@ -604,6 +605,12 @@ public class Options { */ public static boolean isPerfectHitBurstEnabled() { return GameOption.SHOW_PERFECT_HIT.getBooleanValue(); } + /** + * Returns whether or not to show follow points. + * @return true if enabled + */ + public static boolean isFollowPointEnabled() { return GameOption.SHOW_FOLLOW_POINTS.getBooleanValue(); } + /** * Returns the background dim level. * @return the alpha level [0, 1] @@ -1025,6 +1032,9 @@ public class Options { case "PerfectHit": GameOption.SHOW_PERFECT_HIT.setValue(Boolean.parseBoolean(value)); break; + case "FollowPoints": + GameOption.SHOW_FOLLOW_POINTS.setValue(Boolean.parseBoolean(value)); + break; case "ScoreMeter": GameOption.SHOW_HIT_ERROR_BAR.setValue(Boolean.parseBoolean(value)); break; @@ -1141,6 +1151,8 @@ public class Options { writer.newLine(); writer.write(String.format("PerfectHit = %b", isPerfectHitBurstEnabled())); writer.newLine(); + writer.write(String.format("FollowPoints = %b", isFollowPointEnabled())); + writer.newLine(); writer.write(String.format("ScoreMeter = %b", isHitErrorBarEnabled())); writer.newLine(); writer.write(String.format("LoadHDImages = %b", loadHDImages())); diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 5ef48656..d8072988 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1195,6 +1195,8 @@ public class Game extends BasicGameState { stack.add(index); // draw follow points + if (!Options.isFollowPointEnabled()) + continue; if (osu.objects[index].isSpinner()) { lastObjectIndex = -1; continue; diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index 3eab6709..dc63b301 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -76,6 +76,7 @@ public class OptionsMenu extends BasicGameState { GameOption.SHOW_HIT_LIGHTING, GameOption.SHOW_COMBO_BURSTS, GameOption.SHOW_PERFECT_HIT, + GameOption.SHOW_FOLLOW_POINTS, GameOption.SHOW_HIT_ERROR_BAR }), INPUT ("Input", new GameOption[] {