working splash state
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
package yugecin.opsudance.core;
|
||||
|
||||
import itdelatrisu.opsu.GameImage;
|
||||
import itdelatrisu.opsu.Options;
|
||||
import itdelatrisu.opsu.ui.Fonts;
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.Sys;
|
||||
@@ -29,6 +30,7 @@ import org.newdawn.slick.Graphics;
|
||||
import org.newdawn.slick.Input;
|
||||
import org.newdawn.slick.KeyListener;
|
||||
import org.newdawn.slick.MouseListener;
|
||||
import org.newdawn.slick.openal.SoundStore;
|
||||
import org.newdawn.slick.opengl.InternalTextureLoader;
|
||||
import org.newdawn.slick.opengl.renderer.Renderer;
|
||||
import org.newdawn.slick.opengl.renderer.SGL;
|
||||
@@ -70,7 +72,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||
|
||||
private OpsuState state;
|
||||
|
||||
private final DisplayMode nativeDisplayMode;
|
||||
public final DisplayMode nativeDisplayMode;
|
||||
|
||||
private Graphics graphics;
|
||||
private Input input;
|
||||
@@ -204,7 +206,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||
Display.setDisplayMode(new DisplayMode(100, 100));
|
||||
Display.create();
|
||||
GLHelper.setIcons(new String[] { "icon16.png", "icon32.png" });
|
||||
setDisplayMode(800, 600, false);
|
||||
Options.setDisplayMode(this);
|
||||
sout("GL ready");
|
||||
glVersion = GL11.glGetString(GL11.GL_VERSION);
|
||||
glVendor = GL11.glGetString(GL11.GL_VENDOR);
|
||||
@@ -257,6 +259,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||
graphics.setAntiAlias(false);
|
||||
|
||||
input = new Input(height);
|
||||
input.enableKeyRepeat();
|
||||
input.addKeyListener(this);
|
||||
input.addMouseListener(this);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package yugecin.opsudance.core.inject;
|
||||
|
||||
import itdelatrisu.opsu.states.Splash;
|
||||
import yugecin.opsudance.PreStartupInitializer;
|
||||
import yugecin.opsudance.core.DisplayContainer;
|
||||
import yugecin.opsudance.core.events.EventBus;
|
||||
@@ -50,6 +51,8 @@ public class OpsuDanceInjector extends Injector {
|
||||
|
||||
bind(EmptyRedState.class).asEagerSingleton();
|
||||
bind(EmptyState.class).asEagerSingleton();
|
||||
|
||||
bind(Splash.class).asEagerSingleton();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package yugecin.opsudance.core.state;
|
||||
|
||||
import org.newdawn.slick.Graphics;
|
||||
import yugecin.opsudance.core.DisplayContainer;
|
||||
import yugecin.opsudance.core.events.EventListener;
|
||||
import yugecin.opsudance.events.ResolutionChangedEvent;
|
||||
@@ -41,6 +42,18 @@ public abstract class BaseOpsuState implements OpsuState, EventListener<Resoluti
|
||||
protected void revalidate() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preRenderUpdate() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics g) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(ResolutionChangedEvent event) {
|
||||
if (isCurrentState) {
|
||||
|
||||
Reference in New Issue
Block a user