39 while (CdControl(CdlSetloc, (u_char *)loc, 0) == 0) {
41 while (CdControl(CdlSetmode, ¶m, 0) == 0) {
43 }
while (CdRead2(CdlModeStream | CdlModeSpeed | CdlModeRT | CdlModeSize1) == 0);
50 DecDCToutCallback(callback);
52 StSetStream(1, 1, -1, 0, 0);
64 while (StGetNext(&addr, (u_long **)§or) != 0) {
133 volatile s32 count = 0x800000;
135 while (dec->
isdone == 0) {
150 switch (task->
state) {
180 CdControlB(CdlPause, 0, 0);
181 DecDCToutCallback(
NULL);
208 switch (task->
state) {
215 if (task->
movie != 10) {
222#elif VERSION_EU || VERSION_JP
224 if (task->
movie != 11) {
239 if (task->
movie != 11) {
262 if (*player ==
NULL) {
u_long * STDWTITL_vlcBuffer1
u_short * STDWTITL_vlcTable
u_long * STDWTITL_vlcBuffer0
u_long * STDWTITL_imageBuffer0
u_long * STDWTITL_ringBuffer
u_long * STDWTITL_imageBuffer1
u32 STDWTITL_movieEndFrame
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
s32 LANGUAGE
The European version's settings, in the small data (.sdata) between file/file_table....
FileTableFuncs FILE_TABLE
The disc's file table.
Font FONT
decode is declared without a prototype, as callers would truncate the u8 mode, so decodeChar is cast ...
#define SCREEN_WIDTH
The screen the modes draw on (setDisplayMode, their layers' rects)
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
void STDWTITL_initStream(CdlLOC *loc, void(*callback)())
Resets the MDEC, has callback run for each decoded slice, sets up the ring buffer and starts streamin...
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);...
MovieTask * STDWTITL_startMovieTask(s32 movie)
Creates the task that plays STDWTITL_movies[movie].
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,...
void STDWTITL_readStream(CdlLOC *loc)
Seeks the CD to loc and starts streaming the movie from there, retrying until it works.
void STDWTITL_tickMoviePlayer(MoviePlayerTask *task)
The movie player's task: allocates its buffers and starts the movie, then shows a frame each update u...
MoviePlayerTask * STDWTITL_startMoviePlayerTask(s32 file, u32 endFrame)
Creates the movie player (task) for the movie in file, which ends on frame endFrame.
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,...
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 langua...
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...
void STDWTITL_clearVram(void)
Resets the GPU and clears the whole VRAM to black, around the movies.
void STDWTITL_onSliceDecoded(void)
Called by the MDEC for each decoded slice of a movie frame: copies it to VRAM and decodes the next on...
PadState PAD
Controller input: cleared by initPad, then the methods.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
MovieInfo STDWTITL_movies[]
Each movie's file, the frame it ends on and the game mode after it.
@ STORY_EXTRA
WSTAG780, event 1500, in the European and Japanese versions: the extra chapter, whose stages are FIEL...
Movies: PsyQ's STR player.
s32 isdone
set by STDWTITL_onSliceDecoded, the MDEC's callback
u_long * imgbuf[2]
16-bit pixels, as words for DecDCTout and LoadImage
void(* getPos)(s32 file, s32 offset, void *loc)
void(* requestMode)(s32 mode, s32 arg)
void(* allocPrimBuffers)(s32 size)
void(* setDisplayMode)(s32 w, s32 h, s32 hires, s32 interlace)
s32 buffer
the one being drawn
void *(* alloc)(s32 size, s32 tag)
void(* nextState)(struct MoviePlayerTask *task)
void(* setState)(struct MoviePlayerTask *task, s32 state)
void(* setState)(struct MovieTask *task, s32 state)
void(* nextState)(struct MovieTask *task)
s32(* getPressed)(s32 pad)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
STDWTITL.PRO: the title screen, the opening movies and a notice screen.
u_char StCdIntrFlag
libcd's flag that StCdInterrupt is pending: libcd sets it as a word, the game reads and clears its lo...