"use strict"

const createTileGridConverter = require('./createTileGridConverter')
const colorDepth = require('./colorDepth')

module.exports = ({palette, numtiles, vsp0}) => {
  const converter = createTileGridConverter({
    tileWidth: 16,
    tileHeight: 16,
    columns: 20,
    numtiles,
    raw32bitData: colorDepth.convert8to32({palette, raw8bitData: vsp0}),
  })

  return {
    convertToPng: converter.convertToPng
  }
}
@@ -329,24 +329,62 @@
 t8to32(%7B
-palette,
+%0A      palette: palette.map(v =%3E v * 4),%0A     
  raw8bit
@@ -393,16 +393,22 @@
 ta: vsp0
+,%0A    
 %7D),%0A  %7D)

fix bug with dim palette in v1vsp2png