fadelib
FadeIn fades the colours of the used slice from black up to those of
a palette, FadeOut from the palette down to black, in 16 steps. A
fade works on slices in Blitz mode only. Normally the command waits
until the fade is done, waiting Rate+1 frames before each step; 0,
the value without Rate, is the fastest fade.
BLITZ
FadeIn 0,1With ASyncFade On, FadeIn and FadeOut only set the fade up. The
program then calls DoFade for each step, for example once per frame
in its main loop, and FadeStatus tells whether steps are left:
BLITZ
ASyncFade On
FadeOut 0
While FadeStatus
VWait
DoFade
; move the game on
WendBased on the fadelib guide by Acid Software.
Library number 157.
Commands
ASyncFade
With On, FadeIn and FadeOut only set the fade up and DoFade does its steps; with Off, the start value, they do the whole fade before the program goes on.
Statement. Help text: On|Off
Arguments: .w
DoFade
Does the next step of the fade set up by FadeIn or FadeOut with ASyncFade On; nothing if no steps are left. Blitz mode only.
Statement. No help text.
No arguments.
FadeIn
Fades the colours of the used slice from black to those of the palette, from Low Colour to High Colour if they are given, else all colours both have. Blitz mode only.
Statement. Help text: Palette#[,Rate[,Low Colour,High Colour]]
3 forms:
.w.w, .w.w, .w, .w, .w
As in the original, a colour range that is not limited to the colours of the palette and the slice is noticed only with runtime error checking (#136). With runtime error checking, a slice that is not set up is the error “Uninitialized Slice”, a palette that was never made “Uninitialized Palette”, and a colour beyond the colours of the slice “Not enough colours in Slice”.
FadeOut
Fades the colours of the used slice from those of the palette to black, from Low Colour to High Colour if they are given. Blitz mode only.
Statement. Help text: Palette#[,Rate[,Low Colour,High Colour]]
3 forms:
.w.w, .w.w, .w, .w, .w
The slice should show the colours of the palette before, for example
after Use Palette; the fade starts from the palette, not from the
colours on the screen.
FadeStatus
The number of steps of the fade still to do, so it is true while the fade goes on and false (0) at its end. Blitz mode only.
Function, result .w. No help text.
No arguments.