silphscope 1.1.2 → 1.1.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silphscope",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A firered/leafgreen ROM asset extractor for use in web applications",
5
5
  "main": "main.js",
6
6
  "exports": {
@@ -36,7 +36,12 @@ export async function renderIcon(itemName, items, assets, rom, options = {}) {
36
36
  const width = 24;
37
37
  const height = 24;
38
38
 
39
- const image = render4bppImage(iconImageData, rawIconPalData, width, height);
39
+ const image = render4bppImage({
40
+ tileData: iconImageData,
41
+ paletteData: rawIconPalData,
42
+ width,
43
+ height
44
+ });
40
45
 
41
46
  const png = new PNG({ width, height });
42
47
  png.data = image;
@@ -35,7 +35,14 @@ export async function renderMonIcon(monName, mons, assets, iconPalettes, rom, op
35
35
  const width = 32;
36
36
  const height = 64;
37
37
 
38
- image = render4bppImage(iconData, rawIconPalData, width, height, palIndex * palSize, palSize);
38
+ image = render4bppImage({
39
+ tileData: iconData.data,
40
+ paletteData: rawIconPalData.data,
41
+ width,
42
+ height,
43
+ paletteOffset: palIndex * palSize,
44
+ paletteSize: palSize
45
+ });
39
46
 
40
47
  const frameHeight = 32;
41
48
  const frameSize = width * frameHeight * 4;
@@ -55,7 +55,12 @@ export async function renderMon(monName, mons, assets, rom, options = {}) {
55
55
  const width = 64;
56
56
  const height = 64;
57
57
 
58
- const image = render4bppImage(monImageData, rawMonPalData, width, height, );
58
+ const image = render4bppImage({
59
+ tileData: monImageData,
60
+ paletteData: rawMonPalData,
61
+ width,
62
+ height,
63
+ });
59
64
 
60
65
  const png = new PNG({ width, height });
61
66
  png.data = image;