@city41/gba-convertpng 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +4 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -121,9 +121,10 @@ async function main(jsonSpec) {
121
121
  for (const bg of jsonSpec.backgrounds) {
122
122
  const processResult = await (0, background_1.processBackground)(bg, jsonSpec.format);
123
123
  const fileRoot = path.basename(bg.file, path.extname(bg.file));
124
- const tilesAsmPath = path.resolve(jsonSpec.outputDir, `${fileRoot}.tiles.asm`);
125
- const paletteAsmPath = path.resolve(jsonSpec.outputDir, `${fileRoot}.palette.asm`);
126
- const mapAsmPath = path.resolve(jsonSpec.outputDir, `${fileRoot}.map.asm`);
124
+ const ext = formatToExt[jsonSpec.format];
125
+ const tilesAsmPath = path.resolve(jsonSpec.outputDir, `${fileRoot}.tiles.${ext}`);
126
+ const paletteAsmPath = path.resolve(jsonSpec.outputDir, `${fileRoot}.palette.${ext}`);
127
+ const mapAsmPath = path.resolve(jsonSpec.outputDir, `${fileRoot}.map.${ext}`);
127
128
  await fsp.writeFile(tilesAsmPath, processResult.tilesAsmSrc);
128
129
  console.log("wrote", tilesAsmPath);
129
130
  await fsp.writeFile(paletteAsmPath, processResult.paletteAsmSrc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@city41/gba-convertpng",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Converts png images to GBA tile format",
5
5
  "main": "index.js",
6
6
  "repository": "github.com/city41/gba-convertpng",