Code: Select all
hexdump -ve '3/1 "%02X " "\n"' bin.pal > ines.palModerator: Moderators
Code: Select all
hexdump -ve '3/1 "%02X " "\n"' bin.pal > ines.palCode: Select all
#!/usr/bin/env python3
# By Damian Yerrick; license: WTFPL
with open("bisqwit.pal", "rb") as infp:
p = infp.read(192)
p = bytearray(p) # for compatibility with old Python where str is bytes
with open("bisqwit.ines.pal", "w") as outfp:
outfp.writelines("%02X %02X %02X\n" % (p[i], p[i + 1], p[i + 2]) for i in range(0, 192, 3))