use decimal instead of binary representation to save space

(cherry picked from commit 54ba73c177)
This commit is contained in:
2026-04-25 09:13:05 +02:00
parent c378dc95fa
commit 2b2e2a6d02
2 changed files with 13 additions and 13 deletions

View File

@@ -38,17 +38,17 @@ const mapMatchingStrings = {
};
const spritesMatchingStrings = {
0x00_00_00: '0b000_000_00',
0x00_00_FF: '0b000_000_11',
0x00_FF_00: '0b000_111_00',
0x99_50_00: `0b010_001_00`,
0x77_77_77: '0b011_011_10',
0xB3_B3_B3: '0b100_100_10',
0xFF_00_00: '0b111_000_00',
0xFF_00_FF: '0b111_000_11',
0xFF_80_00: '0b111_100_00',
0xFF_FF_00: '0b111_110_00',
0xFF_FF_FF: '0b111_111_11',
0x00_00_00: ' 0', // 0b000_000_00
0x00_00_FF: ' 3', // 0b000_000_11
0x00_FF_00: ' 28', // 0b000_111_00
0x99_50_00: ' 68', // 0b010_001_00
0x77_77_77: '110', // 0b011_011_10
0xB3_B3_B3: '146', // 0b100_100_10
0xFF_00_00: '224', // 0b111_000_00
0xFF_00_FF: '227', // 0b111_000_11
0xFF_80_00: '240', // 0b111_100_00
0xFF_FF_00: '248', // 0b111_110_00
0xFF_FF_FF: '255', // 0b111_111_11
};
const mapPath = 'assets/map.ppm';