From 0ce15351ed0b851d87849dbe94086b4f8b0023a6 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 3 Mar 2019 17:45:56 -0800 Subject: [PATCH] Disabled bounds and path debugging by default --- core/src/gdx/diablo/codec/Animation.java | 2 +- core/src/gdx/diablo/entity/Entity.java | 2 +- core/src/gdx/diablo/map/MapRenderer.java | 4 ++-- mapbuilder/src/gdx/diablo/map/MapViewer.java | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/gdx/diablo/codec/Animation.java b/core/src/gdx/diablo/codec/Animation.java index 5eaca002..37dc7c43 100644 --- a/core/src/gdx/diablo/codec/Animation.java +++ b/core/src/gdx/diablo/codec/Animation.java @@ -22,7 +22,7 @@ import gdx.diablo.graphics.PaletteIndexedBatch; public class Animation extends BaseDrawable { private static final String TAG = "Animation"; - private static final int DEBUG_MODE = 1; // 0=off, 1=box, 2=layer box + private static final int DEBUG_MODE = 0; // 0=off, 1=box, 2=layer box private static final int NUM_LAYERS = 16; private static final float FRAMES_PER_SECOND = 25f; diff --git a/core/src/gdx/diablo/entity/Entity.java b/core/src/gdx/diablo/entity/Entity.java index 898e4c0c..5a0645d1 100644 --- a/core/src/gdx/diablo/entity/Entity.java +++ b/core/src/gdx/diablo/entity/Entity.java @@ -479,7 +479,7 @@ public class Entity { public void drawDebugStatus(PaletteIndexedBatch batch, ShapeRenderer shapes) { float x = +(position.x * Tile.SUBTILE_WIDTH50) - (position.y * Tile.SUBTILE_WIDTH50); float y = -(position.x * Tile.SUBTILE_HEIGHT50) - (position.y * Tile.SUBTILE_HEIGHT50); - if (animation != null && !(this instanceof Player) && isSelectable()) animation.drawDebug(shapes, x, y); + if (animation != null && isSelectable()) animation.drawDebug(shapes, x, y); shapes.setColor(Color.WHITE); MapRenderer.drawDiamond(shapes, x - Tile.SUBTILE_WIDTH50, y - Tile.SUBTILE_HEIGHT50, Tile.SUBTILE_WIDTH, Tile.SUBTILE_HEIGHT); diff --git a/core/src/gdx/diablo/map/MapRenderer.java b/core/src/gdx/diablo/map/MapRenderer.java index b1c89110..5eccc7bc 100644 --- a/core/src/gdx/diablo/map/MapRenderer.java +++ b/core/src/gdx/diablo/map/MapRenderer.java @@ -33,14 +33,14 @@ public class MapRenderer { private static final boolean DEBUG_MATH = DEBUG && !true; private static final boolean DEBUG_BUFFER = DEBUG && true; private static final boolean DEBUG_SUBTILE = DEBUG && true; - private static final boolean DEBUG_TILE = DEBUG && true; + private static final boolean DEBUG_TILE = DEBUG && !true; private static final boolean DEBUG_CAMERA = DEBUG && true; private static final boolean DEBUG_OVERSCAN = DEBUG && true; private static final boolean DEBUG_GRID = DEBUG && true; private static final boolean DEBUG_WALKABLE = DEBUG && !true; private static final boolean DEBUG_SPECIAL = DEBUG && true; private static final boolean DEBUG_MOUSE = DEBUG && true; - private static final boolean DEBUG_PATHS = DEBUG && true; + private static final boolean DEBUG_PATHS = DEBUG && !true; private static final boolean DEBUG_POPPADS = DEBUG && !true; private static final boolean DEBUG_ENTITIES = DEBUG && true; diff --git a/mapbuilder/src/gdx/diablo/map/MapViewer.java b/mapbuilder/src/gdx/diablo/map/MapViewer.java index 689fcef1..3e6652ed 100644 --- a/mapbuilder/src/gdx/diablo/map/MapViewer.java +++ b/mapbuilder/src/gdx/diablo/map/MapViewer.java @@ -33,6 +33,7 @@ import gdx.diablo.codec.DC6; import gdx.diablo.codec.DCC; import gdx.diablo.codec.FontTBL; import gdx.diablo.codec.Palette; +import gdx.diablo.codec.StringTBLs; import gdx.diablo.codec.TXT; import gdx.diablo.codec.excel.Excel; import gdx.diablo.entity.Entity; @@ -112,6 +113,7 @@ public class MapViewer extends ApplicationAdapter { Diablo.fonts = new Fonts(assets); Diablo.colors = new Colors(); Diablo.textures = new Textures(); + Diablo.string = new StringTBLs(resolver); Diablo.cofs = new COFs(assets);//COFD2.loadFromFile(resolver.resolve("data\\global\\cmncof_a1.d2")); TXT txt = TXT.loadFromFile(Gdx.files.local("data/ds1types.txt")); @@ -132,6 +134,9 @@ public class MapViewer extends ApplicationAdapter { mapRenderer = new MapRenderer(batch); mapRenderer.resize(); + MapRenderer.RENDER_DEBUG_TILE = true; + MapRenderer.RENDER_DEBUG_PATHS = true; + InputMultiplexer multiplexer = new InputMultiplexer(); multiplexer.addProcessor(new InputAdapter() { @Override