From d887e1e8ebc024aee81e48f0b559e200639a034e Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Sat, 23 Dec 2017 20:20:55 +0000 Subject: [PATCH] fix garbled room output --- includes/script.js | 7 ++----- readme.md | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/includes/script.js b/includes/script.js index ee0164b..1abd1c3 100644 --- a/includes/script.js +++ b/includes/script.js @@ -216,6 +216,8 @@ $(document).ready(function() { // tiled output + room = []; + _.times(16, function(tileY) { _.times(16, function(tileX) { // make pseudo-tile from monochrome bitmap @@ -256,11 +258,6 @@ $(document).ready(function() { imageData = document.getElementById("room-output").getContext('2d').getImageData(0, 0, 128, 128); rawData = imageData.data; - /* this seems to go 0-15 initially and then 0-16? ?? - _.each(room, function(row, tileY) { - console.log(tileY); - }); - */ _.each(room, function(row, tileY) { _.each(row, function(tileName, tileX) { if (_.get(bitsyData, 'tiles.' + tileName + '.bitmap')) { diff --git a/readme.md b/readme.md index 0cd5fbd..6fbeb46 100644 --- a/readme.md +++ b/readme.md @@ -38,10 +38,6 @@ croppie.js:182 (mine) if (src.match(/^(file|https)?:\/\/|^\/\//)) { ``` -## bugs - -* output seems to be offset by 1 tile? check whether iteration is from 0-15 or from 1-16 (update: seems to go from 0-15 initially, then 0-16?) - ## to do * write Bitsy data