#49702 - Maverick - Mon Aug 01, 2005 8:42 pm
Hi
I have searched for many hours and have not found an answer to my question. If the answer is simple im gonna feel stupid, but how come i can only display 16 tiles on a bg?
I load the tiles in a loop (converted from 256 bmp using bmp2spr) and write a simple function to display each tile one by one along the line. When it gets to tile 17, this is just tile 1 shifted right and so on until tile 33 which is, again, tile 1 shifted twice. I tried rewriting the functions to sprites to check if it was the graphics that were wrong and it does the same thing.
What is happening here?
#50087 - LOst? - Fri Aug 05, 2005 7:01 am
Maverick wrote: |
Hi
I have searched for many hours and have not found an answer to my question. If the answer is simple im gonna feel stupid, but how come i can only display 16 tiles on a bg?
I load the tiles in a loop (converted from 256 bmp using bmp2spr) and write a simple function to display each tile one by one along the line. When it gets to tile 17, this is just tile 1 shifted right and so on until tile 33 which is, again, tile 1 shifted twice. I tried rewriting the functions to sprites to check if it was the graphics that were wrong and it does the same thing.
What is happening here? |
You know you make sprites with bmp2spr. Not backgrounds. So that's probably your problem there.
_________________
Exceptions are fun
#50125 - Maverick - Fri Aug 05, 2005 6:28 pm
No, you convert graphics
But it doesnt matter, it was the program that was wrong, it could only convert the first 16 8 by 8 tiles then everything was shifted and looping over the first 16 tiles again
I just converted it to pcx and used pcx2sprite
#56767 - Zapf_Bandit - Tue Oct 11, 2005 9:41 am
Try Kaleid.exe.... It is by far an away the best graphic converter for DS and GBA stuff...
Could you post your code to load the BKG? It sounds like you are simply walking off your graphic memory. Use DMA for loading graphics... It's faster and usually safer. E.g.
Code: |
swiFastCopy( (void*)bits_pal,
(void*)BG_PALETTE,
sizeof(bits_pal)/4);
swiFastCopy( (void*)bits_gfx,
(void*)gfx,
sizeof(bits_gfx)/4);
swiFastCopy( (void*)bits_map,
(void*)map,
sizeof(bits_map)/4);
|
Hope that helps,
Zapf
#56808 - Maverick - Tue Oct 11, 2005 7:07 pm
This is a very old post that the solution to was found a very long time ago
The problem was the bmp2spr converter that is unable to convert any graphics of more than 16 8x8 tiles large. I am now using, and have been since August, pcx2sprite which was written int he previous post
How could i have been "walking off" the graphics memory when i was loading only a few simple, low color tiles and a simple map flooded with 0's with the first few set to 1?