AMOS TOME Series IV Manual Index | 41 |
MaPLe(Map Programming Language)
The MaPLe language is a simple interpreted language specifically written for working with maps. It is quite easy to use, and is intended to be used for those "Let the Amiga do this while I get a cuppa" type tasks.
An MPL program is constructed in the MaPLe editor built into the TOME Map Editor. The MPL editor shows you all 18 MPL commands at the top of the screen, and a series of programming lines (normally they start of blank) below them. At the bottom of the screen is a tile selector.
An MPL program is constructed by clicking on the commands you want, and clicking them into place into the listing. If a command requires a tile as a parameter, you simply select and click the tile into the parameter column after the command. If the command requires co-ordinates, or directions (such as the Move command), clicking on the parameter column brings up a dialog box to change the parameters.
Where commands use Tile parameters, you can place up to 10 tiles in each parameter box. In the case of some commands (like If Tile or Find) MPL will check against all of the tiles (to see if the tile being checked is one of them) and in the case of the Plot command, a tile will be picked from the box at random from the ones there. MaPLe is best suited for complex search and replaces, but can be used for all sorts of things that might not be in the TOME editor.
FIND (Tile list) |
:Search the entire map for the first occurrence of any of the tiles in the parameter list. When one is found the co-ordinates are passed to MPL' s tile cursor. |
MOVE (+-X+-Y) |
:Move the MPL tile cursor X Tiles Left/Right & Y Tiles Up/Down. |
GOTO |
:Move the MPL tile cursor to the X/Y co-ordinate shown. |
PLOT (Tile list) |
:Plot one of the tiles (picked at random) from the tile list at the current tile cursor coordinate. |
BRIK PLOT (Brik) |
:Plot a brik at the current MPL tile cursor position. |