ok.
Wait, I made a stupid mistake
T--
If T
should be
if T
T--
{B*4 ; B is the row number counted from zero, 4 is the width of a row
+A ; A is the column number (sorry for being wrong there)
{B*4+A ;gets the tile number counted from upper left.
+GDB1} ;GDB1 is the pointer to the tilemap.
->T ;store the number that this returns in T
If T ; only draw a tile when T is not zero (zero means no sprite)
T-- ;subtract one from T to get the tile number
pt-on(a*8,B*8, ;draws the sprite at a*8,b*8
T*8 ;multiplies T by 8 since one sprite is 8 bytes
+Pic1 ;Pointer to sprite data
I hope it is clear now
T-- ;subtracts one from T so you do not have to draw