Overview
Members
Chapter
Previous
Next
|
|
|
|
NAME: FadeIn.
PURPOSE: Smoothly fades the current palette into the palette pointed to by lpPE. It takes 3 steps to operate a fade in function. First you should get the current palette using GetPalette, then you should set the current palette to the colour you wish to start from, lastly you call FadeIn with the palette you grabbed in the first step.
For example:
CDXScreen Screen;
PALETTEENTRY pe[256];
Screen->GetPalette(0, 256, pe);
Screen->FillPalette(255, 0, 0);
Screen->FadeIn(6, pe);
This code would make the screen flash red then return to how it started, just like a rocket hit in Quake!.
NOTE: This function is for 8bit color modes only.
INPUT: delay - the amount of time to delay between palette adjustments.
0 - no delay
10 - about 1 second
25 - about 2 seconds
50 - about 4 seconds
100 - about 8 seconds
lpPE - pointer to the desired palette table
RETURNS: nothing.