DEADSOFTWARE

Move misc classes
authorfred-boy <fred-boy@protonmail.com>
Wed, 25 Apr 2018 07:02:20 +0000 (14:02 +0700)
committerfred-boy <fred-boy@protonmail.com>
Wed, 25 Apr 2018 07:02:20 +0000 (14:02 +0700)
16 files changed:
core/src/ru/deadsoftware/cavecraft/CaveGame.java
core/src/ru/deadsoftware/cavecraft/GameScreen.java
core/src/ru/deadsoftware/cavecraft/game/GameInput.java
core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java
core/src/ru/deadsoftware/cavecraft/game/GameProc.java
core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java
core/src/ru/deadsoftware/cavecraft/game/GameWorld.java
core/src/ru/deadsoftware/cavecraft/game/Items.java [moved from core/src/ru/deadsoftware/cavecraft/Items.java with 91% similarity]
core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java
core/src/ru/deadsoftware/cavecraft/game/mobs/Pig.java
core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java
core/src/ru/deadsoftware/cavecraft/misc/AppState.java [moved from core/src/ru/deadsoftware/cavecraft/AppState.java with 81% similarity]
core/src/ru/deadsoftware/cavecraft/misc/Assets.java [moved from core/src/ru/deadsoftware/cavecraft/Assets.java with 98% similarity]
core/src/ru/deadsoftware/cavecraft/misc/InputHandlerGame.java [moved from core/src/ru/deadsoftware/cavecraft/InputHandlerGame.java with 98% similarity]
core/src/ru/deadsoftware/cavecraft/misc/InputHandlerMenu.java [moved from core/src/ru/deadsoftware/cavecraft/InputHandlerMenu.java with 90% similarity]
core/src/ru/deadsoftware/cavecraft/misc/Renderer.java [moved from core/src/ru/deadsoftware/cavecraft/Renderer.java with 92% similarity]

index c03d568670367a338792348bb7175482f29acb7d..edf3206373448cdd9a59102cfcbfbb10ee0faf59 100644 (file)
@@ -2,6 +2,7 @@ package ru.deadsoftware.cavecraft;
 
 import com.badlogic.gdx.Game;
 import com.badlogic.gdx.Gdx;
