From f18c864df0fe1dadd74bef9bfa740a138b8d5fea Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sat, 24 Jul 2021 00:45:21 -0700 Subject: [PATCH] Added DebugMode#PREFAB to draw prefab rects (unimplemented) --- core/src/main/java/com/riiablo/map2/Zone.java | 7 +++++++ core/src/main/java/com/riiablo/map2/util/DebugMode.java | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/riiablo/map2/Zone.java b/core/src/main/java/com/riiablo/map2/Zone.java index 7bdb69f7..355a1692 100644 --- a/core/src/main/java/com/riiablo/map2/Zone.java +++ b/core/src/main/java/com/riiablo/map2/Zone.java @@ -86,6 +86,9 @@ public final class Zone extends BBox implements Poolable, Disposable { case CHUNK: drawDebugChunk(pixmap, x, y); break; + case PREFAB: + drawDebugPrefab(pixmap, x, y); + break; case TILE: drawDebugTile(pixmap, x, y); break; @@ -100,6 +103,10 @@ public final class Zone extends BBox implements Poolable, Disposable { for (Chunk chunk : chunks) chunk.drawDebug(pixmap, x, y); } + void drawDebugPrefab(Pixmap pixmap, int x, int y) { + // TODO: implement + } + void drawDebugTile(Pixmap pixmap, int x, int y) { pixmap.setColor(color); pixmap.drawRectangle( diff --git a/core/src/main/java/com/riiablo/map2/util/DebugMode.java b/core/src/main/java/com/riiablo/map2/util/DebugMode.java index 163d4a19..ca5238f2 100644 --- a/core/src/main/java/com/riiablo/map2/util/DebugMode.java +++ b/core/src/main/java/com/riiablo/map2/util/DebugMode.java @@ -3,6 +3,7 @@ package com.riiablo.map2.util; public enum DebugMode { UNSET, CHUNK, + PREFAB, TILE, SUBTILE, ; @@ -11,7 +12,8 @@ public enum DebugMode { static { UNSET.next = CHUNK; - CHUNK.next = TILE; + CHUNK.next = PREFAB; + PREFAB.next = TILE; TILE.next = SUBTILE; SUBTILE.next = CHUNK; }