#1694 - whodoo - Tue Jan 21, 2003 6:15 pm
Im using a tilebackground, works fine...but now I want another behind it as a layer..and I took the code for the first background and copyed it, the only thing I changed was the background-number and the mapdata..but the map won?t show up or something..do I have to change anything more?
#1696 - Lord Graga - Tue Jan 21, 2003 6:22 pm
If you just took the code from the first, then it won't work, you have to switch to another screenmem.
#1697 - whodoo - Tue Jan 21, 2003 6:27 pm
how..Im using this code
bg2.number = 2;
bg2.charBaseBlock = 0;
bg2.screenBaseBlock = 28; bg2.colorMode = BG_COLOR_256;
bg2.size = ROTBG_SIZE_512x512;
bg2.mosaic = 0;
bg2.x_scroll = 120;
bg2.y_scroll = 80;
and then
bg3.number = 3;
bg3.charBaseBlock = 0;
bg3.screenBaseBlock = 28; bg3.colorMode = BG_COLOR_256;
bg3.size = ROTBG_SIZE_512x512;
bg3.mosaic = 0;
bg3.x_scroll = 120;
bg3.y_scroll = 80;
then I make then enable and fill them with data..but now, noone of them is displayed
#1699 - ampz - Tue Jan 21, 2003 7:23 pm
You are using the same charbase and screenbase. Not good.
You are also trying to use two rotation backgrounds... are you in the correct mode? Are both BG's enabled?
#1700 - whodoo - Tue Jan 21, 2003 7:28 pm
what can I change?... Im using mode 1...is that right?.. how should I change the screen and char base blocks?
#1701 - Papa Smurf Advanced - Tue Jan 21, 2003 7:35 pm
Hi,
i think in mode 1 you only have u have 2 tile bgs and 1 rotation/scaling bg,
so the memory is mapped differenly.
in mode 2 you can only have 2 bgs, which can both scale/rotate.
i hope this helps a bit.
-Papa Smurf Advanced-
#1702 - whodoo - Tue Jan 21, 2003 7:44 pm
yes thank you.. it works fine..
but if I set the last backgrounds screen base block to 31, my sprites turn into squares...why?s that?
#1708 - ampz - Tue Jan 21, 2003 8:31 pm
Because your entire map will not fit into only one block, so you probably write your map way into sprite memory.
All theese questions and problems are very basic, make us all a favor and read a good gba tutorial like www.thepernproject.com