From 1a2745f7a8ea3057b4b2de6dd7cc172f761afafa Mon Sep 17 00:00:00 2001 From: tangstad Date: Wed, 9 Nov 2005 23:12:33 +0000 Subject: [PATCH] Made main(). --- gba/tools/img2bin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gba/tools/img2bin.py b/gba/tools/img2bin.py index 1fd95a2..d4c1ad4 100644 --- a/gba/tools/img2bin.py +++ b/gba/tools/img2bin.py @@ -19,9 +19,8 @@ def write_block(f, image, width=8, height=8, offset_x=0, offset_y=0): for x in range(width): val = image.getpixel((x+offset_x, y+offset_y)) f.write(chr(val)) - -if __name__=="__main__": +def main(): tiled, args = gnu_getopt(sys.argv[1:], "t") if len(args) < 2: @@ -53,3 +52,7 @@ if __name__=="__main__": value = (b << 10) + (g << 5) + r pal_output.write(struct.pack("