Issue swapping out palette colors
Posted: Tue Nov 17, 2015 5:03 am
Hi,
I wanted to do a small test. Print a text once per line, but with a different color on every line.
So, I tried this first:
and it works, the color is different than the default color.
But, when I do this multiple times like so:
Then the end result is the same font color on all lines! It uses the last of the setPaletteColor calls only, for all of the text. But I wanted to set a color, print it on a line, set it to another color, print on next line, change the color again etc.
What am I doing wrong here?
I wanted to do a small test. Print a text once per line, but with a different color on every line.
So, I tried this first:
Code: Select all
VDP_setPaletteColor(15, 0x0008);
VDP_drawText("Hello World!", 0, 0);
But, when I do this multiple times like so:
Code: Select all
VDP_setPaletteColor(15, 0x000E);
VDP_drawText("Hello World!", 0, 0);
VDP_setPaletteColor(15, 0x000C);
VDP_drawText("Hello World!", 0, 1);
VDP_setPaletteColor(15, 0x000A);
VDP_drawText("Hello World!", 0, 2);
VDP_setPaletteColor(15, 0x0008);
VDP_drawText("Hello World!", 0, 3);
What am I doing wrong here?
