coastline 0.0.4
Loading...
Searching...
No Matches
coastline::ScreenFade Struct Reference

The fade of the screen: a wipe whose level goes to its target at a rate, and the edges of the picture it shows, in pixels of the 320 by 240 screen. More...

#include <frontend.h>

Public Member Functions

void SetTarget (float to, float seconds)
 SetFadeTarget() of the console.
bool FadingIn () const
bool FadingOut () const
bool Complete () const
void Update (float seconds)
 Advance the fade by a frame.
void Draw (SceneRenderer &renderer) const
 Draw the black of the wipe left and right of the picture, across the whole frame.

Public Attributes

float level = 0.0f
float target = 0.0f
float rate = 0.0f
bool autoReverse = false
bool skipFrame = false
int left = 0
int right = 0

Detailed Description

The fade of the screen: a wipe whose level goes to its target at a rate, and the edges of the picture it shows, in pixels of the 320 by 240 screen.

The same level fades the sound effects.

Member Function Documentation

◆ SetTarget()

void coastline::ScreenFade::SetTarget ( float to,
float seconds )

SetFadeTarget() of the console.

Parameters
toThe level to fade to.
secondsThe time of a fade across the whole range.

◆ FadingIn()

bool coastline::ScreenFade::FadingIn ( ) const
Returns
Whether the fade moves towards the whole picture.

◆ FadingOut()

bool coastline::ScreenFade::FadingOut ( ) const
Returns
Whether the fade moves towards black.

◆ Complete()

bool coastline::ScreenFade::Complete ( ) const
Returns
Whether the level has arrived at its target.

◆ Update()

void coastline::ScreenFade::Update ( float seconds)

Advance the fade by a frame.

Parameters
secondsThe time of the frame.

◆ Draw()

void coastline::ScreenFade::Draw ( SceneRenderer & renderer) const

Draw the black of the wipe left and right of the picture, across the whole frame.

Parameters
rendererThe renderer of the frame.

Member Data Documentation

◆ level

float coastline::ScreenFade::level = 0.0f

From 0 for black to 1 for the whole picture.

◆ target

float coastline::ScreenFade::target = 0.0f

The level the fade moves to.

◆ rate

float coastline::ScreenFade::rate = 0.0f

The change of the level in a second.

◆ autoReverse

bool coastline::ScreenFade::autoReverse = false

Whether a fade out waits for the fade in to finish.

◆ skipFrame

bool coastline::ScreenFade::skipFrame = false

Whether the next frame leaves the level as it is.

◆ left

int coastline::ScreenFade::left = 0

The left edge of the picture.

◆ right

int coastline::ScreenFade::right = 0

The right edge of the picture.


The documentation for this struct was generated from the following file: