Text, different color, one pal
Posted: Wed Feb 18, 2015 11:11 pm
Hi,
On my ongoing project, I had to write text on different colors according events.
Each (tile) text use one color, from the last of the 4 pal
My question is does I really need to
1/ load one charmap per color
2/ have one charmap on rom per color
For 1. I assume I have no choice, I had to consume VRAM (1 color = 96 tiles used)
For 2., is it possible to have
0x00000000
0x01111110
0x01000010
0x01000010
0x01111110
0x01000010
0x01000010
0x00000000
on ROM and load it has
0x00000000
0x02222220
0x02000020
0x02000020
0x02222220
0x02000020
0x02000020
0x00000000
I think I could use bitshifting in this case so what about this one ?
0x00000000
0x07777770
0x07000070
0x07000070
0x07777770
0x07000070
0x07000070
0x00000000
?
perhaps the answer is to use color ID I could bitshift only (so 4 colors only), I don't know
I use SGDK but if I had to write a load function on C or raw ASM, I'll do it
On my ongoing project, I had to write text on different colors according events.
Each (tile) text use one color, from the last of the 4 pal
My question is does I really need to
1/ load one charmap per color
2/ have one charmap on rom per color
For 1. I assume I have no choice, I had to consume VRAM (1 color = 96 tiles used)
For 2., is it possible to have
0x00000000
0x01111110
0x01000010
0x01000010
0x01111110
0x01000010
0x01000010
0x00000000
on ROM and load it has
0x00000000
0x02222220
0x02000020
0x02000020
0x02222220
0x02000020
0x02000020
0x00000000
I think I could use bitshifting in this case so what about this one ?
0x00000000
0x07777770
0x07000070
0x07000070
0x07777770
0x07000070
0x07000070
0x00000000
?
perhaps the answer is to use color ID I could bitshift only (so 4 colors only), I don't know
I use SGDK but if I had to write a load function on C or raw ASM, I'll do it