#[non_exhaustive]pub struct FrameOutput<'a, V> {
pub buffer: &'a GlyphBuffer,
pub quit: bool,
pub audio: &'a [AudioRequest<V>],
pub music: &'a [MusicCommand],
pub music_volume: f32,
pub sound_volume: f32,
pub fullscreen: bool,
pub voice_volume: f32,
pub frame_cap: FrameCap,
pub frame_cap_serial: u32,
}Expand description
The result of one frame. V is the game’s voice clip variant. Only
Game::frame builds one, so a field may come without breaking a game
(ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.buffer: &'a GlyphBufferWhat to show.
quit: boolWhether the game has asked to quit (it then ignores further input).
audio: &'a [AudioRequest<V>]Every audio request screens made this frame, in order. The platform
plays the sounds; the music requests are already turned into
music.
music: &'a [MusicCommand]What to do to the music this frame.
music_volume: f32The player’s music volume, 0–1: the platform multiplies the music’s own volume by it, also for a track already playing.
sound_volume: f32The player’s sound volume, 0–1: the platform multiplies every sound’s own volume by it.
fullscreen: boolWhether the game should fill the screen (the Fullscreen setting); the platform switches when this changes.
voice_volume: f32How loud voice clips play, 0–1
(Settings::voice_volume). The
platform applies it to the voice that is playing too.
frame_cap: FrameCapThe most frames a second to show (the player’s frame cap): the platform paces its frames to it from the next.
frame_cap_serial: u32The serial of the cap’s latest change (Ctx::frame_cap_serial):
the platform reports it back once it has applied the cap
(Game::set_pacing).
Trait Implementations§
Source§impl<'a, V: Clone> Clone for FrameOutput<'a, V>
impl<'a, V: Clone> Clone for FrameOutput<'a, V>
Source§fn clone(&self) -> FrameOutput<'a, V>
fn clone(&self) -> FrameOutput<'a, V>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more