Module: StarWars 1.01, by SSH
A perspective scroller, as at the beginning of Star Wars movies
Download StarWars as a zip file
Author
Andrew MacCormack (SSH)
Please use the PM function on the AGS forums to contact
me about problems with this module
Abstract
Provides a Star Wars-style perspective scroller
Dependencies
AGS 2.71RC3 or later
Functions
StarWarsScroller.Run(String t, int font, optional int vanishy, optional int speed,
optional int separation,
optional int color, optional int colog, optional int colob);
This runs a scroller with the text in t, word-wrapped and centred. The font
specified is used.
The optional vanishy argument sets the y position at which text will have its
vanishing point.
The optional speed argument (default 5) can make the text scroll faster or slower:
higher numbers are faster.
The separation is a number that controls the gap between successive lines of text:
it is a number for which a good value has to be found by experimentation (default 200)
The colour of text can also be set: if one value is specified in 256 colour mode, it
uses that palette number, if 3 numbers are specified, the closest colour possible in
the colourspace will be used.
StarWarsScroller.Stop();
Turns off the scroller, after it has been run
StarWarsScroller.SetSpeed(int speed);
Can be used to pause (speed=0) or even make the scroller run backwards (speed<0)
Configuration
The font used should be quite large (for TTF, say around 30 points) and it should
NOT have an outline, as these tend to give lots of artefacts as they shrink into
the distance
Example
RawSetColorRGB(180, 180, 180);
StarWarsScroller.Run("How much is that doggy in the window? The one with the waggly tail", 3, 50, 5, 200);
Caveats
Due to the AGS RawDrawColour and NormalFont not being readable, I coudl not
save their old values when this module is run: therefore the user will have
to reset these to their correct values themselves, after having used the
scroller.
Revision History
17 Nov 05: v1.0 First release of StarWars scroller module
17 Nov 05: v1.01 Fixed RawRestore bug
Licence
StarWars AGS script module
Copyright (C) 2005 Andrew MacCormack
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
In addition to the licences mentioned in the modules themselves, you may choose to use the following creative commons licence if you prefer for all AGS modules and open source code resources on my site.

This work is licenced under a Creative Commons Licence.