AMOS TOME Series IV Manual Index | 9 |
If you want to use the .MAP type of file, loading is still quite simple (sort of !). Basically, you have to reserve bank 6 to the correct length and then use the BLOAD command to load in the map. Fortunately, TOME gives you a command to tell you the length of a map, the =Map Length(x,y). The X & Y parameters are the width and height of the map in tiles. So for the Mazeman map, which is 100x100 tiles, you would do:
L=Map Length(100,100) Reserve as Data 6,L Bload "Mazeman.Map",Start(6)
This achieves the same as the previous load command, but with this file type you save a little disk space and it is easier to spot that it is a map file. Note the use of ,Start(6) at the end of the Bload. This is because the Bload command requires the memory address to load to rather than a bank number.
With the map in memory, we can play around with it !
The Map View command tells TOME what area of the screen you want to use to show the map. We'll use a large area, say from 0,0 (The Top left) to 320,192 (nearly the bottom right of an NTSC screen). So we would use the command:
Map View 0,0 To 320,192
Which is logical enough ! (Map_View_Demo.Amos on the TOME disk lets you play around with the Map View command).
We can now display the map, using the Map Do x,y command. This command displays an area of the map in the area of the screen that you defined with Map View. The x,y co-ordinates are the point on the map (measured in tiles) that you want TOME to start drawing from. For instance, enter:
Map Do 0,0
and TOME will display the Top left corner of the map. Entering:
Map Do 1 , 0
will redisplay the map one tile in to the map:
Map Do 1,1
will move you down another tile, and so on. It is possible to use this to do a simple (if incredibly slow by TOME'S standards) form of scrolling. See the Example on the TOME disk (Tomedemo2.Amos).