diff options
author | B. Watson <yalhcru@gmail.com> | 2021-05-05 01:50:12 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2021-05-05 01:50:12 -0400 |
commit | 1989c02b763a04d0f941114056f11bb96bdb2550 (patch) | |
tree | 459faeceae7280c2cd2c18e703e863b8ab9cc5e0 /block2hex.pl | |
parent | 682bb2a6174a30578f1dd770ebd3d1f39938bf6c (diff) | |
download | taipan-1989c02b763a04d0f941114056f11bb96bdb2550.tar.gz |
Finally fix damaged ship gfx
Diffstat (limited to 'block2hex.pl')
-rw-r--r-- | block2hex.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/block2hex.pl b/block2hex.pl new file mode 100644 index 0000000..c1e44f0 --- /dev/null +++ b/block2hex.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl -w + +while(<>) { + chomp; + #$was = $_; + s/$/ / while length($_) < 8; + s/X/1/g; + s/ /0/g; + #warn "was '$was', now '$_'\n"; + push @out, sprintf("0x%02x", eval "0b$_"); +} + +print join(", ", @out) . "\n"; |