include/fade.h file

Classes

struct FadeControl
Controls screen fading effects.

Enums

enum FadeFlags { FADE_IN_OUT = 0x1, FADE_BLACK_WHITE = 0x2, FADE_INSTANT = 0x4, FADE_MOSAIC = 0x8, FADE_IRIS = 0x10 }

Functions

void SetBrightness(u32 brightness)
Set game brightness.
void SetFade(u32 type, u32 speed)
Start a fade effect.
void SetFadeInverted(u32 speed)
Perform the last fade effect in reverse.
void SetFadeIris(u32 x, u32 y, u32 type, u32 speed)
Peform an iris fade.
void SetFadeProgress(u32 progress)
Set the fade progress.
void InitFade(void)
Initialize the fade system.
void FadeMain(void)
Entry point for the fade system.
void FadeVBlank(void)
Fade VBlank entry point.
void ResetFadeMask(void)
Reset the fade palette mask.

Variables

FadeControl gFadeControl
FadeControl instance.

Function documentation

void SetBrightness(u32 brightness)

Set game brightness.

Parameters
brightness brightness level, 0-2

void SetFade(u32 type, u32 speed)

Start a fade effect.

Parameters
type

Fade type. The following flags are supported:

0x10x20x40x80x10
in/outblack/whiteinstantmosaiciris fade
speed Effect speed, lower is slower. Negative values trigger an acid-like experience.

void SetFadeInverted(u32 speed)

Perform the last fade effect in reverse.

Parameters
speed Fade speed.

void SetFadeIris(u32 x, u32 y, u32 type, u32 speed)

Peform an iris fade.

Parameters
x Screen x coordinate.
y Screen y coordinate.
type Fade type.
speed Fade speed.

void SetFadeProgress(u32 progress)

Set the fade progress.

Parameters
progress Progress value. 0-256.

When used on a fade in effect, this will set the progress of the fade. When used on a fade out effect, progress will be sustained at the value.

void InitFade(void)

Initialize the fade system.

This will misbehave if called while a fade is active.