Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: collechess on May 16, 2011, 05:34:31 pm
-
I'm making an 12x8 tilemap in Axe for a game.
How come this doesn't work?
.T
[0000000000000000->Pic0
[FFFFFFFFFFFFFFFF
[111111111111->GDB1
[100000000001
[100000000001
[100000000001
[100000000001
[100000000001
[100000000001
[111111111111
Repeat getKey(15)
For(I,0,8
For(J,0,6
{I*4+J+GDB1}->A
Pt-On(J*16,I*8,A/16*8+Pic0
Pt-On(J*16+8,I*8,A^16*8+Pic0
End
End
DispGraph
End
-
Try this
{I*6+J+GDB1}->A
-
Also, don't forget to close your parenthesis in an axe program. ;)
-
Thanks
-
How about an 8x8 tilemap?
.T
[0000000000000000->Pic0
[FFFFFFFFFFFFFFFF
[11111111->GDB1
[10000001
[10000001
[10000001
[10000001
[10000001
[10000001
[11111111
Repeat getKey(15)
For(I,0,8
For(J,0,4
{I*4+J+GDB1}->A
Pt-On(J*16,I*8,A/16*8+Pic0
Pt-On(J*16+8,I*8,A^16*8+Pic0
End
End
DispGraph
End
And why do you have to change the {I*4+J+GDB1}->A?
-
And why do you have to change the {I*4+J+GDB1}->A?
Because with the map data you provided you have 6 columns instead of 4. ;)
As for the "8*8 tilemap," you actually have only a 4*8 tilemap, because of how Axe stores hex. Basically, it's reading the lines like this '12','34','56','78' instead of '1','2','3','4','5','6','7','8'. The way to fix this is to go with [0102030405060708] instead of [12345678].
Good luck! :)
-
using SirCmpwn's method, which he is using, that's the way it is. Builderboy found out a hackish way in Axe for Nibbles, so he's got that part right. (ofc, it may not work since that was in the early versions of Axe.)
-
using SirCmpwn's method, which he is using, that's the way it is. Builderboy found out a hackish way in Axe for Nibbles, so he's got that part right. (ofc, it may not work since that was in the early versions of Axe.)
Builderboy's method still works. after all, he's using simple math to figure out the 2 nibbles ;)