fix garbled room output

This commit is contained in:
synth-ruiner 2017-12-23 20:20:55 +00:00
parent 42750c7dfe
commit d887e1e8eb
2 changed files with 2 additions and 9 deletions

View File

@ -216,6 +216,8 @@ $(document).ready(function() {
// tiled output // tiled output
room = [];
_.times(16, function(tileY) { _.times(16, function(tileY) {
_.times(16, function(tileX) { _.times(16, function(tileX) {
// make pseudo-tile from monochrome bitmap // 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); imageData = document.getElementById("room-output").getContext('2d').getImageData(0, 0, 128, 128);
rawData = imageData.data; 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(room, function(row, tileY) {
_.each(row, function(tileName, tileX) { _.each(row, function(tileName, tileX) {
if (_.get(bitsyData, 'tiles.' + tileName + '.bitmap')) { if (_.get(bitsyData, 'tiles.' + tileName + '.bitmap')) {

View File

@ -38,10 +38,6 @@ croppie.js:182 (mine)
if (src.match(/^(file|https)?:\/\/|^\/\//)) { 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 ## to do
* write Bitsy data * write Bitsy data