Classes for controlling lamp shows.
Manages loading and playing a lamp show consisting of several lamps (or other drivers), each of which is a track (LampShowTrack, to be precise).
True if each of the tracks has completed.
Reads lines from the given filename in to create tracks within the lamp show. A lamp show generally consists of several lines of text, one for each driver, spaced so as to show a textual representation of the lamp activity over time.
Lines that start with a ‘#’ are ignored as comments. An example (and very short) lamp show follows:
lamp:Left | .. .. lamp:Center | .. .. .. lamp:Right | .. ..
See LampShowTrack for a complete description of the track line format.
Clears out all of the tracks in this lamp show.
Restart the show from the beginning.
Instructs the lamp show to advance based on the system clock and update the drivers associated with its tracks.
A series of schedules to be applied to a driver over a period of time, usually in concert with other tracks to make up a LampShow.
Tracks are initialized from a string with three parts:
- An identifier describing the driver to be manipulated by this track. If the identifier has a lamp: prefix the text following it is interpreted as a lamp name (member of lamps); coil: corresponds to members of coils. If neither of these prefixes is present then the name is assumbed to be a lamp name.
- A pipe character (|).
- A sequence of characters describing the lighting/activation pattern for the driver. In the simplest case such a string would be a series of dots/periods ('.') and spaces.
For example, a lamp show track describing a lamp (named Bonus5X) that would blink on and off might be:
lamp:Bonus5X | .... .... .... ....
Each character in a track represents 1/32nd of a second. This corresponds to the 32 schedule bits of a Driver.
Special characters may be used in place of dots as shorthand for effects such as fades or simply holding a driver on. This makes constructing and tuning large shows much less time-consuming. Four characters may be used:
[ – open with a “hold on”] – close with a “hold on”< – open with a fade-in> – close with a fade-out
Each open must be balanced with a close, although it need not be of the same type. For example, to fade on a lamp and then keep it on:
lamp:Bonus5X | < ][ ]
This is translated (by expand_line()) to something similar to this:
lamp:Bonus5X | . . .. .. ... .......................
Or, to pulse it in a fade-in-fade-out pattern:
lamp:Bonus5X | < >
To pulse a flasher rapidly:
coil:Flasher2 | . . . . .
These special characters may be mixed with the simpler dots and spaces, but there must always be spaces between the open and close characters. Note that the fade effect is not exactly a fade, but rather turning the driver on and off very rapidly to simulate the lamp getting brighter or darker.
Care must be used when constructing lamp shows controlling coils. Never hold a coil or flasher active for an extended period of time. Otherwise the game will blow a fuse, burn a coil/flasher, or worse.
True if this track’s schedules have all been used.
Name of this track which corresponds to a driver.
Clears the contents of this track.
Restarts this track at the beginning.
Sequence of 32-bit schedule values.