2 - DrawTileMap:
----------------
usage: real(2,Matrice_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,
ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Tile_Size,Map_UpdateLCD
Matrice_Name = Name of matrice containing map data 0 - 9. 0 = [A] - 9 = [J]
X_Offsett = X Map Offsett. Which part of the map you wish to start drawing at
Y_Offsett = Y Map Offsett. Which part of the map you wish to start drawing at
MapWidth = Width of TileMap
MapHeight = Height of TileMap
ScreenStartX = Which COLUMN you wish to START drawing. Can be a value from 0-12 for 8x8 or 0-6 for 16x16
ScreenEndX = Which COLUMN you wish to END drawing at. Can be a value from 0-12 for 8x8 or 0-6 for 16x16
ScreenStartY = Which ROW you wish to START drawing. Can be a value from 0-8 for 8x8 or 0-4 for 16x16
ScreenEndY = Which ROW you wish to END drawing at. Can be a value from 0-8 for 8x8 or 0-4 for 16x16
mPIC_Num = The PIC in which the tile data is located PIC0 - PIC255
Tile_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Tile_Size = Size of tiles, 8 = 8x8, 16 = 16x16
Map_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
The ScreenStartX, ScreenEndX, ScreenStartY, ScreenEndY enable you to draw a 'windowed' map. This means that you can draw
your map and leave space for a HUD or something similar. Drawing smaller maps will also be a little faster.
To draw an 8x8 tilesize map centered with a 1 tile blank border the inputs would be:
ScreenStartX = 1
ScreenEndX = 11
ScreenStartY = 1
ScreenEndY = 7
The TileMap routine now supports MULTIPLE PICS and 16-bit TILE INDEX's. This means that you can have a map with more than
256 different tiles. If a tile is >95 it will overlap to the next PIC (if it exists).
PICS must follow each other numerically!!!!
So if your input PIC is PIC0 any tiles > 95 will be taken from PIC1 and any tiles > 191 will be taken from PIC2.
If the PIC doesnt exist then the tile will be drawn as a BLANK.
This function will still be able to read PIC data even if it is archived! But it may slow things down.