diff --git a/src/ei/engine/LWJGLGameWindow.java b/src/ei/engine/LWJGLGameWindow.java index 62c2bb3..f21d8fc 100644 --- a/src/ei/engine/LWJGLGameWindow.java +++ b/src/ei/engine/LWJGLGameWindow.java @@ -108,7 +108,9 @@ public class LWJGLGameWindow { // Enable Smooth Shading GL11.glShadeModel(GL11.GL_SMOOTH); // disable the OpenGL depth test since we're rendering 2D graphics - GL11.glDisable(GL11.GL_DEPTH_TEST); + //GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDepthFunc(GL11.GL_LEQUAL); // disable lights (we do not nead them) GL11.glDisable(GL11.GL_LIGHTING); // Black Background @@ -129,7 +131,7 @@ public class LWJGLGameWindow { //Reset The Projection Matrix GL11.glLoadIdentity(); //turn on 2D mode - GL11.glOrtho(0.0f, width, height, 0, -1, 1); + GL11.glOrtho(0.0f, width, height, 0, -100, 100); // Select The Modelview Matrix (controls model orientation) GL11.glMatrixMode(GL11.GL_MODELVIEW); diff --git a/src/ei/engine/scene/Entity.java b/src/ei/engine/scene/Entity.java index cc8d355..81028c5 100644 --- a/src/ei/engine/scene/Entity.java +++ b/src/ei/engine/scene/Entity.java @@ -73,7 +73,7 @@ public abstract class Entity { * @param l The location of the entity */ public void setLocation(Vector2f l) { - location = new Vector3f(l.getX(),l.getY(),getLocation().getZ()); + location = new Vector3f(l.getX(),l.getY(), location.getZ()); } /** diff --git a/src/ei/engine/texture/TextureLoader.java b/src/ei/engine/texture/TextureLoader.java index 71db05e..48c510b 100644 --- a/src/ei/engine/texture/TextureLoader.java +++ b/src/ei/engine/texture/TextureLoader.java @@ -196,7 +196,8 @@ public class TextureLoader { * @param texture The texture to store the data into * @return A buffer containing the data */ - private ByteBuffer convertImageData(BufferedImage bufferedImage,Texture texture) { + @SuppressWarnings("unchecked") + private ByteBuffer convertImageData(BufferedImage bufferedImage,Texture texture) { ByteBuffer imageBuffer = null; WritableRaster raster; BufferedImage texImage; diff --git a/src/ei/game/scene/Map.java b/src/ei/game/scene/Map.java index fb45126..0b2b2d3 100644 --- a/src/ei/game/scene/Map.java +++ b/src/ei/game/scene/Map.java @@ -76,7 +76,7 @@ public class Map implements TileMap, TileSet, PathFinderCallback{ for(int i=0; i