summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 95d5ff1)
raw | patch | inline | side by side (parent: 95d5ff1)
author | fred-boy <fredboy@protonmail.com> | |
Mon, 23 Dec 2019 08:28:31 +0000 (15:28 +0700) | ||
committer | fred-boy <fredboy@protonmail.com> | |
Mon, 23 Dec 2019 08:28:31 +0000 (15:28 +0700) |
14 files changed:
diff --git a/core/src/ru/deadsoftware/cavedroid/game/GamePhysics.java b/core/src/ru/deadsoftware/cavedroid/game/GamePhysics.java
index ed31da7433799f44ed0544f8f8f5d5aedd9aea2d..8ebb260cb8c3d39c227de71339babd835e7f910b 100644 (file)
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
-import org.jetbrains.annotations.NotNull;
import ru.deadsoftware.cavedroid.CaveGame;
import ru.deadsoftware.cavedroid.game.mobs.Mob;
import ru.deadsoftware.cavedroid.game.mobs.Player;
*
* @return true if mob should jump
*/
- private boolean checkJump(@NotNull Mob mob) {
+ private boolean checkJump(Mob mob) {
int dir = mob.looksLeft() ? 0 : 1;
int blX = (int) (mob.getX() + mob.getWidth() * dir - 8 + 16 * dir);
int blY = (int) (mob.getY() + mob.getHeight() - 8);
(mob.getY() + mob.getHeight()) - GameItems.getBlock(block).getRect(blX / 16, blY / 16).y > 8);
}
- private boolean checkColl(@NotNull Rectangle rect) {
+ private boolean checkColl(Rectangle rect) {
int minX = (int) ((rect.x + rect.width / 2) / 16) - 4;
int minY = (int) ((rect.y + rect.height / 2) / 16) - 4;
int maxX = (int) ((rect.x + rect.width / 2) / 16) + 4;
return false;
}
- private int getBlock(@NotNull Rectangle rect) {
+ private int getBlock(Rectangle rect) {
return GP.world.getForeMap((int) (rect.x + rect.width / 2) / 16,
(int) (rect.y + rect.height / 8 * 7) / 16);
}
diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameSaver.java b/core/src/ru/deadsoftware/cavedroid/game/GameSaver.java
index 49822863f876b074fe28f25e10aab9a376951aab..38e295931f27b864ed98fa94ecad05698e323e94 100644 (file)
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
-import org.jetbrains.annotations.NotNull;
import ru.deadsoftware.cavedroid.CaveGame;
import java.io.*;
private static final int VERSION = 0;
- @NotNull
+
private static byte[] intToBytes(int i) {
return ByteBuffer.allocate(4).putInt(i).array();
}
- private static void saveMap(@NotNull FileHandle file, @NotNull int[][] map) throws IOException {
+ private static void saveMap(FileHandle file, int[][] map) throws IOException {
int rl, bl;
int width = map.length;
int height = map[0].length;
out.close();
}
- @NotNull
- private static int[][] loadMap(@NotNull FileHandle file) throws Exception {
+
+ private static int[][] loadMap(FileHandle file) throws Exception {
int[][] map;
int ver, width, height;
int rl, bl;
diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameWorld.java b/core/src/ru/deadsoftware/cavedroid/game/GameWorld.java
index 0c4435045898d292016c756237a3adb758471ecd..01ddee9c111de4c81be866d4293cb7497d77b503 100644 (file)
package ru.deadsoftware.cavedroid.game;
-import org.jetbrains.annotations.NotNull;
import ru.deadsoftware.cavedroid.game.objects.Block;
import ru.deadsoftware.cavedroid.game.objects.Drop;
WorldGen.clear();
}
- GameWorld(@NotNull int[][] foreMap, @NotNull int[][] backMap) {
+ GameWorld(int[][] foreMap, int[][] backMap) {
this.foreMap = foreMap.clone();
this.backMap = backMap.clone();
WIDTH = foreMap.length;
diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/FallingGravel.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/FallingGravel.java
index fb567049394d79329a7ced59fb7a770c1224f2e3..c46def34abd58598d3655979ed25fbd6e2c6c32f 100644 (file)
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;
-import org.jetbrains.annotations.NotNull;
import ru.deadsoftware.cavedroid.misc.Assets;
import static ru.deadsoftware.cavedroid.GameScreen.GP;
}
@Override
- public void draw(@NotNull SpriteBatch spriteBatch, float x, float y) {
+ public void draw(SpriteBatch spriteBatch, float x, float y) {
spriteBatch.draw(Assets.gravelSprite, x, y);
}
diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/FallingSand.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/FallingSand.java
index 0f44f051e6645df7d785f6ae40180be01a9ba308..ee310e44179f1c557c512a0cd720a8dc4d41f384 100644 (file)
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;
-import org.jetbrains.annotations.NotNull;
import ru.deadsoftware.cavedroid.misc.Assets;
import static ru.deadsoftware.cavedroid.GameScreen.GP;
}
@Override
- public void draw(@NotNull SpriteBatch spriteBatch, float x, float y) {
+ public void draw(SpriteBatch spriteBatch, float x, float y) {
spriteBatch.draw(Assets.sandSprite, x, y);
}
diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/package-info.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.game.mobs;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/game/objects/package-info.java b/core/src/ru/deadsoftware/cavedroid/game/objects/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.game.objects;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/game/package-info.java b/core/src/ru/deadsoftware/cavedroid/game/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.game;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/menu/objects/package-info.java b/core/src/ru/deadsoftware/cavedroid/menu/objects/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.menu.objects;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/menu/package-info.java b/core/src/ru/deadsoftware/cavedroid/menu/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.menu;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/menu/submenus/package-info.java b/core/src/ru/deadsoftware/cavedroid/menu/submenus/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.menu.submenus;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/package-info.java b/core/src/ru/deadsoftware/cavedroid/misc/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.misc;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/states/package-info.java b/core/src/ru/deadsoftware/cavedroid/misc/states/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid.misc.states;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/package-info.java b/core/src/ru/deadsoftware/cavedroid/package-info.java
--- /dev/null
@@ -0,0 +1,4 @@
+@ParametersAreNonnullByDefault
+package ru.deadsoftware.cavedroid;
+
+import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file