i have a problem with tilemaps. i have a minimal X and a maximal X coordinate.
so i draw my map
everythings is perfect, but when i draw a tile on my map ,the tile does not scroll with the map. i hope somebody will help me.
here is the complete code
[url]http://www.blitz-pasting.net/index.php?content=bp_showupload&id=174[/url]
max_X=(map_breite*16)+scrollx if max_X>800 then max_map_X_subtraktion=max_x-800 else max_map_X_subtraktion=0 endif max_map_X=(map_breite-(max_map_X_subtraktion/16))+scrollx/16 if max_map_X<1 then max_map_X=0 min_X=(scrollx/16) if min_X<0 then min_X=0 max_y=(map_hoehe*16)+scrolly if max_y>600 then max_map_y_subtraktion=max_y-600 if max_y<=600 then max_map_y_subtraktion=0 max_map_y=(map_hoehe-(max_map_y_subtraktion/16))+scrolly/16 if max_map_y<1 then max_map_y=0 min_y=(scrolly/16) if min_y<0 then min_y=0
so i draw my map
for mlayer=1 to layer for map_x=min_X to max_map_x-1 for map_y=min_Y to max_map_y-1 DrawImagetiles,(map_x*16),(map_y*16),map[map_x,map_y,mlayer] next next next
everythings is perfect, but when i draw a tile on my map ,the tile does not scroll with the map. i hope somebody will help me.
here is the complete code
[url]http://www.blitz-pasting.net/index.php?content=bp_showupload&id=174[/url]