Video Engine

From Hero of Allacrost

Jump to: navigation, search
(Lighting and Fog)
(Screen Fading)
Line 1,223: Line 1,223:
== Screen Fading ==
== Screen Fading ==
 +
 +
You can fade to the screen by using the FadeScreen() function, passing it the color you want to fade to, as well as the duration of the fade, in seconds.<br>
 +
<pre>
 +
video->FadeScreen(Color::white, 0.5f); // fade to white in half a second
 +
... half a second later ...
 +
video->FadeScreen(Color::black, 0.5f); // fade back to normal colors
 +
</pre><br>
 +
There are a few things to note: <br>
 +
 +
* Fading to black is MUCH more efficient than fading to other colors
 +
* If you start a new fade while another one is in progress, the current fade will stop and the new one will start.
 +
* GameVideo::IsFading() can tell you if the screen is in the middle of a fade
== Screen Shaking ==
== Screen Shaking ==
== Transition Tiles ==
== Transition Tiles ==

Revision as of 03:06, 18 January 2006

Personal tools