From 7126cd58a564de31c351e4312f11c13f884e747e Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 10 Dec 2016 17:33:34 +0100 Subject: [PATCH] add option to disable hit animations (close #95) --- src/itdelatrisu/opsu/GameData.java | 3 ++- src/itdelatrisu/opsu/Options.java | 7 +++++++ src/itdelatrisu/opsu/states/OptionsMenu.java | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/itdelatrisu/opsu/GameData.java b/src/itdelatrisu/opsu/GameData.java index f85221ff..28459a92 100644 --- a/src/itdelatrisu/opsu/GameData.java +++ b/src/itdelatrisu/opsu/GameData.java @@ -897,7 +897,8 @@ public class GameData { } // hit animation - if (hitResult.result != HIT_MISS && ( + if (Options.isHitAnimationEnabled() && + hitResult.result != HIT_MISS && ( hitResult.hitResultType == null || // null => initial slider circle hitResult.hitResultType == HitObjectType.CIRCLE || hitResult.hitResultType == HitObjectType.SLIDER_FIRST || diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index 5759e65b..8b7072cc 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -514,6 +514,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_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), @@ -1715,6 +1716,12 @@ public class Options { */ public static boolean isHitLightingEnabled() { return GameOption.SHOW_HIT_LIGHTING.getBooleanValue(); } + /** + * Returns whether or not hit animation effects are enabled. + * @return true if enabled + */ + public static boolean isHitAnimationEnabled() { return GameOption.SHOW_HIT_ANIMATIONS.getBooleanValue(); } + /** * Returns whether or not combo burst effects are enabled. * @return true if enabled diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index 6f0cb44b..75856068 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -86,6 +86,7 @@ public class OptionsMenu extends BasicGameState { GameOption.FALLBACK_SLIDERS, GameOption.MERGING_SLIDERS, GameOption.SHOW_HIT_LIGHTING, + GameOption.SHOW_HIT_ANIMATIONS, GameOption.SHOW_COMBO_BURSTS, GameOption.SHOW_PERFECT_HIT, GameOption.SHOW_FOLLOW_POINTS,