allow for background-only ("no tile")

This commit is contained in:
synth-ruiner
2017-12-24 18:12:46 +00:00
parent 673edd715d
commit 44ee5b874e
2 changed files with 8 additions and 3 deletions

View File

@@ -123,6 +123,13 @@ $(document).ready(function() {
// get tiles
bitsyData.tiles = {};
// tile 0 (background colour only) is implicit in bitsy rather than being stored in the game data
// so, make our own version
bitsyData.tiles[0] = {
name: 0,
bitmap: _.chunk(_.split(_.repeat(0, 64), ''), 8)
};
var tiles = input.match(/TIL (.*)\n([01]{8}\n){8}/g);
if (tiles.length > 0) {