aboutsummaryrefslogtreecommitdiff
path: root/block2hex.pl
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-05-05 01:50:12 -0400
committerB. Watson <yalhcru@gmail.com>2021-05-05 01:50:12 -0400
commit1989c02b763a04d0f941114056f11bb96bdb2550 (patch)
tree459faeceae7280c2cd2c18e703e863b8ab9cc5e0 /block2hex.pl
parent682bb2a6174a30578f1dd770ebd3d1f39938bf6c (diff)
downloadtaipan-1989c02b763a04d0f941114056f11bb96bdb2550.tar.gz
Finally fix damaged ship gfx
Diffstat (limited to 'block2hex.pl')
-rw-r--r--block2hex.pl13
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";