diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index 96a20d35..cbedc144 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -638,6 +638,20 @@ public class Options { } }, + DANCE_MIRROR ("Mirror collage", "MirrorCollage", "Hypnotizing stuff", false) { + @Override + public void click(GameContainer container) { + bool = !bool; + Dancer.mirror = bool; + } + + @Override + public void read(String s) { + super.read(s); + Dancer.mirror = bool; + } + }, + PIPPI_ENABLE ("Pippi", "Pippi", "Move in circles like dancing pippi (osu! april fools joke 2016)", false) { // TODO }, diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 93c2e0f0..ae892fd7 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -601,11 +601,13 @@ public class Game extends BasicGameState { UI.draw(g, replayX, replayY, replayKeyPressed); else if (GameMod.AUTO.isActive()) { UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, autoMousePressed); - double dx = autoMousePosition.x - Options.width / 2d; - double dy = autoMousePosition.y - Options.height / 2d; - double d = Math.sqrt(dx * dx + dy * dy); - double a = Math.atan2(dy, dx) + Math.PI; - mirrorCursor.draw((int) (Math.cos(a) * d + Options.width / 2), (int) (Math.sin(a) * d + Options.height / 2), autoMousePressed); + if (Dancer.mirror) { + double dx = autoMousePosition.x - Options.width / 2d; + double dy = autoMousePosition.y - Options.height / 2d; + double d = Math.sqrt(dx * dx + dy * dy); + double a = Math.atan2(dy, dx) + Math.PI; + mirrorCursor.draw((int) (Math.cos(a) * d + Options.width / 2), (int) (Math.sin(a) * d + Options.height / 2), autoMousePressed); + } } else if (GameMod.AUTOPILOT.isActive()) UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, Utils.isGameKeyPressed()); @@ -1397,10 +1399,12 @@ public class Game extends BasicGameState { // normal case if (!loseState) { gameObj.draw(g, trackPosition, false); - g.pushTransform(); - g.rotate(Options.width / 2f, Options.height / 2f, 180f); - gameObj.draw(g, trackPosition, true); - g.popTransform(); + if (Dancer.mirror) { + g.pushTransform(); + g.rotate(Options.width / 2f, Options.height / 2f, 180f); + gameObj.draw(g, trackPosition, true); + g.popTransform(); + } } // death: make objects "fall" off the screen else { diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index 09387891..64921270 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -110,6 +110,7 @@ public class OptionsMenu extends BasicGameState { GameOption.DANCE_LAZY_SLIDERS, GameOption.DANCE_CIRCLE_STREAMS, GameOption.DANCE_ONLY_CIRCLE_STACKS, + GameOption.DANCE_MIRROR, }), PIPPI ("Pippi", new GameOption[] { GameOption.PIPPI_ENABLE, diff --git a/src/yugecin/opsudance/Dancer.java b/src/yugecin/opsudance/Dancer.java index 5b0197d3..319f68de 100644 --- a/src/yugecin/opsudance/Dancer.java +++ b/src/yugecin/opsudance/Dancer.java @@ -50,6 +50,8 @@ public class Dancer { public static Dancer instance = new Dancer(); + public static boolean mirror; // this should really get its own place somewhere... + private int dir; private GameObject p; private Random rand;