N64FullMotionVideo class
Plays the Nintendo 64's full-motion video cinematics.
The asset packer re-encodes the game's cinematics for this console into an MPEG-1 stream libdragon's decoder plays with the RSP's help, with the cinematic's music and sound effects mixed into one .wav64 audio track beside it. Playing that is libdragon's fmv_play(), which owns the main thread for the length of the video - so this is a blocking call, made between two frames when the engine holds neither the display nor any RDP state (see Play()).
Public static functions
- static auto FindVideo(StringView name) -> String
- Returns the video prepared for a cinematic, or an empty string if the content has none.
- static auto Play(StringView path, float volume) -> bool
- Plays a video to its end or until a button skips it.
Constructors, destructors, conversion operators
- N64FullMotionVideo() deleted
Function documentation
static String nCine:: Backends:: N64FullMotionVideo:: FindVideo(StringView name)
Returns the video prepared for a cinematic, or an empty string if the content has none.
| Parameters | |
|---|---|
| name | Name of the cinematic, as passed to Jazz2:: |
static bool nCine:: Backends:: N64FullMotionVideo:: Play(StringView path,
float volume)
Plays a video to its end or until a button skips it.
| Parameters | |
|---|---|
| path | Path returned by FindVideo() |
| volume | Volume of the audio track, 0-1 |
| Returns | true if the video played to its end, false if it was skipped |
Must be called between frames: the engine's renderer has presented its last frame and not yet acquired the next display buffer, so libdragon can use the display and the RDP freely. Every sound the engine is playing is stopped first, and the audio track plays on mixer channels taken from the audio device for the duration.