#8980 - immortalninjak - Fri Jul 25, 2003 2:11 pm
Hi all,
experimenting with tiles with the help of the gbajunkie tutorial and wanted to know how to change only a few tiles in the bg.
In my prog I have only two tiles on a 128*128 bg.
Instead of the tutorial loop:
I use:
and then in the getinput i have:
which should on succesive button pushes gradually change the bg from one tile to the other.
However it seem to be alternating between the two tile resulting in alternaitng stripes of the two tiles.
Can anyone tell me what I'm doing wrong?
I suspect I have some numbers wrong somewhere, but changin them seems to have little effect.
thank you for your time and help.
KK
experimenting with tiles with the help of the gbajunkie tutorial and wanted to know how to change only a few tiles in the bg.
In my prog I have only two tiles on a 128*128 bg.
Instead of the tutorial loop:
Code: |
temp = (u16*)map; for(loop = 0; loop < 16*16/2; loop++) bg2.mapData[loop] = temp[loop]; |
I use:
Code: |
for(loop = 0; loop < 16*16/2; loop++) bg2.mapData[loop] = 0x00; |
and then in the getinput i have:
Code: |
bg2.mapData[count] = 0x08; count++ |
which should on succesive button pushes gradually change the bg from one tile to the other.
However it seem to be alternating between the two tile resulting in alternaitng stripes of the two tiles.
Can anyone tell me what I'm doing wrong?
I suspect I have some numbers wrong somewhere, but changin them seems to have little effect.
thank you for your time and help.
KK