Problem with palette under multiple frames

Started by Gilbert, Mon 24/05/2004 02:39:19

Previous topic - Next topic

Gilbert

OK, here is the problem, I just noticed that when you import animating backgrounds (under 256 colours), if you checked both "Use exact palette slots" and "Share palette with main background" checkboxes the effect was not as expected, that the content of the imported frame was modified to "match the original colours" of the image file. So it's not exact slots import as expected (for example when I draw my graphics I always changed colour slot#0 to pink for some reasons, which I know will become black when imported, but if I imported a animating frame with the two checkboxes checked, since pixels drawn with colour #0 were pink in the original image, the editor messed it up by subsitute these pixels with a "close colour", which is not the slot #0 black as expected).

Now that causes problems, as I'll always use palette effects, so the imported graphics must be intact/untouched regarding their slot indices. If I checked only "Use exact palette slots", the import was exact, but now each frame would has its own palette, it then causes problem, for example:
The bg is animating, with 2 frames:
Gameloop1:
- Current frame is #0
- slot #250 is originally green
- I changed slot #250 in-game to red
Gameloop2:
- Current frame is #1
- Since frame 1 has its own palette, and is not affected by last change, so slot #250 is still green
Gameloop3:
- Current frame is #0
- when the animation got back to this frame, the engine changes the palette BACK to the ORIGINAL, so slot #250 is green, losing the changes that I made

So what I suggest is that if both checkboxes are checked the frames must be imported untouched (exact palette), don't care about the colours of the slots, just discard them. (I know there're some workarounds at the moment, but it's better if this problem is fixed).

I think I have another problem but now I have forgotten about it completely so... :P

Pumaman

Thanks for the report, I'll look into it.

SMF spam blocked by CleanTalk