Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
movie.c File Reference

The movies, streamed from the disc and decoded with libpress. More...

#include "menus/title.h"
Include dependency graph for movie.c:

Go to the source code of this file.

Functions

void STDWTITL_clearVram (void)
 Resets the GPU and clears the whole VRAM to black, around the movies.
 
void STDWTITL_initDecEnv (DecEnv *dec, s16 x0, s16 y0, s16 x1, s16 y1)
 Sets up the movie decoder: its VLC and slice buffers, and the two places in VRAM (x0, y0 and x1, y1) its frames alternate between.
 
void STDWTITL_readStream (CdlLOC *loc)
 Seeks the CD to loc and starts streaming the movie from there, retrying until it works.
 
void STDWTITL_initStream (CdlLOC *loc, void(*callback)())
 Resets the MDEC, has callback run for each decoded slice, sets up the ring buffer and starts streaming the movie from loc.
 
u_long * STDWTITL_getNextFrame (DecEnv *dec)
 Waits for the next movie frame in the ring buffer and returns it (NULL if none came); flags the movie's end at its last frame and clears VRAM when the size changes.
 
s32 STDWTITL_decodeNextFrame (DecEnv *dec)
 Takes the next movie frame and decodes its VLC data into the other VLC buffer; -1 if no frame came, 0 otherwise.
 
void STDWTITL_onSliceDecoded (void)
 Called by the MDEC for each decoded slice of a movie frame: copies it to VRAM and decodes the next one, or marks the frame done and switches to the other buffer.
 
void STDWTITL_waitFrameDecoded (DecEnv *dec, s32 mode)
 Waits until the MDEC has decoded the whole frame (switching buffers itself if it takes far too long); mode is not used.
 
void STDWTITL_tickMoviePlayer (MoviePlayerTask *task)
 The movie player's task: allocates its buffers and starts the movie, then shows a frame each update until the movie's last frame or Start; when killed, stops the CD, frees the buffers and clears VRAM.
 
MoviePlayerTask * STDWTITL_startMoviePlayerTask (s32 file, u32 endFrame)
 Creates the movie player (task) for the movie in file, which ends on frame endFrame.
 
void STDWTITL_tickMovie (MovieTask *task, MoviePlayerTask **player)
 A movie's task: picks the movie's file and next mode (the European version's last movie by the language), plays it, then reloads the font and goes on to that mode.
 
MovieTask * STDWTITL_startMovieTask (s32 movie)
 Creates the task that plays STDWTITL_movies[movie].
 

Detailed Description

The movies, streamed from the disc and decoded with libpress.

Definition in file movie.c.

Function Documentation

◆ STDWTITL_clearVram()

void STDWTITL_clearVram ( void  )

Resets the GPU and clears the whole VRAM to black, around the movies.

movie.c

Definition at line 6 of file movie.c.

Referenced by STDWTITL_getNextFrame(), and STDWTITL_tickMoviePlayer().

Here is the caller graph for this function:

◆ STDWTITL_initDecEnv()

void STDWTITL_initDecEnv ( DecEnv *  dec,
s16  x0,
s16  y0,
s16  x1,
s16  y1 
)

Sets up the movie decoder: its VLC and slice buffers, and the two places in VRAM (x0, y0 and x1, y1) its frames alternate between.

Definition at line 14 of file movie.c.

Referenced by STDWTITL_tickMoviePlayer().

Here is the caller graph for this function:

◆ STDWTITL_readStream()

void STDWTITL_readStream ( CdlLOC *  loc)

Seeks the CD to loc and starts streaming the movie from there, retrying until it works.

< 0: normal speed 1: double speed

< Normal Streaming

< 0: normal speed 1: double speed

< 0: ADPCM off 1: ADPCM on

< 0: 2048 byte 1: 2340byte

Definition at line 33 of file movie.c.

Referenced by STDWTITL_initStream().

Here is the caller graph for this function:

◆ STDWTITL_initStream()

void STDWTITL_initStream ( CdlLOC *  loc,
void(*)()  callback 
)

Resets the MDEC, has callback run for each decoded slice, sets up the ring buffer and starts streaming the movie from loc.

Definition at line 48 of file movie.c.

Referenced by STDWTITL_tickMoviePlayer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDWTITL_getNextFrame()

u_long * STDWTITL_getNextFrame ( DecEnv *  dec)

Waits for the next movie frame in the ring buffer and returns it (NULL if none came); flags the movie's end at its last frame and clears VRAM when the size changes.

Definition at line 58 of file movie.c.

Referenced by STDWTITL_decodeNextFrame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDWTITL_decodeNextFrame()

s32 STDWTITL_decodeNextFrame ( DecEnv *  dec)

Takes the next movie frame and decodes its VLC data into the other VLC buffer; -1 if no frame came, 0 otherwise.

Definition at line 85 of file movie.c.

Referenced by STDWTITL_tickMoviePlayer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDWTITL_onSliceDecoded()

void STDWTITL_onSliceDecoded ( void  )

Called by the MDEC for each decoded slice of a movie frame: copies it to VRAM and decodes the next one, or marks the frame done and switches to the other buffer.

Definition at line 102 of file movie.c.

Referenced by STDWTITL_tickMoviePlayer().

Here is the caller graph for this function:

◆ STDWTITL_waitFrameDecoded()

void STDWTITL_waitFrameDecoded ( DecEnv *  dec,
s32  mode 
)

Waits until the MDEC has decoded the whole frame (switching buffers itself if it takes far too long); mode is not used.

Definition at line 132 of file movie.c.

Referenced by STDWTITL_tickMoviePlayer().

Here is the caller graph for this function:

◆ STDWTITL_tickMoviePlayer()

void STDWTITL_tickMoviePlayer ( MoviePlayerTask *  task)

The movie player's task: allocates its buffers and starts the movie, then shows a frame each update until the movie's last frame or Start; when killed, stops the CD, frees the buffers and clears VRAM.

Definition at line 149 of file movie.c.

Referenced by STDWTITL_startMoviePlayerTask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDWTITL_startMoviePlayerTask()

MoviePlayerTask * STDWTITL_startMoviePlayerTask ( s32  file,
u32  endFrame 
)

Creates the movie player (task) for the movie in file, which ends on frame endFrame.

Definition at line 197 of file movie.c.

Referenced by STDWTITL_tickMovie().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDWTITL_tickMovie()

void STDWTITL_tickMovie ( MovieTask *  task,
MoviePlayerTask **  player 
)

A movie's task: picks the movie's file and next mode (the European version's last movie by the language), plays it, then reloads the font and goes on to that mode.

Definition at line 207 of file movie.c.

Referenced by STDWTITL_startMovieTask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STDWTITL_startMovieTask()

MovieTask * STDWTITL_startMovieTask ( s32  movie)

Creates the task that plays STDWTITL_movies[movie].

Definition at line 275 of file movie.c.

Referenced by STDWTITL_tickScreen().

Here is the call graph for this function:
Here is the caller graph for this function: