VDP_fadeOutAll(20,1);
VDP_waitFadeCompletion();
while(1)
{
}
The palette just have 16 color is black.I want to all color to black.
Moderator: Stef
Code: Select all
for(i = 0; i < 64; i++) tmp_pal[i] = 0;
Code: Select all
const u16 palette_black_all[64] =
{
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
};
sega16 wrote:I like zhengyaxin_8bit's method better personally becasue there is alot of redundant data and there is little speed gain in this case by using a table
doing:see it takes up less memory in rom and either way you would have to have the 64 bytes of ram used.Code: Select all
for(i = 0; i < 64; i++) tmp_pal[i] = 0;
is alot better thanCode: Select all
const u16 palette_black_all[64] = { .... 0x0000, };
Code: Select all
VDP_fadePal(0, myPal1, myPal2, 30, 1);
VDP_waitFadeCompletion();
Looks like there is a rounding bug in the palette fading method, but you can easily fix it by setting munally the destination palette after the fade effect :Manveru wrote:If you don't mind i will use this topic for another question about fading palettes.
I have an image that i need to keep in screen but changing the palette. When i try to fade from one to another, the arriving image is not correct because the color changing stops before ending, before the right colours are reached. When i draw it as usually, it is drawn correctly with both palettes, but something is happening with de fading.
I have tried with PAL0 and PAL1 because of previous message that you wrote about an issue, but the same result with both.
The code is that simple:When i try to fade from myPal2 to myPal1 the fading stop before ending too.Code: Select all
VDP_fadePal(0, myPal1, myPal2, 30, 1); VDP_waitFadeCompletion();
Code: Select all
VDP_fadePal(0, myPal1, myPal2, 30, 1);
VDP_waitFadeCompletion();
VDP_setPalette(0, myPal2);