gb-image-decoder 0.1.5 → 0.1.6
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/dist/index.cjs +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ const blendModeNewName = (oldName) => {
|
|
|
54
54
|
|
|
55
55
|
const BLACK = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
|
|
56
56
|
const WHITE = "00000000000000000000000000000000";
|
|
57
|
+
const SKIP_LINE = "skip";
|
|
57
58
|
const TILE_PIXEL_WIDTH = 8;
|
|
58
59
|
const TILE_PIXEL_HEIGHT = 8;
|
|
59
60
|
const TILES_PER_LINE = 20;
|
|
@@ -365,6 +366,9 @@ class Decoder {
|
|
|
365
366
|
return changedTiles;
|
|
366
367
|
}
|
|
367
368
|
renderTile(tileIndex, rawLine) {
|
|
369
|
+
if (rawLine === SKIP_LINE) {
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
368
372
|
const tile = decodeTile(rawLine);
|
|
369
373
|
this.paintTile(tile, tileIndex);
|
|
370
374
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -52,6 +52,7 @@ const blendModeNewName = (oldName) => {
|
|
|
52
52
|
|
|
53
53
|
const BLACK = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
|
|
54
54
|
const WHITE = "00000000000000000000000000000000";
|
|
55
|
+
const SKIP_LINE = "skip";
|
|
55
56
|
const TILE_PIXEL_WIDTH = 8;
|
|
56
57
|
const TILE_PIXEL_HEIGHT = 8;
|
|
57
58
|
const TILES_PER_LINE = 20;
|
|
@@ -363,6 +364,9 @@ class Decoder {
|
|
|
363
364
|
return changedTiles;
|
|
364
365
|
}
|
|
365
366
|
renderTile(tileIndex, rawLine) {
|
|
367
|
+
if (rawLine === SKIP_LINE) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
366
370
|
const tile = decodeTile(rawLine);
|
|
367
371
|
this.paintTile(tile, tileIndex);
|
|
368
372
|
}
|