From 95d4f19ad4737fc44a7c9791fa8577a2d513a2f7 Mon Sep 17 00:00:00 2001 From: halotroop2288 Date: Mon, 2 Mar 2020 02:36:19 -0800 Subject: [PATCH] Change the way debug info is shown --- .../com/github/halotroop/litecraft/screens/IngameHUD.java | 8 ++++---- .../github/halotroop/litecraft/screens/TitleScreen.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java b/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java index d067ed7..c889012 100644 --- a/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java +++ b/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java @@ -19,7 +19,7 @@ public class IngameHUD extends Screen { debugText = ginger3D.registerText("Loading...", 2, new Vector2f(0, 0), 1f, true, "debugInfo"); debugText.setBorderWidth(0.5f); - positionText = ginger3D.registerText("Loading...", 2, new Vector2f(0, -0.1f), 1f, true, "debugInfo"); + positionText = ginger3D.registerText("Loading...", 2, new Vector2f(0, -0.1f), 1f, true, "posInfo"); positionText.setBorderWidth(0.5f); } @@ -35,11 +35,11 @@ public class IngameHUD extends Screen // long maxMemory = Runtime.getRuntime().maxMemory(); long totalMemory = Runtime.getRuntime().totalMemory(); long freeMemory = Runtime.getRuntime().freeMemory(); - long usedMemory = totalMemory - freeMemory; + long usedMemory = (totalMemory - freeMemory) / 1024 / 1024; Vector4i dbg = litecraft.dbgStats; Vector3f position = GingerRegister.getInstance().game.data.player.getPosition(); - debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y + " TPS: " + dbg.z + " Mem: " + (usedMemory / 1024 / 1024) + "MB / " + (totalMemory / 1024 / 1024) + " MB"); - positionText.setText("Position " + (int) position.x() + ", " + (int) position.y() + ", "+ (int) position.z() ); + debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y() + " TPS: " + dbg.z() + " TWL: " + dbg.w() + " Mem: " + usedMemory + "MB"); + positionText.setText("Position: " + (int) position.x() + ", " + (int) position.y() + ", "+ (int) position.z() ); } @Override diff --git a/src/main/java/com/github/halotroop/litecraft/screens/TitleScreen.java b/src/main/java/com/github/halotroop/litecraft/screens/TitleScreen.java index 5727aa9..285baea 100644 --- a/src/main/java/com/github/halotroop/litecraft/screens/TitleScreen.java +++ b/src/main/java/com/github/halotroop/litecraft/screens/TitleScreen.java @@ -41,7 +41,7 @@ public class TitleScreen extends Screen public void tick() { Vector4i dbg = litecraft.dbgStats; - debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y + " TPS: " + dbg.z); + debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y() + " TPS: " + dbg.z() + " TWL: " + dbg.w()); playButton.update(); if (playButton.isClicked()) { @@ -49,7 +49,7 @@ public class TitleScreen extends Screen if (Litecraft.getInstance().getWorld() == null) { - Litecraft.getInstance().setSave(new LitecraftSave("cegregatedordinaldata", false)); + Litecraft.getInstance().setSave(new LitecraftSave("SegregatedOrdinalData", false)); Litecraft.getInstance().changeWorld(Litecraft.getInstance().getSave().getWorldOrCreate(Dimensions.OVERWORLD)); ginger3D.setGingerPlayer(Litecraft.getInstance().getWorld().player); }