#25628 - ChronoDK - Thu Aug 26, 2004 8:22 am
I'm having some trouble getting 512x512 text backgrounds working. I know about the special layout, and have written code that copies a 512x256 map. But somehow my code just won't work with 512x512 backgrounds.
Without the last loop it can copy 512x256 maps, but I can't get 512x512 maps to work.
I just get the first tile of the charbase repeated all over the screen.
There is 7552 bytes of 256-color tiles in charbase 3, and the map starts at screenbase 28. So that should not be the problem right?
Last edited by ChronoDK on Thu Aug 26, 2004 1:50 pm; edited 1 time in total
Code: |
void DrawMap512x512(const unsigned short* source, unsigned short* dest) { short row, tile; for(row = 0; row < 32; row++) { for(tile = 0; tile < 32; tile++) { dest[0 + tile + (row << 5)] = source[(tile + 0) + (row << 6)]; dest[1024 + tile + (row << 5)] = source[(tile + 32) + (row << 6)]; } } for(row = 32; row < 64; row++) { for(tile = 0; tile < 32; tile++) { dest[2048 + tile + (row << 5)] = source[(tile + 0) + (row << 6)]; dest[3072 + tile + (row << 5)] = source[(tile + 32) + (row << 6)]; } } } |
Without the last loop it can copy 512x256 maps, but I can't get 512x512 maps to work.
I just get the first tile of the charbase repeated all over the screen.
There is 7552 bytes of 256-color tiles in charbase 3, and the map starts at screenbase 28. So that should not be the problem right?
Last edited by ChronoDK on Thu Aug 26, 2004 1:50 pm; edited 1 time in total