+import ru.deadsoftware.cavecraft.misc.AppState;
 
 public class CaveGame extends Game {
 
index 37dc45e9a438fb415510d1d241ce5af1ad1c0c98..d359fe92030420e7baa1abf591848bf946143b4e 100644 (file)
@@ -4,7 +4,9 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.Screen;
 import ru.deadsoftware.cavecraft.game.GameProc;
 import ru.deadsoftware.cavecraft.game.GameSaver;
+import ru.deadsoftware.cavecraft.game.Items;
 import ru.deadsoftware.cavecraft.menu.MenuRenderer;
+import ru.deadsoftware.cavecraft.misc.*;
 
 public class GameScreen implements Screen {
 
index 2ff2fa3d933e0d2093fd0bfcb24d215c351279d6..bded5818b071d57a703cba3a9dc7a4af1fec2bba 100644 (file)
@@ -2,10 +2,9 @@ package ru.deadsoftware.cavecraft.game;
 
 import com.badlogic.gdx.Input;
 import com.badlogic.gdx.utils.TimeUtils;
-import ru.deadsoftware.cavecraft.AppState;
-import ru.deadsoftware.cavecraft.Assets;
+import ru.deadsoftware.cavecraft.misc.AppState;
+import ru.deadsoftware.cavecraft.misc.Assets;
 import ru.deadsoftware.cavecraft.CaveGame;
-import ru.deadsoftware.cavecraft.Items;
 
 public class GameInput {
 
index 07587e688129906f76e67401b01f8afd15b01778..5677c2426fa5f8e1ef47e959870ae8dfb0038e38 100644 (file)
@@ -5,7 +5,6 @@ import com.badlogic.gdx.math.MathUtils;
 import com.badlogic.gdx.math.Rectangle;
 import com.badlogic.gdx.math.Vector2;
 import ru.deadsoftware.cavecraft.CaveGame;
-import ru.deadsoftware.cavecraft.Items;
 import ru.deadsoftware.cavecraft.game.mobs.Mob;
 import ru.deadsoftware.cavecraft.game.objects.Player;
 
index 29b3d3b8a39b6a1efcb9aaa805e5e4cf3657c2fd..ccf5e2bb6546981c52e141820f80d408c3ec0dc6 100644 (file)
@@ -2,12 +2,13 @@ package ru.deadsoftware.cavecraft.game;
 
 import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.Input;
-import com.badlogic.gdx.utils.Array;
 import com.badlogic.gdx.utils.TimeUtils;
 import ru.deadsoftware.cavecraft.*;
 import ru.deadsoftware.cavecraft.game.mobs.Mob;
 import ru.deadsoftware.cavecraft.game.mobs.Pig;
 import ru.deadsoftware.cavecraft.game.objects.Player;
+import ru.deadsoftware.cavecraft.misc.AppState;
+import ru.deadsoftware.cavecraft.misc.Assets;
 
 import java.io.Serializable;
 import java.util.ArrayList;
index 2db89c345912f1bca64c97a241b4b4798f9e6de6..7f693c4b20f587776da84664e021bb7d9385ebc2 100644 (file)
@@ -3,10 +3,9 @@ package ru.deadsoftware.cavecraft.game;
 import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.graphics.GL20;
 import com.badlogic.gdx.math.Vector2;
-import ru.deadsoftware.cavecraft.Assets;
+import ru.deadsoftware.cavecraft.misc.Assets;
 import ru.deadsoftware.cavecraft.CaveGame;
-import ru.deadsoftware.cavecraft.Items;
-import ru.deadsoftware.cavecraft.Renderer;
+import ru.deadsoftware.cavecraft.misc.Renderer;
 import ru.deadsoftware.cavecraft.game.mobs.Mob;
 import ru.deadsoftware.cavecraft.game.objects.Player;
 
index e86fb3a5e5a5ecbf0c5b2ada365a7ef61c4aee3f..7885d2e8ea4bf98d5d18a3e237d3b100e950e490 100644 (file)
@@ -2,7 +2,6 @@ package ru.deadsoftware.cavecraft.game;
 
 import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.math.Vector2;
-import ru.deadsoftware.cavecraft.Items;
 
 public class GameWorld {
 
similarity index 91%
rename from core/src/ru/deadsoftware/cavecraft/Items.java
rename to core/src/ru/deadsoftware/cavecraft/game/Items.java
index 001ac291667a69a55431b1a82f33038a6e3f49dd..e28062f1177b99d1d498dd128f6838882730a532 100644 (file)
@@ -1,7 +1,8 @@
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.game;
 
 import com.badlogic.gdx.utils.ArrayMap;
 import ru.deadsoftware.cavecraft.game.objects.Block;
+import ru.deadsoftware.cavecraft.misc.Assets;
 
 public class Items {
 
@@ -9,7 +10,7 @@ public class Items {
 
     public static void loadBlocks() {
         BLOCKS.put("none", null);
-        BLOCKS.put("stone", new Block(0,0,16,16,Assets.blockTextures[0]));
+        BLOCKS.put("stone", new Block(0,0,16,16, Assets.blockTextures[0]));
         BLOCKS.put("grass", new Block(0,0,16,16,Assets.blockTextures[1]));
         BLOCKS.put("dirt", new Block(0,0,16,16,Assets.blockTextures[2]));
         BLOCKS.put("cobblestone", new Block(0,0,16,16,Assets.blockTextures[3]));
index 61ab375a7a10f310fb89e74ef1afd1733f0be873..cfa932a84822a6f87a2bb7269ca3e25ef23fc5a3 100644 (file)
@@ -3,8 +3,7 @@ package ru.deadsoftware.cavecraft.game.mobs;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.math.Rectangle;
 import com.badlogic.gdx.math.Vector2;
-import com.badlogic.gdx.utils.Array;
-import ru.deadsoftware.cavecraft.Assets;
+import ru.deadsoftware.cavecraft.misc.Assets;
 
 import java.io.Serializable;
 
index 7b922381c69d3f2c4fe172c5d479444104089cf3..879b66760cc082b0c0ee751f651da49092a22931 100644 (file)
@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.math.MathUtils;
 import com.badlogic.gdx.math.Rectangle;
 import com.badlogic.gdx.math.Vector2;
-import ru.deadsoftware.cavecraft.Assets;
+import ru.deadsoftware.cavecraft.misc.Assets;
 import ru.deadsoftware.cavecraft.game.GameProc;
 
 public class Pig extends Mob{
index faf1eb3f15ec3d36b11a45a4ff7ed1ec897b4f6c..acfad3d6f29b50138b901a9986ad658d7500c7fb 100644 (file)
@@ -4,7 +4,11 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.utils.Array;
 import ru.deadsoftware.cavecraft.*;
 import ru.deadsoftware.cavecraft.game.GameSaver;
+import ru.deadsoftware.cavecraft.game.Items;
 import ru.deadsoftware.cavecraft.menu.objects.Button;
+import ru.deadsoftware.cavecraft.misc.AppState;
+import ru.deadsoftware.cavecraft.misc.Assets;
+import ru.deadsoftware.cavecraft.misc.Renderer;
 
 public class MenuRenderer extends Renderer {
 
similarity index 81%
rename from core/src/ru/deadsoftware/cavecraft/AppState.java
rename to core/src/ru/deadsoftware/cavecraft/misc/AppState.java
index be651384954e2e252dc9a0f6eabda09108c5f6a5..7a86332c074babdf0f7add72f8673b8de7160637 100644 (file)
@@ -1,4 +1,4 @@
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
 
 public enum AppState {
     GOTO_NEW_GAME,
similarity index 98%
rename from core/src/ru/deadsoftware/cavecraft/Assets.java
rename to core/src/ru/deadsoftware/cavecraft/misc/Assets.java
index 6a992ef067cd5eaf1f2c95e0dc13acc22bb00bb3..f3d1226df70edfc4ff838fa1616997821a17dfb3 100644 (file)
@@ -1,4 +1,4 @@
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
 
 import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.graphics.Texture;
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont;
 import com.badlogic.gdx.graphics.g2d.GlyphLayout;
 import com.badlogic.gdx.graphics.g2d.Sprite;
 import com.badlogic.gdx.graphics.g2d.TextureRegion;
+import ru.deadsoftware.cavecraft.CaveGame;
 
 public class Assets {
 
similarity index 98%
rename from core/src/ru/deadsoftware/cavecraft/InputHandlerGame.java
rename to core/src/ru/deadsoftware/cavecraft/misc/InputHandlerGame.java
index e22caec183bf6c522cc31db12a2a97739b1e889d..ffc38ccea589e80007e41a40c5c4af664472ef3e 100644 (file)
@@ -1,7 +1,8 @@
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
 
 import com.badlogic.gdx.Input;
 import com.badlogic.gdx.InputProcessor;
+import ru.deadsoftware.cavecraft.CaveGame;
 import ru.deadsoftware.cavecraft.game.GameInput;
 import ru.deadsoftware.cavecraft.game.GameProc;
 
similarity index 90%
rename from core/src/ru/deadsoftware/cavecraft/InputHandlerMenu.java
rename to core/src/ru/deadsoftware/cavecraft/misc/InputHandlerMenu.java
index 232e217c028c3154e56e821b12dcb1325157f446..74110ea0b88dafbc77b229a7cb5045e4c17d87b1 100644 (file)
@@ -1,6 +1,7 @@
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
 
 import com.badlogic.gdx.InputProcessor;
+import ru.deadsoftware.cavecraft.GameScreen;
 import ru.deadsoftware.cavecraft.menu.MenuRenderer;
 import ru.deadsoftware.cavecraft.menu.objects.Button;
 
@@ -34,7 +35,7 @@ public class InputHandlerMenu implements InputProcessor{
 
     @Override
     public boolean touchUp(int screenX, int screenY, int pointer, int mb) {
-        screenX *= renderer.getWidth()/GameScreen.getWidth();
+        screenX *= renderer.getWidth()/ GameScreen.getWidth();
         screenY *= renderer.getHeight()/GameScreen.getHeight();
         for (Button button : renderer.menuMainButtons) {
             if (button.getRect().contains(screenX, screenY) && button.getType()>0) renderer.buttonClicked(button);
similarity index 92%
rename from core/src/ru/deadsoftware/cavecraft/Renderer.java
rename to core/src/ru/deadsoftware/cavecraft/misc/Renderer.java
index 43ea03e4a39a4df24555792331479627a237457f..f083a326e9e00d08cf5bd77c6b2875d6b910a1ca 100644 (file)
@@ -1,8 +1,10 @@
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
 
 import com.badlogic.gdx.graphics.OrthographicCamera;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
+import ru.deadsoftware.cavecraft.GameScreen;
+import ru.deadsoftware.cavecraft.misc.Assets;
 
 public abstract class Renderer {