Well, I already stated that A, B, and C were 3 sprites from the sprite sheet.
And yes, this is just testing the concept. I tried doing the entire sprite sheet, but even after finding the flaw and bringing the conversion of C down to 1 second, it was taking way too long. However, I got an idea today that could possibly make the conversion of C near-instantaneous, so I'll see how that goes. Although, either way any released version would probably need some sort of progress bar.
EDIT: Ooh yeah, it worked. Changing C's palette is now (practically) instantaneous, and I can convert the entire sheet in 1 second.
I had a bit of trouble getting it to work though. The thing is that my new method had a different way of comparing palettes. Because of this, if C contained a colour that A didn't, the colour to convert to would simply be black. I discovered this because C happened to have some bits of almost-pure white (a hex value of f8f8f8) on his back and hair, which A didn't contain, resulting in this:
I fixed this by simply skipping colours that weren't present in A, so the white in C stayed. In this sheet that's fine, although in other cases it might not, so the palettes used for comparing should have every colour in the sheet.
(07-24-2012, 03:32 PM)puggsoy Wrote: What I've done is grabbed 3 sprites, A, B and C from the sprite sheet. A and B are identical, but with different palettes, and C is a whole different frame with the same palette as A.
And yes, this is just testing the concept. I tried doing the entire sprite sheet, but even after finding the flaw and bringing the conversion of C down to 1 second, it was taking way too long. However, I got an idea today that could possibly make the conversion of C near-instantaneous, so I'll see how that goes. Although, either way any released version would probably need some sort of progress bar.
EDIT: Ooh yeah, it worked. Changing C's palette is now (practically) instantaneous, and I can convert the entire sheet in 1 second.
I had a bit of trouble getting it to work though. The thing is that my new method had a different way of comparing palettes. Because of this, if C contained a colour that A didn't, the colour to convert to would simply be black. I discovered this because C happened to have some bits of almost-pure white (a hex value of f8f8f8) on his back and hair, which A didn't contain, resulting in this:
I fixed this by simply skipping colours that weren't present in A, so the white in C stayed. In this sheet that's fine, although in other cases it might not, so the palettes used for comparing should have every colour in the sheet.