diff --git a/core/src/net/benmclean/badroguelike/DebugTools/GraphicsViewer.java b/core/src/net/benmclean/badroguelike/DebugTools/GraphicsViewer.java index a264115..c5baaba 100644 --- a/core/src/net/benmclean/badroguelike/DebugTools/GraphicsViewer.java +++ b/core/src/net/benmclean/badroguelike/DebugTools/GraphicsViewer.java @@ -31,7 +31,7 @@ public class GraphicsViewer implements Screen, InputProcessor { private Viewport worldView = new FitViewport(VIRTUAL_WIDTH, VIRTUAL_HEIGHT); private Viewport screenView = new FitViewport(VIRTUAL_WIDTH, VIRTUAL_HEIGHT); private SpriteBatch batch = new SpriteBatch(); - private FrameBuffer frameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, VIRTUAL_HEIGHT, VIRTUAL_WIDTH, true, true); + private FrameBuffer frameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, VIRTUAL_WIDTH, VIRTUAL_HEIGHT, true, true); private Texture screenTexture; private TextureRegion screenRegion = new TextureRegion(); private BitmapFont font = new BitmapFont(Gdx.files.internal("tiny/tiny.fnt")); @@ -44,7 +44,7 @@ public void show() { keyPressed[i] = false; font.setColor(Color.WHITE); screenView.getCamera().position.set(32, 32, 0); - screenView.update(VIRTUAL_HEIGHT, VIRTUAL_WIDTH); + screenView.update(VIRTUAL_WIDTH, VIRTUAL_HEIGHT); Gdx.input.setInputProcessor(this); } diff --git a/core/src/net/benmclean/badroguelike/view/GameScreen.java b/core/src/net/benmclean/badroguelike/view/GameScreen.java index 5da4c1c..a971d5a 100644 --- a/core/src/net/benmclean/badroguelike/view/GameScreen.java +++ b/core/src/net/benmclean/badroguelike/view/GameScreen.java @@ -46,7 +46,7 @@ public GameScreen (long SEED) { private SpriteBatch batch = new SpriteBatch(); private TiledMap map = new TiledMap(); private TiledMapRenderer tiledMapRenderer; - private FrameBuffer frameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, VIRTUAL_HEIGHT, VIRTUAL_WIDTH, true, true); + private FrameBuffer frameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, VIRTUAL_WIDTH, VIRTUAL_HEIGHT, true, true); private Texture screenTexture; private TextureRegion screenRegion = new TextureRegion(); private OrthogonalTiledMapIterator visibleIterator; @@ -62,7 +62,7 @@ public static TiledMapTileLayer.Cell makeCell(TiledMapTile tile) { @Override public void show() { MapLayers layers = map.getLayers(); - TiledMapTileLayer layer = new TiledMapTileLayer(world.SIZE_X, world.SIZE_Y, TILE_HEIGHT, TILE_WIDTH); + TiledMapTileLayer layer = new TiledMapTileLayer(world.SIZE_X, world.SIZE_Y, TILE_WIDTH, TILE_HEIGHT); for (int x = 0; x < world.SIZE_X; x++) { for (int y = 0; y < world.SIZE_Y; y++) { StaticTiledMapTile tile = null; @@ -77,7 +77,7 @@ else if (answer != null) layers.add(layer); tiledMapRenderer = new OrthogonalTiledMapRenderer(map); screenView.getCamera().position.set(32, 32, 0); - screenView.update(VIRTUAL_HEIGHT, VIRTUAL_WIDTH); + screenView.update(VIRTUAL_WIDTH, VIRTUAL_HEIGHT); visibleIterator = new OrthogonalTiledMapIterator((OrthographicCamera) worldView.getCamera(), layer); batch.enableBlending(); @@ -91,7 +91,7 @@ public void render(float delta) { Gdx.gl.glClearColor(worldBackgroundColor.r, worldBackgroundColor.g, worldBackgroundColor.b, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); worldView.apply(); - worldView.getCamera().position.set(world.getPlayerX() * TILE_HEIGHT + 4, world.getPlayerY() * TILE_WIDTH + 4, 0); + worldView.getCamera().position.set(world.getPlayerX() * TILE_WIDTH + 4, world.getPlayerY() * TILE_HEIGHT + 4, 0); worldView.update(VIRTUAL_WIDTH, VIRTUAL_HEIGHT); tiledMapRenderer.setView((OrthographicCamera) worldView.getCamera()); tiledMapRenderer.render();