From 050c4e03220ed458ba164f14336dc035a3bc01be Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sat, 29 Aug 2020 00:25:17 -0600 Subject: [PATCH] Fix missing floor tiles in DAT levels --- js/format-dat.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/format-dat.js b/js/format-dat.js index 78b7c64..e773547 100644 --- a/js/format-dat.js +++ b/js/format-dat.js @@ -174,8 +174,9 @@ function parse_level(buf) { let cell = level.linear_cells[c]; c++; - // FIXME not entirely sure how to handle floor, to be honest; should it just be blank, and blank cells get drawn as floor? eugh but then it would be drawn under floor tiles too... - if (name === 'floor' && cell.length > 0) { + // The upper layer uses 0x00 (floor) to indicate an empty + // space, which is probably not what we want + if (name === 'floor' && l === 0) { continue; }