1
0
mirror of https://github.com/bradgrantham/apple2e.git synced 2025-01-27 20:34:01 +00:00
2018-06-06 12:15:58 -07:00

30 lines
494 B
Python

import sys
maxwidth = 0
print "unsigned char bitmap[] = {"
for line in sys.stdin:
bit = 0
width = 0
for b in xrange(0, 40):
if line[b * 2] == '*':
print "255,",
else:
print "0,",
width += 1
bit += 1
if False and bit == 7:
print "255,",
width += 1
bit = 0
maxwidth = max(width, maxwidth)
print "// %d, %d" % ( width, bit)
print "};"
print "// width = %d" % maxwidth