0 Members and 1 Guest are viewing this topic.
For(B,0,15For(A,0,23Pt-On(A*4,B*4,{B*24+A+Data_Pointer}*8+Tile_Data_PointerEndEnd
:for(L,0,23:for(M,0,15:PtOff(L*4,M*4,{M+[the y offset, in tiles, of the spot in the map you want to draw, starting from the uppermost tile row in the map being zero]*[the total width of your map, in tiles]+L+[the x offset, in tiles, of the spot in the map you want to begin drawing at, starting with the leftmost tile collumn in the map being 0]+[a pointer, like GDB1 for example, to where you stored the tilemap you converted earlier]}*8+[the pointer to your tile image data]:end:end
:for(L,0,23:for(M,0,15:PtOff(L*4,M*4,{M+B*N+L+A+GDB1}*8+Pic1:end:end
.TILEMAPR.Tile data:[FFFFFFFFFFFFFFFF->Pic1 ; Or any variable (StrX,PicX,GDBX)[F0F0F0F0F0F0F0F0.Those are 8x8, for 4x4 just add 4x4 tiles (Wow thats hard to understand :D).Tilemap data (4x4 tilemap)[00000001->Pic1TL ; Or any variable (StrX,PicX,GDBX)[01010102 ; Each tile takes a byte. Make sure to get the right hex code![02010201[00010002.Draw the tilemapFor(A,0,3) ; Change the 3 to the height of the map minus 1For(B,0,3) ; Change the 3 to the width of the map minus 1If {Pic1TL+(A*4)+B}->C ; Change the 4 to the width of the map-1->CPt-On(B*8,A*8,Pic1+(C*8));Change the 8 in the coordinates to the width and height of the tilesEndEndEnd
Is it a GDB?
.TILEMAPR.Tile data:[FFFFFFFFFFFFFFFF->Pic1[F0F0F0F0F0F0F0F0[22222222->Pic1TL[20000002[20000002[22222222Repeat getKey(15).Draw the tilemapFor(A,0,3)For(B,0,3)If {Pic1TL+(A*4)+B}->C-1->CPt-On(B*8,A*8,Pic1+(C*8))EndEndDispGraphEndEnd
.TILEMAPR.Tile data:[FFFFFFFFFFFFFFFF->Pic1[F0F0F0F0F0F0F0F0[01010101->Pic1TL[01000001[01000001[01010101Repeat getKey(15).Draw the tilemapFor(A,0,3)For(B,0,3)If {Pic1TL+(A*4)+B}->C-1->CPt-On(B*8,A*8,Pic1+(C*8))EndEndDispGraphEndEnd
Oh yeah, it's not 22 it's 02. Thanks a lot shmibs.Code: [Select].TILEMAPR.Tile data:[FFFFFFFFFFFFFFFF->Pic1[F0F0F0F0F0F0F0F0[01010101->Pic1TL[01000001[01000001[01010101Repeat getKey(15).Draw the tilemapFor(A,0,3)For(B,0,3)If {Pic1TL+(A*4)+B}->C-1->CPt-On(B*8,A*8,Pic1+(C*8))EndEndDispGraphEndEndI made this, but this is 8*8 isn't it? How can I make it 4*4? Thanks.
.TILEMAPR.Tile data:[F0F0F0F000000000->Pic1[C0C0C0C000000000[01010101->Pic1TL[01000001[01000001[01010101Repeat getKey(15).Draw the tilemapFor(A,0,3)For(B,0,3)If {Pic1TL+(A*4)+B}->C-1->CPt-On(B*4,A*4,Pic1+(C*8))EndEndDispGraphEndEnd
.TILEMAPR.Tile data:[F0F0F0F000000000FFFFFFFFFFFFFFFF->Pic1[C0C0C0C000000000FFFFFFFFFFFFFFFF[01010101->Pic1TL[01000001[01000001[01010101Repeat getKey(15).Draw the tilemapFor(A,0,3)For(B,0,3)If {A*4+B+Pic1TL}->C-1->CPt-On(B*4,A*4,C*16+Pic1->C)Pt-On(B*4,A*4,C+8){r}End:EndDispGraph{r}End:End