Say in your scrolling function you have 2 variables, one stores the scrolling offset (intScrollX ?) and one stores the tile offset (intTmpX ?) and a tile size of 20 pixels (must match)...
VB Code:
intScrollX = intScrollX + 1 If intScrollX > 20 then 'Reset scrolling offset intScrollX = 0 'Adjust tile offset intTmpX = intTmpX + 1 Endif
Remember where you draw the map you have to add both offsets to draw it at the correct position:
VB Code:
For A = 0 to MapWidth For B = 0 to MapHeight DrawTile Map(intTmpX,intTmpY), A*TileWidth - intScrollX, B*TileHeight - intScrollY Next Next
That's all ..
