removed guice dependency which was a spaceshuttle used to cross the road
This commit is contained in:
parent
9d0ddc5fd0
commit
2ed0254c34
22
pom.xml
22
pom.xml
|
@ -144,28 +144,6 @@
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.inject</groupId>
|
|
||||||
<artifactId>guice</artifactId>
|
|
||||||
<version>4.1.0</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.ow2.asm</groupId>
|
|
||||||
<artifactId>asm</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>cglib</groupId>
|
|
||||||
<artifactId>cglib</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<!--
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.inject.extensions</groupId>
|
|
||||||
<artifactId>guice-assistedinject</artifactId>
|
|
||||||
<version>4.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jcraft</groupId>
|
<groupId>org.jcraft</groupId>
|
||||||
<artifactId>jorbis</artifactId>
|
<artifactId>jorbis</artifactId>
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance;
|
package yugecin.opsudance;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import itdelatrisu.opsu.Options;
|
import itdelatrisu.opsu.Options;
|
||||||
import itdelatrisu.opsu.Utils;
|
import itdelatrisu.opsu.Utils;
|
||||||
import itdelatrisu.opsu.db.DBController;
|
import itdelatrisu.opsu.db.DBController;
|
||||||
|
@ -45,7 +44,6 @@ public class OpsuDance {
|
||||||
|
|
||||||
private ServerSocket singleInstanceSocket;
|
private ServerSocket singleInstanceSocket;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public OpsuDance(DisplayContainer container) {
|
public OpsuDance(DisplayContainer container) {
|
||||||
this.container = container;
|
this.container = container;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance;
|
package yugecin.opsudance;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import itdelatrisu.opsu.NativeLoader;
|
import itdelatrisu.opsu.NativeLoader;
|
||||||
import itdelatrisu.opsu.Options;
|
import itdelatrisu.opsu.Options;
|
||||||
import org.newdawn.slick.util.FileSystemLocation;
|
import org.newdawn.slick.util.FileSystemLocation;
|
||||||
|
@ -30,7 +29,6 @@ import java.lang.reflect.Field;
|
||||||
|
|
||||||
public class PreStartupInitializer {
|
public class PreStartupInitializer {
|
||||||
|
|
||||||
@Inject
|
|
||||||
public PreStartupInitializer() {
|
public PreStartupInitializer() {
|
||||||
loadNatives();
|
loadNatives();
|
||||||
setResourcePath();
|
setResourcePath();
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core;
|
package yugecin.opsudance.core;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import org.newdawn.slick.Graphics;
|
import org.newdawn.slick.Graphics;
|
||||||
import org.newdawn.slick.Input;
|
import org.newdawn.slick.Input;
|
||||||
import org.newdawn.slick.KeyListener;
|
import org.newdawn.slick.KeyListener;
|
||||||
|
@ -47,7 +46,6 @@ public class Demux implements ErrorDumpable, KeyListener, MouseListener {
|
||||||
|
|
||||||
private OpsuState state;
|
private OpsuState state;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public Demux(final InstanceContainer instanceContainer) {
|
public Demux(final InstanceContainer instanceContainer) {
|
||||||
this.instanceContainer = instanceContainer;
|
this.instanceContainer = instanceContainer;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core;
|
package yugecin.opsudance.core;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import itdelatrisu.opsu.GameImage;
|
import itdelatrisu.opsu.GameImage;
|
||||||
import itdelatrisu.opsu.ui.Fonts;
|
import itdelatrisu.opsu.ui.Fonts;
|
||||||
import org.lwjgl.LWJGLException;
|
import org.lwjgl.LWJGLException;
|
||||||
|
@ -72,7 +71,6 @@ public class DisplayContainer implements ErrorDumpable {
|
||||||
private String glVersion;
|
private String glVersion;
|
||||||
private String glVendor;
|
private String glVendor;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public DisplayContainer(Demux demux, EventBus eventBus) {
|
public DisplayContainer(Demux demux, EventBus eventBus) {
|
||||||
this.demux = demux;
|
this.demux = demux;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core.events;
|
package yugecin.opsudance.core.events;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -26,7 +24,6 @@ public class EventBus {
|
||||||
|
|
||||||
private final List<Subscriber> subscribers;
|
private final List<Subscriber> subscribers;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public EventBus() {
|
public EventBus() {
|
||||||
subscribers = new LinkedList<>();
|
subscribers = new LinkedList<>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core.state.specialstates;
|
package yugecin.opsudance.core.state.specialstates;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import itdelatrisu.opsu.ui.Fonts;
|
import itdelatrisu.opsu.ui.Fonts;
|
||||||
import org.newdawn.slick.Color;
|
import org.newdawn.slick.Color;
|
||||||
import org.newdawn.slick.Graphics;
|
import org.newdawn.slick.Graphics;
|
||||||
|
@ -33,7 +32,6 @@ public class FpsRenderState implements EventListener<ResolutionChangedEvent> {
|
||||||
private int y;
|
private int y;
|
||||||
private int singleHeight;
|
private int singleHeight;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public FpsRenderState(DisplayContainer displayContainer) {
|
public FpsRenderState(DisplayContainer displayContainer) {
|
||||||
this.displayContainer = displayContainer;
|
this.displayContainer = displayContainer;
|
||||||
displayContainer.eventBus.subscribe(ResolutionChangedEvent.class, this);
|
displayContainer.eventBus.subscribe(ResolutionChangedEvent.class, this);
|
||||||
|
|
|
@ -17,12 +17,10 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core.state.transitions;
|
package yugecin.opsudance.core.state.transitions;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import yugecin.opsudance.core.DisplayContainer;
|
import yugecin.opsudance.core.DisplayContainer;
|
||||||
|
|
||||||
public class EmptyTransitionState extends TransitionState {
|
public class EmptyTransitionState extends TransitionState {
|
||||||
|
|
||||||
@Inject
|
|
||||||
public EmptyTransitionState(DisplayContainer displayContainer) {
|
public EmptyTransitionState(DisplayContainer displayContainer) {
|
||||||
super(displayContainer);
|
super(displayContainer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,10 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core.state.transitions;
|
package yugecin.opsudance.core.state.transitions;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import yugecin.opsudance.core.DisplayContainer;
|
import yugecin.opsudance.core.DisplayContainer;
|
||||||
|
|
||||||
public class FadeInTransitionState extends FadeTransitionState {
|
public class FadeInTransitionState extends FadeTransitionState {
|
||||||
|
|
||||||
@Inject
|
|
||||||
public FadeInTransitionState(DisplayContainer container) {
|
public FadeInTransitionState(DisplayContainer container) {
|
||||||
super(container);
|
super(container);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,10 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.core.state.transitions;
|
package yugecin.opsudance.core.state.transitions;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import yugecin.opsudance.core.DisplayContainer;
|
import yugecin.opsudance.core.DisplayContainer;
|
||||||
|
|
||||||
public class FadeOutTransitionState extends FadeTransitionState {
|
public class FadeOutTransitionState extends FadeTransitionState {
|
||||||
|
|
||||||
@Inject
|
|
||||||
public FadeOutTransitionState(DisplayContainer container) {
|
public FadeOutTransitionState(DisplayContainer container) {
|
||||||
super(container);
|
super(container);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.errorhandling;
|
package yugecin.opsudance.errorhandling;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import itdelatrisu.opsu.Options;
|
import itdelatrisu.opsu.Options;
|
||||||
import itdelatrisu.opsu.Utils;
|
import itdelatrisu.opsu.Utils;
|
||||||
import org.newdawn.slick.util.Log;
|
import org.newdawn.slick.util.Log;
|
||||||
|
@ -54,7 +53,6 @@ public class ErrorHandler {
|
||||||
private boolean preventReport;
|
private boolean preventReport;
|
||||||
private boolean ignoreAndContinue;
|
private boolean ignoreAndContinue;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public ErrorHandler(DisplayContainer displayContainer) {
|
public ErrorHandler(DisplayContainer displayContainer) {
|
||||||
this.displayContainer = displayContainer;
|
this.displayContainer = displayContainer;
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
|
@ -1,47 +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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package yugecin.opsudance.kernel;
|
|
||||||
|
|
||||||
import com.google.inject.Guice;
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
|
|
||||||
public class InstanceContainerImpl implements InstanceContainer {
|
|
||||||
|
|
||||||
private static InstanceContainer instance;
|
|
||||||
|
|
||||||
private Injector injector;
|
|
||||||
|
|
||||||
private InstanceContainerImpl() {
|
|
||||||
injector = Guice.createInjector(new OpsuDanceModule());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static InstanceContainer initialize() {
|
|
||||||
return instance = new InstanceContainerImpl();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static InstanceContainer get() {
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T provide(Class<T> type) {
|
|
||||||
return injector.getInstance(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package yugecin.opsudance.kernel;
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class InstanceResolver implements InstanceContainer {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T provide(Class<T> type) {
|
|
||||||
return InstanceContainerImpl.get().provide(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,55 +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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package yugecin.opsudance.kernel;
|
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import yugecin.opsudance.PreStartupInitializer;
|
|
||||||
import yugecin.opsudance.core.DisplayContainer;
|
|
||||||
import yugecin.opsudance.core.Demux;
|
|
||||||
import yugecin.opsudance.core.events.EventBus;
|
|
||||||
import yugecin.opsudance.core.state.specialstates.FpsRenderState;
|
|
||||||
import yugecin.opsudance.core.state.transitions.EmptyTransitionState;
|
|
||||||
import yugecin.opsudance.errorhandling.ErrorHandler;
|
|
||||||
import yugecin.opsudance.states.EmptyRedState;
|
|
||||||
import yugecin.opsudance.states.EmptyState;
|
|
||||||
import yugecin.opsudance.core.state.transitions.FadeInTransitionState;
|
|
||||||
import yugecin.opsudance.core.state.transitions.FadeOutTransitionState;
|
|
||||||
|
|
||||||
public class OpsuDanceModule extends AbstractModule {
|
|
||||||
|
|
||||||
protected void configure() {
|
|
||||||
bind(EventBus.class).asEagerSingleton();
|
|
||||||
|
|
||||||
bind(InstanceContainer.class).to(InstanceResolver.class);
|
|
||||||
bind(PreStartupInitializer.class).asEagerSingleton();
|
|
||||||
bind(Demux.class).asEagerSingleton();
|
|
||||||
bind(DisplayContainer.class).asEagerSingleton();
|
|
||||||
|
|
||||||
bind(ErrorHandler.class).asEagerSingleton();
|
|
||||||
|
|
||||||
bind(FpsRenderState.class).asEagerSingleton();
|
|
||||||
|
|
||||||
bind(EmptyTransitionState.class).asEagerSingleton();
|
|
||||||
bind(FadeInTransitionState.class).asEagerSingleton();
|
|
||||||
bind(FadeOutTransitionState.class).asEagerSingleton();
|
|
||||||
|
|
||||||
bind(EmptyRedState.class).asEagerSingleton();
|
|
||||||
bind(EmptyState.class).asEagerSingleton();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.states;
|
package yugecin.opsudance.states;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import org.newdawn.slick.Color;
|
import org.newdawn.slick.Color;
|
||||||
import org.newdawn.slick.Graphics;
|
import org.newdawn.slick.Graphics;
|
||||||
import yugecin.opsudance.core.DisplayContainer;
|
import yugecin.opsudance.core.DisplayContainer;
|
||||||
|
@ -32,7 +31,6 @@ public class EmptyRedState implements OpsuState {
|
||||||
|
|
||||||
private final DisplayContainer displayContainer;
|
private final DisplayContainer displayContainer;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public EmptyRedState(DisplayContainer displayContainer) {
|
public EmptyRedState(DisplayContainer displayContainer) {
|
||||||
this.displayContainer = displayContainer;
|
this.displayContainer = displayContainer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package yugecin.opsudance.states;
|
package yugecin.opsudance.states;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import org.newdawn.slick.Color;
|
import org.newdawn.slick.Color;
|
||||||
import org.newdawn.slick.Graphics;
|
import org.newdawn.slick.Graphics;
|
||||||
import yugecin.opsudance.core.DisplayContainer;
|
import yugecin.opsudance.core.DisplayContainer;
|
||||||
|
@ -31,7 +30,6 @@ public class EmptyState implements OpsuState {
|
||||||
|
|
||||||
private final DisplayContainer displayContainer;
|
private final DisplayContainer displayContainer;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public EmptyState(DisplayContainer displayContainer) {
|
public EmptyState(DisplayContainer displayContainer) {
|
||||||
this.displayContainer = displayContainer;
|
this.displayContainer = displayContainer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user