#31617 - Celeryface - Mon Dec 13, 2004 2:54 am
Hey there,
I'm loading in a text bg of 512x256 in Mode 0 in CharBlockBase 0 and ScreenBlockBase 28. I use the following code to load in the map data, tiles and palette.
The map shows up in the map viewer with all the tiles filled in (64x32), but the map data doesn't look how it's suppose to. Can anyone spot where I'm going wrong in my code?
Thanks in advance. :)
I'm loading in a text bg of 512x256 in Mode 0 in CharBlockBase 0 and ScreenBlockBase 28. I use the following code to load in the map data, tiles and palette.
Code: |
DMAFastCopy( (void*)menubg_pal_Palette, (void*)BGPaletteMem, 256, DMA_16NOW ); // Copy the tile images into the tile memory. DMAFastCopy( (void*)menubg_Tiles, (void*)CharBaseBlock(0), 13248/4, DMA_32NOW ); for( loopY = 0; loopY < 32; loopY++ ) { for( loopX = 0; loopX < 64; loopX++ ) { bg0map[n16++] = menubg_Map[(loopY * 32) + (loopX - 32) + 32*32]; } // end for loopX } // end for loopY |
The map shows up in the map viewer with all the tiles filled in (64x32), but the map data doesn't look how it's suppose to. Can anyone spot where I'm going wrong in my code?
Thanks in advance. :)