summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e88a2d)
raw | patch | inline | side by side (parent: 1e88a2d)
author | fred-boy <fred-boy@protonmail.com> | |
Wed, 25 Apr 2018 07:02:20 +0000 (14:02 +0700) | ||
committer | fred-boy <fred-boy@protonmail.com> | |
Wed, 25 Apr 2018 07:02:20 +0000 (14:02 +0700) |
16 files changed:
diff --git a/core/src/ru/deadsoftware/cavecraft/CaveGame.java b/core/src/ru/deadsoftware/cavecraft/CaveGame.java
index c03d568670367a338792348bb7175482f29acb7d..edf3206373448cdd9a59102cfcbfbb10ee0faf59 100644 (file)
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
+import ru.deadsoftware.cavecraft.misc.AppState;
public class CaveGame extends Game {
diff --git a/core/src/ru/deadsoftware/cavecraft/GameScreen.java b/core/src/ru/deadsoftware/cavecraft/GameScreen.java
index 37dc45e9a438fb415510d1d241ce5af1ad1c0c98..d359fe92030420e7baa1abf591848bf946143b4e 100644 (file)
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 {
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameInput.java b/core/src/ru/deadsoftware/cavecraft/game/GameInput.java
index 2ff2fa3d933e0d2093fd0bfcb24d215c351279d6..bded5818b071d57a703cba3a9dc7a4af1fec2bba 100644 (file)
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 {
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java b/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java
index 07587e688129906f76e67401b01f8afd15b01778..5677c2426fa5f8e1ef47e959870ae8dfb0038e38 100644 (file)
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;
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameProc.java b/core/src/ru/deadsoftware/cavecraft/game/GameProc.java
index 29b3d3b8a39b6a1efcb9aaa805e5e4cf3657c2fd..ccf5e2bb6546981c52e141820f80d408c3ec0dc6 100644 (file)
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;
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java
index 2db89c345912f1bca64c97a241b4b4798f9e6de6..7f693c4b20f587776da84664e021bb7d9385ebc2 100644 (file)
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;
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java b/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java
index e86fb3a5e5a5ecbf0c5b2ada365a7ef61c4aee3f..7885d2e8ea4bf98d5d18a3e237d3b100e950e490 100644 (file)
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Vector2;
-import ru.deadsoftware.cavecraft.Items;
public class GameWorld {
diff --git a/core/src/ru/deadsoftware/cavecraft/Items.java b/core/src/ru/deadsoftware/cavecraft/game/Items.java
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)
rename from core/src/ru/deadsoftware/cavecraft/Items.java
rename to core/src/ru/deadsoftware/cavecraft/game/Items.java
index 001ac291667a69a55431b1a82f33038a6e3f49dd..e28062f1177b99d1d498dd128f6838882730a532 100644 (file)
-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 {
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]));
diff --git a/core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java b/core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java
index 61ab375a7a10f310fb89e74ef1afd1733f0be873..cfa932a84822a6f87a2bb7269ca3e25ef23fc5a3 100644 (file)
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;
diff --git a/core/src/ru/deadsoftware/cavecraft/game/mobs/Pig.java b/core/src/ru/deadsoftware/cavecraft/game/mobs/Pig.java
index 7b922381c69d3f2c4fe172c5d479444104089cf3..879b66760cc082b0c0ee751f651da49092a22931 100644 (file)
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{
diff --git a/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java b/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java
index faf1eb3f15ec3d36b11a45a4ff7ed1ec897b4f6c..acfad3d6f29b50138b901a9986ad658d7500c7fb 100644 (file)
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 {
diff --git a/core/src/ru/deadsoftware/cavecraft/AppState.java b/core/src/ru/deadsoftware/cavecraft/misc/AppState.java
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)
rename from core/src/ru/deadsoftware/cavecraft/AppState.java
rename to core/src/ru/deadsoftware/cavecraft/misc/AppState.java
index be651384954e2e252dc9a0f6eabda09108c5f6a5..7a86332c074babdf0f7add72f8673b8de7160637 100644 (file)
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
public enum AppState {
GOTO_NEW_GAME,
diff --git a/core/src/ru/deadsoftware/cavecraft/Assets.java b/core/src/ru/deadsoftware/cavecraft/misc/Assets.java
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)
rename from core/src/ru/deadsoftware/cavecraft/Assets.java
rename to core/src/ru/deadsoftware/cavecraft/misc/Assets.java
index 6a992ef067cd5eaf1f2c95e0dc13acc22bb00bb3..f3d1226df70edfc4ff838fa1616997821a17dfb3 100644 (file)
-package ru.deadsoftware.cavecraft;
+package ru.deadsoftware.cavecraft.misc;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
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 {
diff --git a/core/src/ru/deadsoftware/cavecraft/InputHandlerGame.java b/core/src/ru/deadsoftware/cavecraft/misc/InputHandlerGame.java
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)
rename from core/src/ru/deadsoftware/cavecraft/InputHandlerGame.java
rename to core/src/ru/deadsoftware/cavecraft/misc/InputHandlerGame.java
index e22caec183bf6c522cc31db12a2a97739b1e889d..ffc38ccea589e80007e41a40c5c4af664472ef3e 100644 (file)
-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;
diff --git a/core/src/ru/deadsoftware/cavecraft/InputHandlerMenu.java b/core/src/ru/deadsoftware/cavecraft/misc/InputHandlerMenu.java
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)
rename from core/src/ru/deadsoftware/cavecraft/InputHandlerMenu.java
rename to core/src/ru/deadsoftware/cavecraft/misc/InputHandlerMenu.java
index 232e217c028c3154e56e821b12dcb1325157f446..74110ea0b88dafbc77b229a7cb5045e4c17d87b1 100644 (file)
-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;
@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);
diff --git a/core/src/ru/deadsoftware/cavecraft/Renderer.java b/core/src/ru/deadsoftware/cavecraft/misc/Renderer.java
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)
rename from core/src/ru/deadsoftware/cavecraft/Renderer.java
rename to core/src/ru/deadsoftware/cavecraft/misc/Renderer.java
index 43ea03e4a39a4df24555792331479627a237457f..f083a326e9e00d08cf5bd77c6b2875d6b910a1ca 100644 (file)
-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 {