04-13-2015, 09:47 PM
It appears the error was due to it trying to write a 28-bit integer using a function for writing 24-bit integers. This is because the colours in c_com00.col need to be shifted only 2 bits (multiplied by 4). Shifting them by 3 made the colour too large.
I found a byte at 0x1F of each .col file, which is the number of bits to shift minus 1. For most of the files it's 2, but for c_com00.col and c_com01.col it's 1. So basically to fix this I just made my program read in that value and add 1, and then shift that number of bits.
I also improved it a little bit by not just removing palettes that are all 0s, but just any palette in which all the colours are the same. c_gimick.col has heaps of palettes that are all completely filled with green, which seem just as pointless, so it ignores those as well.
Anyway yeah, just download from the same link as before.
I found a byte at 0x1F of each .col file, which is the number of bits to shift minus 1. For most of the files it's 2, but for c_com00.col and c_com01.col it's 1. So basically to fix this I just made my program read in that value and add 1, and then shift that number of bits.
I also improved it a little bit by not just removing palettes that are all 0s, but just any palette in which all the colours are the same. c_gimick.col has heaps of palettes that are all completely filled with green, which seem just as pointless, so it ignores those as well.
Anyway yeah, just download from the same link as before.