Table of Contents

 
FadeScreenIn
 

Purpose

Fades in the entire screen

 

Protoype

void CVideo::FadeScreenIn (int i_base = SCREEN_TRANSPARENT, int i_step = -5, RGB_SET rgb_fade = RGB_SET(0,0,0))
 

Parameters

base the alpha level to fade to
step the amount to fade by each rendering pass
fade the color to fade the screen to
 

Description

This function causes the entire screen to fade to a certain level, defined by the base alpha value. The fade in function takes a negative step value becuase the fade is actually being done by a colored surface the size of the screen. So while the screen is seen to be fading in, it's actually the surface fading out. You can control the speed of the fade by using the step value, and you can set the color of the fade by using rgb triple values.

 

Use

CVideo video;
// fade in the screen from red
video.FadeScreenIn(SCREEN_TRANSPARENT, -20, RGB_SET(255,0,0));
 

Prev: FadeComplete