AMOS TOME Series IV Manual  Index Prev Page Next Page 54

=Map Ab Length(n,a)
Returns the correct length required for a bank of n updates and a anims.

an example of the above 2 commands would be.

Reserve as work 9,Map Ab Length(32,16)
Map Update Bank 9,32,16

When using Map anims, you will need at least 1 update for each anim (otherwise the anims will not automatically update the screen). Remember to also include enough updates for any Map Plot's you will be doing each frame.

=Map Length(x,y)
Returns the file length of a TOME map x * y tiles in size. (basically x*y+4). e.g

L=Map Length(100,100)
Reserve as work 6,L
Bload "mymap.map",start(6)

=Map Scan X(t,x1,y1 to x2,y2, mode)
=Map Scan Y(t,x1,y1 to x2,y2, mode)

Returns X & Y co-ordinates of the tile or tile value that you want to scan for,

If mode is set to zero, then the command will search through the current map from x1,y1 to x2,y2 for tile number t. If mode is greater than zero, then TOME will do the same search, but for tile value t, from list mode-1.

An example of use would be...

Rem Search for the first occurrence of Tile number 3
TX=Map Scan X(3,0,0 To Map X-1,Map Y-1,0)
If TX >-1
   TY=Map Scan Y(3,0,0 To Map X-1,Map Y-1,0)
Endif