#23980 - Rommel - Sun Jul 25, 2004 11:49 pm
I've had no trouble getting rot tile bgs to work, at all. However when it comes to using TextBG mode, I'm having a few troubles. First off, I know it isn't read in the same way as the Rotation Tiles are if you are using 512x256, or 512x512 maps. I can get the 512x256 modes working, off of a little code that is on the PernProject site
However when I try to figure out what I need to get 512x512 to work I get a little lost. Here is a code snippet from Pern again.
My problem here, is trying to figure out where exactly in my bg2.mapData array, I need to access to store the data from MapPointer. I tried making it by what is said from the comments, but what I have tried putting there is not doing the trick. If anyone has any pointers, as to what I need to be adding to that code to get textbgs working it'd be a great help.
Thanks in advance
Code: |
int OFFSET = 32;
for(tile_y = 0; tile_y < 64; tile_y++) { for(tile_x = 0; tile_x < 64; tile_x++) { if(tile_x < 32) bg2.mapData[tile_x + tile_y * 32] = test[tile_x + tile_y * 64]; else bg2.mapData[ (tile_x-32) + tile_y * 32 + OFFSET] = test[tile_x + tile_y * 64]; |
However when I try to figure out what I need to get 512x512 to work I get a little lost. Here is a code snippet from Pern again.
Code: |
int OFFSET = 32x32; //offset to get to the right hand part of the map for(tile_y == 0; tile_y < 32; tile_y++) { for(tile_x == 0; tile_x < 64; tile_x++) { if(tile_x < 32) //It is in the left hand block MapPointer[tile_x + tile_y * 32] == MapData[tile_x + tile_y * 64] else //it is in the right hand block so add the offset of the first block and subtract 32 from tile_x MapPointer[ (tile_x-32) + tile_y * 32 + OFFSET] == MapData[tile_x + tile_y * 64]; } } |
My problem here, is trying to figure out where exactly in my bg2.mapData array, I need to access to store the data from MapPointer. I tried making it by what is said from the comments, but what I have tried putting there is not doing the trick. If anyone has any pointers, as to what I need to be adding to that code to get textbgs working it'd be a great help.
Thanks in advance