Amos Professional Manual  Contents  Index

AMAL


The PLay command is followed by the number of the pre-recorded path stored in the AMAL memory bank, and path numbers can range from 1 up to the maximum number of patterns tho have been stored. The first time that AMAL comes across a PLay command, it will look for Ow relevant path number in this memory bank, and if any problem is encountered, AMAL will abort the operation and skip to the instruction immediately after the animation string.

As soon as the pattern has been initialised, register RU is loaded with the delay time between each individual movement step, measured in 50ths of a second. By changing the RU register from inside the AMAL program, Object movements are slowed down or speeded up. Note that each movement step is added to the current coordinates of the Object. This means that if the Object movements are controlled by SPRITE or BOB instructions, that Object will continue its pre-recorded movements from the new screen location. Furthermore, it is easy to animate dozens of different Objects using a single sequence of pre-recorded movements.

The value which controls the direction of movement is held in register R1. This value can affect movement in one of three different ways, as follows.

R1 Value Effect
>0       execute sequence in pre-recorded order
 0       execute sequence in reverse order
-1       stop sequence and proceed to next AMAL instruction

The contents of both register R1 and RU can be changed at any time from within the AMOS Professional Basic program, by using the AMREG or AMPLAY commands, which are explained later.

For a spectacular demonstration of pre-recorded movement patterns, please load this ready- made program:

LD> Load "AMOSPro_Tutorial:Tutorials/AMAL/AMAL_5.AMOS"

AMAL functions list
Here is a full alphabetical list of all the available AMAL functions:

BC
value=Bob Col(number,first,last)

BC is identical to the BOB COL Basic instruction. It checks the single Bob whose number is specified for collisions with other Bobs, whose numbers are given as the first and last in the range to be monitored. If a collision is detected, a value of -1 (true) is returned, otherwise 0 (false) is given.

This instruction may not be performed within an interrupt, so it is only available when AMAL routines are directly executed from Basic using the SYNCHRO command.

Back    Next
07.06.08