diff --git a/build.ts b/build.ts index dc8cb41..cf8491b 100755 --- a/build.ts +++ b/build.ts @@ -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'; diff --git a/readme.md b/readme.md index c004ece..402841e 100755 --- a/readme.md +++ b/readme.md @@ -33,8 +33,8 @@ Usage example: ```sh ./build.ts > /path/to/the/game/schematics/architecture/Symfony/sandbox/main.asm -# script output can easily be piped to strip it off all comments, leading whitespace and empty lines: -./build.ts | sed 's/\s*;.*//' | sed 's/^\s*//' | sed '/^\d*$/d' > result.asm +# script output can easily be piped to strip it off all comments, leading whitespace, double spaces and empty lines: +./build.ts | sed -r 's/\s*;.*//' | sed -r 's/^\s+//' | sed -r 's/ +/ /' | sed -r '/^\s*$/d' > result.asm ``` The script is build over Deno's API, so you'll need to have a `deno` binary in your PATH to use it that way.