tangstad/helds
tangstad
/
helds
Archived
1
0
Fork 0

Made main().

This commit is contained in:
Truls Alexander Tangstad 2005-11-09 23:12:33 +00:00
parent 94b85dba13
commit 1a2745f7a8
1 changed files with 5 additions and 2 deletions

View File

@ -20,8 +20,7 @@ def write_block(f, image, width=8, height=8, offset_x=0, offset_y=0):
val = image.getpixel((x+offset_x, y+offset_y)) val = image.getpixel((x+offset_x, y+offset_y))
f.write(chr(val)) f.write(chr(val))
if __name__=="__main__": def main():
tiled, args = gnu_getopt(sys.argv[1:], "t") tiled, args = gnu_getopt(sys.argv[1:], "t")
if len(args) < 2: if len(args) < 2:
@ -53,3 +52,7 @@ if __name__=="__main__":
value = (b << 10) + (g << 5) + r value = (b << 10) + (g << 5) + r
pal_output.write(struct.pack("<h", value)) pal_output.write(struct.pack("<h", value))
if __name__=="__main__":
main()