coastline 0.0.4
Loading...
Searching...
No Matches
fade.h
Go to the documentation of this file.
1#ifndef COASTLINE_FADE_H
2#define COASTLINE_FADE_H
3
12
13#include <PR/ultratypes.h>
14
15#if TGR_BOSS_RALLY
16#include "common/render.h"
17#endif
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
34
46
57extern s32 g_dwFadeRectTop;
58
70
82
83#if TGR_BOSS_RALLY
90extern f32 g_fScreenFogPulse;
91
97extern u8 g_bSfxFadeVolume;
98#endif /* TGR_BOSS_RALLY */
99
110extern f32 g_fFadeTarget;
111
122extern f32 g_fFadeRate;
123
134extern f32 g_fFadeLevel;
135
147
159
171
182extern f32 g_fSfxFadeTarget;
183
194extern f32 g_fSfxFadeSpeed;
195
207
220
232
244
257
269
281
293
294#if TGR_BOSS_RALLY
302void RenderHeadlightGlare(const ViewportRect *viewports, f32 level);
303#else
314#endif /* TGR_BOSS_RALLY */
315
329void SetFadeTarget(float target, float seconds);
330
343void FadeSfxTo(float target, float seconds);
344
357void FadeMusicTo(float target, float seconds);
358
369
379void SetSfxFadeLevelImmediate(float level);
380
392void SnapScreenFade(float level);
393
404
417
430
443
454
464
476
486void DrawScreenFadeOverlay(float level);
487
500
501#ifdef __cplusplus
502}
503#endif
504
505#endif /* COASTLINE_FADE_H */
The state the renderer shares between the parts of a frame.
void FadeMusicTo(float target, float seconds)
Fade the volume of the music towards a level over a time in seconds.
void SetSfxFadeLevelImmediate(float level)
Set the volume of the sound effects and its target at once.
s32 g_dwFadeRectLeft
The edges of the picture the wipe leaves, in pixels.
s32 IsFadeComplete(void)
Whether the screen has reached its target and does not turn back by itself.
f32 g_fSfxFadeCurrent
The current sound-effect fade level, from 0 for silent to 1 for full volume.
void FadeSfxTo(float target, float seconds)
Fade the volume of the sound effects towards a level over a time in seconds.
f32 g_fMusicFadeCurrent
The current music fade level, from 0 for silent to 1 for full volume.
s32 IsFadingOut(void)
Whether the screen fades out, or will once it has faded in.
f32 g_fMusicFadeTarget
The fade of the music: its target, its change each second and its level.
f32 g_fSfxFadeSpeed
The change of sound-effect fade level per second.
void RenderHeadlightGlare(void)
Draw the glare of the headlights over the view as white of its opacity, when it is strong enough.
s32 g_adwFadeRectRightPerBuffer[2]
The right edge of the wipe last drawn in each frame buffer, in pixels.
void ApplyScreenFade(void)
Draw the wipe of the frame: black over the edges the fade has covered.
void SnapScreenFade(float level)
Set the level of the screen and its target at once.
s32 g_dwFadeRectBottom
The bottom edge of the visible picture during a wipe, in pixels.
f32 g_fSfxFadeTarget
The fade of the sound effects: its target, its change each second and its level.
s32 g_dwFadeAutoReverse
Whether the screen fades out as soon as it has faded in, because a fade out was asked for while it fa...
s32 g_dwFadeSkipFrame
Whether the next UpdateFadeTransitions() leaves the level of each fade as it is, set when a fade star...
s32 g_adwFadeRectLeftPerBuffer[2]
The edges of the wipe when each framebuffer was last drawn.
s32 IsFadedToBlack(void)
Whether the screen has faded out to black.
s32 g_dwFadeRectRight
The right edge of the visible picture during a wipe, in pixels.
s32 g_dwSfxFadeSkipFrame
Whether the next fade update skips changing the sound-effect level.
void UnusedScreenFadeStub(void)
Preserve an empty entry point in the original fade sequence.
f32 g_fFadeRate
The change of the level each second, below 0 when fading out.
s32 IsFadedToWhite(void)
Whether the screen has faded in to the whole picture.
s32 g_dwFadeRectTop
The top edge of the visible picture during a wipe, in pixels.
f32 g_fFadeLevel
The current screen fade level, from 0 for black to 1 for the full picture.
f32 g_fMusicFadeSpeed
The change of music fade level per second.
s32 g_dwMusicFadeSkipFrame
Whether the next fade update skips changing the music level.
void UpdateFadeTransitions(void)
Step the fades of the screen, the sound effects and the music by the time of the frame,...
void SetFadeTarget(float target, float seconds)
Fade the screen towards a level over a time in seconds.
void DrawScreenFadeOverlay(float level)
Draw black over the whole screen, more opaque the lower a level from 0 to 1.
s32 HasSfxFadeFinished(void)
Whether the fade of the sound effects has reached its target.
f32 g_fHeadlightGlare
How much the headlights shining at the camera whiten the view, from 0 to 1.
s32 IsFadingIn(void)
Whether the screen fades in and does not turn back by itself.
f32 g_fFadeTarget
The level the screen fades to.
void ResetHeadlightGlare(void)
Clear the glare of the headlights over the view.
The rectangle of the screen a view fills.
Definition render.h:134
Integer and floating-point types of libultra.
float f32
Definition ultratypes.h:38
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18