#6907 - einhaender - Wed Jun 04, 2003 1:50 pm
Iam lost with C datatypes. I have a code snipped that copies Background Palette, Tile Data and Map Data like this:
for(loop = 0; loop < 256; loop++) {
PalMem[loop] = Palette[loop];
}
for(loop = 0; loop < 160*69 / 2; loop++) {
bg2.tileData[loop] = Tiles[loop];
}
temp = (u16*)up_map;
for(loop = 0; loop < 32*8 / 2; loop++) {
bg2.mapData[loop] = temp[loop];
}
as described at gbajunkies and it works.
up_map is a u8 array and Tiles is a u16 array
Now iam using a different tool to create palette, map and tiles and the output has changed to up_map being a u16 and Tiles being a u8 array.
Whenever I use the exact same loops the Background looks broken, I guess the for loops has to be adapted, but how?
Another thing is, the "old" code works only if I use Rotation Background 2 in Mode 1, as soon as I wanna use another Rotation Background the Graphic looks broken too.
for(loop = 0; loop < 256; loop++) {
PalMem[loop] = Palette[loop];
}
for(loop = 0; loop < 160*69 / 2; loop++) {
bg2.tileData[loop] = Tiles[loop];
}
temp = (u16*)up_map;
for(loop = 0; loop < 32*8 / 2; loop++) {
bg2.mapData[loop] = temp[loop];
}
as described at gbajunkies and it works.
up_map is a u8 array and Tiles is a u16 array
Now iam using a different tool to create palette, map and tiles and the output has changed to up_map being a u16 and Tiles being a u8 array.
Whenever I use the exact same loops the Background looks broken, I guess the for loops has to be adapted, but how?
Another thing is, the "old" code works only if I use Rotation Background 2 in Mode 1, as soon as I wanna use another Rotation Background the Graphic looks broken too.