Expand description
Cinematic files: a list of shots and when each starts, over a length
of time (ticket 1113; game ADR-0060). The engine reads the file’s
frame and checks its times; what a shot shows is the game’s own (S),
checked by the game (ShotCheck) and played by
shuyi_ui::cinematic.
(
id: "title",
length: Music("title"), // or Seconds(10.0)
shots: [
(at: 0.0, shot: Pan(from: (4, 9), to: (12, 3.5))),
(at: 6.0, shot: Logo),
],
)atis seconds from the start. A shot lasts until the next one’sat; the last until the end. Shots cut: there is no fade.lengthisMusic(cue), the cue’slength_msin the audio manifest (so the file never repeats a number the manifest owns), orSeconds(n)for a cinematic on no track.actions(optional) are lists by name that shots may share: what a game’s actors act out, say. The game says what a list is (P) and checks them with its shots.- Unknown fields are refused. Times are kept in whole milliseconds, so
a checked cinematic holds no floats and can be compared with
Eq.
As a format (ADR-0007), CinematicRon reads a file as written
(CinematicFile); check then checks it against the game’s music
and shots.
Structs§
- Cinematic
Def - One cinematic: its shots, in order, over a length of time.
- Cinematic
File - A cinematic file as written, before any check:
Sis a shot andPa list ofactionsas the game writes them (()for a game whose shots share none). - Cinematic
Ron - The cinematic file (
cinematic,.ron) of a game whose shots areSand shared listsP, read asparsesays: as written, before any check.checkchecks it, with the cinematic’s file stem (AssetPath::stem), the music and the game’s shots. - ShotDef
- A shot and when it starts.
- Timed
Shot - A shot as written, and when it starts.
Enums§
- Length
- How long a cinematic is, as its file says.
Constants§
- MAX_
SECONDS - The longest a cinematic that states its own length may be, in seconds.
Traits§
- Shot
Check - How a game checks its shots
S, one file at a time; it may keep what it learns from one shot for the next (a shared list it checked).
Functions§
- check
- Checks cinematic
raw, read fromfile, whose name without its extension isstem, with the music cues ofaudioand the game’s checks of its shots. Reports every problem, in order: - from_
source - Reads and checks cinematic
source(parse, thencheck), for a game whose shots share noactions. - millis
secondsin whole milliseconds, orNoneif it isn’t a time: not a number, below 0, or past what au32holds.- parse
- Reads cinematic
source(errors attributed tofile) without checking it: a game whose shots shareactionsmakes itsShotCheckfrom them, then callscheck. - seconds
msin seconds, for a message.