Normal graphical facilities are provided by the system described so far. Single frames and simple films can be produced. However, there is often a need to define independent parts of a film, or even independent movements. For example, a film sequence could be split into a constant background and a moving part, with the requirement that the background be repeated on all frames, or a camera zoom onto a subject might be required, with the zoom motion being independent of the subject itself. It is also helpful to allow one action to influence another, as when one object moves across the screen and another appears when the first has reached a specified point. The sequence list provides this facility, by allowing separately defined files to be merged.
The sequence list can be considered as a series of film files (ie files containing ADVFLM), which will be obeyed in parallel, using the ADVFLM orders to keep in step. In the simplest case, film files will be placed in the list and, when execution of the list begins, orders in the first file in the list are obeyed until an ADVFLM order is reached. That file is then suspended with certain system variables saved on a file stack (the same variables that are saved when a DRAW is obeyed) and the next file in the list is started. No frame advance order is issued to any output device until the last item in the list is obeyed. At this point, the advance frame order is issued and execution restarts at the first file in the list, with the system variables restored. Execution continues in this manner, with exhausted files being deleted from the list, until all files are exhausted. At this point, the conditions pertaining at the start of sequence execution are restored.
Consider the two files:
STDF (ANAME ('MOVE')) foreground frame 1 ADVFLM foreground frame 2 ADVFLM foreground frame 3 ADVFLM FIDF (1.0)
and:
STDF (ANAME ('STILL')) DRAW (ANAME ('BKGD')) ADVFLM DRAW (ANAME ('BKGD')) ADVFLM DRAV; (ANAME ('BKGD')) ADVFLM FIDF (1.0)
Placing these on the sequence list, and executing, would have the same effect as DRAWing the file:
STDF(ANAME('BOTH')) foreground frame 1 DRAW (ANAME('BKGD')) ADVFLM foreground frame 2 DRAW (ANAME('BKGD')) ADVFLM foreground frame 3 DRAW (ANAME ('BKGD')) ADVFLM FIDF (1.0)
The advantages of splitting simple files in this way are that the same background file can - be used with another foreground file, and the different function of foreground and background has been logically separated. The power of this technique will become apparent as more features are introduced.
There are two commands that add items to the sequence list:
ADSQLG (ANAME('PIC'),X,Y) ADSQLL (ANAME('PIC'),X,Y)
Both these commands are display routines, and so items can be added to the list while it is executing by including the commands in a file already on the list. The two commands identify the conditions required when the file is first obeyed. If ADSQLG is used, the conditions prevailing at the start of the sequence execution are restored prior to file PIC being started. ADSQLL will cause no restore, PIC being started with whatever conditions hold at the time execution of the file begins.
The bit setting in X determines the various conditions which apply to this item in the list. At the moment, only one condition is relevant.
The third argument, Y, is intended for use when local index variables are defined. It is currently ignored, but must be present.
Execution of a sequence list is initiated by the DRAW command already described or by:
STSQLS
The additional function of DRAW is effective only if no sequence execution is currently in progress, since there cannot be two sequence lists currently in operation. STSQLS has the same effect as DRAW without adding a file to the list.
DRAW (ANAME('FILE1')) is equivalent to ADSQLL (ANAME('FILE1'),0,0,0.0) STSQLS
Items are put into the list in order. Thus the sequence:
ADSQLG (ANAME('FILE1'),0.0,0.0) ADSQLL (ANAME('FILE2'),0.0,0.0) DRAW (ANAME('FILE3'))
will enter files FILE1 , FILE2, FILE3 onto the list and begin execution at FILE1 (_not at FILE3)). If FILE2, say, contained a command:
ADSQLL (ANAME('FILE4'),0.0,0.0)
this file would be added to the list following FILE3, when the command was obeyed.
It is possible to delete or suspend items in a sequence list, and resurrect suspended items, by commands contained in other items.
DLSQLS (ANAME('PIC'))
will delete the file PIC from the list. It is possible for an item to delete itself, when the effect will be the same as if:
FIDF (1.0)
had been encountered.
Note that in this and all other commands which reference a sequence list item, the file name is the name of the original file added to the list, and not the name of the file that is currently being obeyed in that item (for example, PIC might call JIM, which could contain an ADVFLM order. DLSQLS will always reference the item by the name PIC, which appeared in the ADSQLG,ADSQLS or DRAW command).
SPSQLS (ANAME('PIC'))
suspends the appropriate item, but does not delete it. Execution of the sequence list continues with that item being ignored. If an item suspends itself, an ADVFLM order will be simulated prior to the suspension.
RSSQLS (ANAME('PIC'))
brings back to life any suspended item. This item will continue to be obeyed when its turn comes aga1n in the circular scan of the list.
Note that neither deletions nor suspensions affect the order of items in a list.
For example, consider:
STDF (ANAME('SQRFLM')) DRAW (ANAME('SQ1')) ADVFLM SPSQLS (ANAME('BOX')) DRAW (ANAME ('SQ2') ) ADVFLM RSSQLS (ANAME('SQ2')) ADVFLM DLSQLS (ANAME('BOX')) DRAW (ANAME('SQ3')) ADVFLM FIDF (1.0) ADSQLG (ANAME('BOX')) DRAW (ANAME('SQRFLM'))
This sequence would cause the first frame in file BOX, and file SQ1, to appear on frame 1, SQ2 to appear on frame 2, the second frame in file BOX to appear on frame 3, and SQ3 to appear on frame 4.
Since it is possible to control a sequence item from outside itself, it is safe to provide a repetitive command.
REPEAT
will cause the file in which it appears to be started at the beginning again. This means that a background file could consist of:
STDF (ANAME ('STILL')) DRAW (ANAME('BKGD')) ADVFLM REPEAT FIDF (1.0)
Note, however, that this file will continue to execute unless some control is imposed from outside, and also that the REPEAT returns to the start of the file in which it appears, which may not necessarily be the head of the sequence list item.
The command:
STOPSQ
terminates execution of the sequence list. More details of other methods of termination are given in the next section.
The execution of the sequence list will terminate in the following cases.
So far, the only example of interaction between items has been the use of SPSQLS and RSSQLS. There are, however, other methods:
STDF (ANAME('CAM')) DO 10 I = 1,50 X = I RGLIM (1.0,X,X,50.0+X,50.0+X) ADVFLM 10 CONTINUE FIDF (l.0)will provide a camera pan independent of the subject defined in region 1.
In its simplest form, the display routine:
WHILE (VAL1,COND,VAL2)
which can only be used within a file, tests the two specified values according to the condition COND, and obeys the following display routine repeatedly while the condition holds. If the condition does not hold initially, the next display routine is skipped. VAL1 and VAL2 are real numbers. COND is a two-letter text string indicating the condition required:
'EQ' equals 'NE' not equals 'LT' less than 'LE' less than or equal 'GT' greater than 'GE' greater than or equal
This command can only be used within a file, and only makes sense if at least one of VAL1, VAL2 are references to index variables, but note that VAL2 is the third argument of WHILE, and PR3 should be used to indicate an index variable reference in this position.
Example:
WHILE (PR1(ANAME ('XIND')),'LE',5.0) DRAW (ANAME('PIC'))
will draw file PIC as long as the condition holds. It is assumed that somewhere in PIC there are commands to change the value of XIND.
WHILE (PR1(ANAME ('XIND')), 'NE' ,PR3(ANAME('LIM'))) DRAW (ANAME('PIC'))
Here, two index variables control the condition.
The display routine:
IFS (VAL1,COND,VAL2)
has the same effect as WHILE, without the following command being repeated if successful (thus providing a one-shot WHILE).
The power of WHILE or IFS can be increased by bracketing a group of commands as a single one using:
BEGINS, ENDS
For example:
STDF (ANAME('COUNT')) WHILE (PR1(ANAME('XIND')), 'LE' ,5.0) BEGINS ADVFLM ADD (ANAME('XIND'),1.O) ENDS STOPSQ FIDF (1.0)
would act as a counter to a sequence list, outputting ADVFLM orders until the counter reached the limit and then deleting the whole sequence.
Use of WHILE can greatly decrease the amount of store required for a file. For example, the file CAM, defined earlier, would have 50 RGLIM orders in it. It could be replaced by:
STDF (ANAME('CAM')) LOAD (ANAME ('XD'),1.0) LOAD (ANAME ('XD1'),51.0) WHILE (PR1(ANAME('XD')),'LE',50.0) BEGINS RGLIM (1.0, PR2(ANAME('XD')), PR3(ANAME('XD')), PR4(ANAME('XD1')),PR5(ANAME('XD1)'))) ADVFLM ADD (ANAME('XD'),1.0) ADD (ANAME ('XD1'),1.0) ENDS FIDF (1.0)