diff --git a/gba/tools/img2bin.py b/gba/tools/img2bin.py index c8d4ec0..3d2d79a 100644 --- a/gba/tools/img2bin.py +++ b/gba/tools/img2bin.py @@ -10,7 +10,6 @@ def split_seq(seq, splitsize): newseq = [] while seq: newseq.append(seq[:splitsize]) - print "elem:", newseq[-1] seq = seq[splitsize:] return newseq @@ -30,12 +29,9 @@ if __name__=="__main__": if len(sys.argv) > 3: pal_output = open(sys.argv[3], "wb") - print "entries:", len(im.palette.palette) - for i, color in enumerate(split_seq(im.palette.palette, 3)): + for color in split_seq(im.palette.palette, 3): r, g, b = map(lambda col : col >> 3, map(ord, color)) - print "rgb:", r, g, b value = (b << 10) + (g << 5) + r - print "color", i, ":", value pal_output.write(struct.pack("