diff --git a/core/assets/spritesheets/icon.jpg b/core/assets/spritesheets/icon.jpg new file mode 100644 index 0000000..002162c Binary files /dev/null and b/core/assets/spritesheets/icon.jpg differ diff --git a/core/src/com/game/Game.java b/core/src/com/game/Game.java index a7bafb4..6a92990 100644 --- a/core/src/com/game/Game.java +++ b/core/src/com/game/Game.java @@ -2,6 +2,7 @@ package com.game; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.Texture; @@ -9,6 +10,9 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.game.Misc.Vars; import com.game.States.StateManager; +import javax.swing.*; +import java.awt.*; + public class Game extends ApplicationAdapter { private float accum; @@ -20,14 +24,13 @@ public class Game extends ApplicationAdapter { private StateManager sm; @Override - public void create () { + public void create() { sb = new SpriteBatch(); cam = new OrthographicCamera(); cam.setToOrtho(false, Vars.SCREEN_WIDTH, Vars.SCREEN_HEIGHT); hudCam = new OrthographicCamera(); hudCam.setToOrtho(false, Vars.SCREEN_WIDTH, Vars.SCREEN_HEIGHT); - sm = new StateManager(this); } diff --git a/core/src/com/game/Misc/Vars.java b/core/src/com/game/Misc/Vars.java index ad53080..8d1b46e 100644 --- a/core/src/com/game/Misc/Vars.java +++ b/core/src/com/game/Misc/Vars.java @@ -2,6 +2,8 @@ package com.game.Misc; import com.badlogic.gdx.math.Vector2; +import java.io.File; + /** * Created by Ash on 08/02/2016. */ @@ -20,8 +22,6 @@ public class Vars { public static final float TILESIZE = 64f; public static final Vector2 SCROLLSPEED = new Vector2(150, 0); - - // Filter bits public static final short BIT_RED = 2; public static final short BIT_GREEN = 4; diff --git a/desktop/src/com/game/desktop/DesktopLauncher.java b/desktop/src/com/game/desktop/DesktopLauncher.java index b4242cf..0678d37 100644 --- a/desktop/src/com/game/desktop/DesktopLauncher.java +++ b/desktop/src/com/game/desktop/DesktopLauncher.java @@ -1,7 +1,9 @@ package com.game.desktop; +import com.badlogic.gdx.Files; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; +import com.badlogic.gdx.graphics.PixmapIO; import com.game.Game; import com.game.Misc.Vars; @@ -13,5 +15,6 @@ public class DesktopLauncher { config.width = Vars.SCREEN_WIDTH; config.height = Vars.SCREEN_HEIGHT; config.resizable = Vars.RESIZABLE; + config.addIcon("spritesheets/icon.jpg", Files.FileType.Internal); } }