-->
0 Members and 1 Guest are viewing this topic.
[1111->GDB1[1001[1001[1111
[1111[1001[1001[1111->GDB1
ClrDrawFor(I,0,7 // Start at zero, and go until your tile map width diveded by two (because we store two tiles for every one byte)For(J,0,8 // The Y axis has one byte to each tile, so you can just use the height minus one here.{J*9+I+GDB1->A // J*9 gets us the row offset (see below) and we just add the X value.A^16->B // Get the second digit of the hex into BA/16->A // And the first digit into AIf APt-On(I*14,J*7,Pic1+A-8 // I*14 because of the two tiles to a byte, J*7 because of 7 pixel tilesEndIf BPt-On(I*14+7,J*7,Pic1+B-8EndEndEnd
Lbl GT ; X position in S, Y position in T. Returns tileS/7->S // Swap 7 for the size of your tilesT/7*7->T // Yes, I know it is /7*7. Leave it that way. Unless you don't have 7x7 tiles, in which case you should change the values accordinglyIf S^2{(S/2)+T+GDB1}^16ReturnEnd{(S/2)+T+GDB1}/16Return
ClrDrawFor(I,0,7 // Start at zero, and go until your tile map width diveded by two (because we store two tiles for every one byte)For(J,0,8 // The Y axis has one byte to each tile, so you can just use the height here.{J*9+I+GDB1->A // J*9 gets us the row offset (see below) and we just add the X value.A^16->B // Get the second digit of the hex into BA/16->A // And the first digit into AIf APt-On(I*14,J*7,O*8+Pic1+A-8 // I*14 because of the two tiles to a byte, J*7 because of 7 pixel tiles. O is the offsetEndIf BPt-On(I*14+7,J*7,O*8+Pic1+B-8EndEndEnd
[quote][font=monospace]textgoeshere[/font][/quote]