diff --git a/src/yugecin/opsudance/OpsuDance.java b/src/yugecin/opsudance/OpsuDance.java index 2fa43c60..b50dd0ec 100644 --- a/src/yugecin/opsudance/OpsuDance.java +++ b/src/yugecin/opsudance/OpsuDance.java @@ -27,7 +27,6 @@ import itdelatrisu.opsu.states.Splash; import org.newdawn.slick.util.Log; import yugecin.opsudance.core.DisplayContainer; import yugecin.opsudance.core.errorhandling.ErrorHandler; -import yugecin.opsudance.states.EmptyState; import java.io.File; import java.io.IOException; @@ -63,7 +62,6 @@ public class OpsuDance { initUpdater(args); sout("database & updater initialized"); - //container.init(EmptyState.class); container.init(Splash.class); } catch (Exception e) { errorAndExit("startup failure", e); diff --git a/src/yugecin/opsudance/core/inject/OpsuDanceInjector.java b/src/yugecin/opsudance/core/inject/OpsuDanceInjector.java index 2e42e883..9c9d4479 100644 --- a/src/yugecin/opsudance/core/inject/OpsuDanceInjector.java +++ b/src/yugecin/opsudance/core/inject/OpsuDanceInjector.java @@ -27,8 +27,6 @@ import yugecin.opsudance.core.state.transitions.EmptyTransitionState; import yugecin.opsudance.core.state.transitions.FadeInTransitionState; import yugecin.opsudance.core.state.transitions.FadeOutTransitionState; import yugecin.opsudance.core.errorhandling.ErrorHandler; -import yugecin.opsudance.states.EmptyRedState; -import yugecin.opsudance.states.EmptyState; public class OpsuDanceInjector extends Injector { @@ -46,9 +44,6 @@ public class OpsuDanceInjector extends Injector { bind(FadeInTransitionState.class).asEagerSingleton(); bind(FadeOutTransitionState.class).asEagerSingleton(); - bind(EmptyRedState.class).asEagerSingleton(); - bind(EmptyState.class).asEagerSingleton(); - bind(Splash.class).asEagerSingleton(); bind(MainMenu.class).asEagerSingleton(); bind(ButtonMenu.class).asEagerSingleton(); diff --git a/src/yugecin/opsudance/states/EmptyRedState.java b/src/yugecin/opsudance/states/EmptyRedState.java deleted file mode 100644 index c86f0812..00000000 --- a/src/yugecin/opsudance/states/EmptyRedState.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * opsu!dance - fork of opsu! with cursordance auto - * Copyright (C) 2017 yugecin - * - * opsu!dance is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * opsu!dance is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with opsu!dance. If not, see . - */ -package yugecin.opsudance.states; - -import org.newdawn.slick.Color; -import org.newdawn.slick.Graphics; -import yugecin.opsudance.core.DisplayContainer; -import yugecin.opsudance.core.events.EventBus; -import yugecin.opsudance.core.state.OpsuState; -import yugecin.opsudance.events.BarNotificationEvent; -import yugecin.opsudance.events.BubbleNotificationEvent; - -import java.io.StringWriter; - -public class EmptyRedState implements OpsuState { - - private int counter; - private long start; - - private final DisplayContainer displayContainer; - - public EmptyRedState(DisplayContainer displayContainer) { - this.displayContainer = displayContainer; - } - - @Override - public void update() { - counter -= displayContainer.delta; - if (counter < 0) { - counter = 10000; // to prevent more calls to switch, as this will keep rendering until state transitioned - System.out.println(System.currentTimeMillis() - start); - displayContainer.switchState(EmptyState.class); - } - } - - @Override - public void preRenderUpdate() { - } - - @Override - public void render(Graphics g) { - g.setColor(Color.red); - g.fillRect(0, 0, 100, 100); - } - - @Override - public void enter() { - counter = 5000; - start = System.currentTimeMillis(); - } - - @Override - public void leave() { - } - - @Override - public boolean onCloseRequest() { - return true; - } - - @Override - public boolean keyPressed(int key, char c) { - EventBus.post(new BubbleNotificationEvent("this is a bubble notification... bubbly bubbly bubbly linewraaaaaaaaaap", BubbleNotificationEvent.COMMONCOLOR_RED)); - return false; - } - - @Override - public boolean keyReleased(int key, char c) { - return false; - } - - @Override - public boolean mouseWheelMoved(int delta) { - EventBus.post(new BubbleNotificationEvent("Life is like a box of chocolates. It's all going to melt by the end of the day.\n-Emily", BubbleNotificationEvent.COMMONCOLOR_PURPLE)); - return false; - } - - @Override - public boolean mousePressed(int button, int x, int y) { - return false; - } - - @Override - public boolean mouseReleased(int button, int x, int y) { - EventBus.post(new BarNotificationEvent("this is a\nbar notification")); - return false; - } - - @Override - public boolean mouseDragged(int oldx, int oldy, int newx, int newy) { - return false; - } - - @Override - public void writeErrorDump(StringWriter dump) { - dump.append("> EmptyRedState dump\n"); - dump.append("its red\n"); - } - -} diff --git a/src/yugecin/opsudance/states/EmptyState.java b/src/yugecin/opsudance/states/EmptyState.java deleted file mode 100644 index 6a75f783..00000000 --- a/src/yugecin/opsudance/states/EmptyState.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * opsu!dance - fork of opsu! with cursordance auto - * Copyright (C) 2017 yugecin - * - * opsu!dance is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * opsu!dance is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with opsu!dance. If not, see . - */ -package yugecin.opsudance.states; - -import org.newdawn.slick.Color; -import org.newdawn.slick.Graphics; -import yugecin.opsudance.core.DisplayContainer; -import yugecin.opsudance.core.state.OpsuState; - -import java.io.StringWriter; - -public class EmptyState implements OpsuState { - - private int counter; - - private final DisplayContainer displayContainer; - - public EmptyState(DisplayContainer displayContainer) { - this.displayContainer = displayContainer; - } - - @Override - public void update() { - counter -= displayContainer.delta; - if (counter < 0) { - counter = 10000; // to prevent more calls to switch, as this will keep rending until state transitioned - displayContainer.switchState(EmptyRedState.class); - } - } - - @Override - public void preRenderUpdate() { - } - - @Override - public void render(Graphics g) { - g.setColor(Color.green); - g.fillRect(0, 0, 100, 100); - } - - @Override - public void enter() { - counter = 2000; - } - - @Override - public void leave() { - } - - @Override - public boolean onCloseRequest() { - return true; - } - - @Override - public boolean keyPressed(int key, char c) { - return false; - } - - @Override - public boolean keyReleased(int key, char c) { - return false; - } - - @Override - public boolean mouseWheelMoved(int delta) { - return false; - } - - @Override - public boolean mousePressed(int button, int x, int y) { - return false; - } - - @Override - public boolean mouseReleased(int button, int x, int y) { - return false; - } - - @Override - public boolean mouseDragged(int oldx, int oldy, int newx, int newy) { - return false; - } - - @Override - public void writeErrorDump(StringWriter dump) { - dump.append("> EmptyState dump\n"); - dump.append("its green\n"); - } - -}