From fa57e63a2faccb55e82039ff67b7fe8888a41d3d Mon Sep 17 00:00:00 2001 From: yugecin Date: Thu, 29 Sep 2016 23:34:11 +0200 Subject: [PATCH] option to hide approach circles --- src/itdelatrisu/opsu/Options.java | 14 ++++++++++++++ src/itdelatrisu/opsu/objects/Circle.java | 3 ++- src/itdelatrisu/opsu/objects/Slider.java | 3 ++- src/itdelatrisu/opsu/states/OptionsMenu.java | 1 + src/yugecin/opsudance/Dancer.java | 1 + 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index cbedc144..6ef0585a 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -652,6 +652,20 @@ public class Options { } }, + DANCE_DRAW_APPROACH ("Draw approach circles", "DrawApproach", "Can get a bit busy when using mirror collage", true) { + @Override + public void click(GameContainer container) { + bool = !bool; + Dancer.drawApproach = bool; + } + + @Override + public void read(String s) { + super.read(s); + Dancer.drawApproach = bool; + } + }, + PIPPI_ENABLE ("Pippi", "Pippi", "Move in circles like dancing pippi (osu! april fools joke 2016)", false) { // TODO }, diff --git a/src/itdelatrisu/opsu/objects/Circle.java b/src/itdelatrisu/opsu/objects/Circle.java index f76460b8..93ce8fab 100644 --- a/src/itdelatrisu/opsu/objects/Circle.java +++ b/src/itdelatrisu/opsu/objects/Circle.java @@ -32,6 +32,7 @@ import itdelatrisu.opsu.ui.Colors; import org.newdawn.slick.Color; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; +import yugecin.opsudance.Dancer; /** * Data type representing a circle object. @@ -120,7 +121,7 @@ public class Circle extends GameObject { float oldAlpha = Colors.WHITE_FADE.a; Colors.WHITE_FADE.a = color.a = alpha; - if (timeDiff >= 0 && !GameMod.HIDDEN.isActive()) + if (timeDiff >= 0 && !GameMod.HIDDEN.isActive() && Dancer.drawApproach) GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale).drawCentered(x, y, color); GameImage.HITCIRCLE.getImage().drawCentered(x, y, color); boolean overlayAboveNumber = Options.getSkin().isHitCircleOverlayAboveNumber(); diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 8e9a6eb1..9552d6a9 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -37,6 +37,7 @@ import org.newdawn.slick.Color; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; +import yugecin.opsudance.Dancer; /** * Data type representing a slider object. @@ -296,7 +297,7 @@ public class Slider extends GameObject { if (mirror) { g.rotate(x, y, -180f); } - if (!GameMod.HIDDEN.isActive()) { + if (!GameMod.HIDDEN.isActive() && Dancer.drawApproach) { GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale).drawCentered(x, y, color); } g.popTransform(); diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index 64921270..1ce8dc83 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -111,6 +111,7 @@ public class OptionsMenu extends BasicGameState { GameOption.DANCE_CIRCLE_STREAMS, GameOption.DANCE_ONLY_CIRCLE_STACKS, GameOption.DANCE_MIRROR, + GameOption.DANCE_DRAW_APPROACH, }), PIPPI ("Pippi", new GameOption[] { GameOption.PIPPI_ENABLE, diff --git a/src/yugecin/opsudance/Dancer.java b/src/yugecin/opsudance/Dancer.java index 319f68de..86dbf990 100644 --- a/src/yugecin/opsudance/Dancer.java +++ b/src/yugecin/opsudance/Dancer.java @@ -51,6 +51,7 @@ public class Dancer { public static Dancer instance = new Dancer(); public static boolean mirror; // this should really get its own place somewhere... + public static boolean drawApproach; // this should really get its own place somewhere... private int dir; private GameObject p;