#7579 - einhaender - Fri Jun 20, 2003 10:15 am
I read a bit in the developer manual and there is something I hope to have correctly understood.
Lets say in Mode1 I have a 16 color Text BG (BG1) and a 256 color Rotation BG (BG2), actually a Rotation BG is always 256 as far as I know.
Now my Palette memory can hold 16 x 16 color palettes or 1 x 256 color palette.
Correct me if Iam wrong but now that my Rotation BG is always 256 colors I need to use a 256 color palette.
That means the 16 Color Text BG cannot have its own palette. However
each character/tile, on a 16 color Text BG 2 Byte in size, can be instructed in Bit 12-15 which palette to use. Now if I set Bit 12-15 to 0000 it will be using color 1 - 16 of the 256 color palette I have loaded, setting it to 0001 the character will use color 17 - 32 and so on. Right?
#7580 - einhaender - Fri Jun 20, 2003 10:17 am
Of course I meant setting Bit 15-12 to 0000 or 0001 :)
#7585 - jenswa - Fri Jun 20, 2003 11:44 am
I am not really sure, it's sounds logical (in my ears),
why don't you try it and see what happens, can't hurt.
You're bg might be having some kind of mixed up colors,
or either working perfect.
_________________
It seems this wasn't lost after all.
#7592 - Lupin - Fri Jun 20, 2003 1:07 pm
hey, you only have one hand? ;)
i think you should just try it, I'm sure it will work without any problems
#7594 - niltsair - Fri Jun 20, 2003 2:47 pm
You are correct.
However here's what you could do :
Only have a picture with (256-(i*16) )colors. Where i is the number of 16colors palette you want.
Now load your (256-(i*16) )colors palette and load at the end of it your i 16colors palette.
For example, if you wanted 1x256 and 1x16. Create Picture A with a 240colors palette load it. Create a Picture B with a 16colors palette, load it to 240-255. Since your Picture A is only acessing the first 240 colors, you don't care what's stored at the end.
#7598 - einhaender - Fri Jun 20, 2003 4:02 pm
thanks guys
#7611 - Cyberman - Sat Jun 21, 2003 12:31 am
einhaender wrote: |
thanks guys |
Your welcome and yes that's exacatly what it does.
This requires that BG2's palette be organized such that it doesn't create problems with the other 2 backgrounds. IE it's palette organization is done with BG 0 and BG 1 tiles in mind then the tiles for BG2 are set acordingly :)
I hope that makes sense.. a good example of doing this is Golden Sun 2. It uses this scheme.
Cyb
#7634 - hnager - Sat Jun 21, 2003 11:17 pm
If you don't mind - explain this technique further. I seem to have trouble getting all my palettes straight.
thanks/
#7640 - sgeos - Sun Jun 22, 2003 4:48 am
hnager wrote: |
If you don't mind - explain this technique further. I seem to have trouble getting all my palettes straight. |
You have 256 colors to use for all of your background tiles, 256 color mode or 16 color mode. It doesn't matter. Just split the colors up and decide how you want to use them. Here is an example scheme:
Life bar palette, 16 colors.
Text/icon/window palette, 16 colors.
Fog effect palette, 16 colors.
Rotation/Scaling BG palette (everything else), 80 colors.
Unused, 128 colors.
I'll set aside the last 48 colors for the life bar palette, the text/icon palette, and the fog effect palette. (The specific order doesn't matter, but there must be *an* order.) The first 80 colors are set aside the rotation scaling BG. If I need more 16 color palettes, I just add them to the end. I can expand the rotation/scaling BG if I want to as well. I still have space.
Note that I can set a 16 color BG tile to palette 1. In this case it will use the first 15 colors of the rotation/scaling palette, plus transparency. Unless you plan things very carefully, this is probably not what you want to do. You can also set a pixel in a 256 color tile to color 255. This will be the last color in one of your 16 color palettes. Probably not what you want to do either.
Just set up your palette so that it the 256 color BG and the 16 palettes of 16 colors don't clash and you are set. Thats all there is to it.
-Brendan