26#define OVL_NAME(name) STDWTITL_##name
29#define STDWTITL_SPLASH_LAYER 0x100
30#define STDWTITL_TITLE_LAYER 0x1000
34#if VERSION_US || VERSION_JP
35#define SPLASH_FILE 0x895
36#define STDWTITL_FILE_BACKGROUND 0x876
38#define SPLASH_FILE 0x8A6
39#define STDWTITL_FILE_BACKGROUND 0x887
41#define SPLASH_SPRITES (SPLASH_FILE << 16)
42#define SPLASH_IMAGES (SPLASH_FILE << 16 | 1)
43#define STDWTITL_BACKGROUND(entry) (STDWTITL_FILE_BACKGROUND << 16 | (entry))
46#if VERSION_US || VERSION_JP
47#define STDWTITL_TEXTURE_Y 0
49#define STDWTITL_TEXTURE_Y 0x100
53#define STDWTITL_TITLE_SOUND_BANK 0x47
54#define STDWTITL_TITLE_MUSIC MUSIC(STDWTITL_TITLE_SOUND_BANK, 0)
59#define STDWTITL_SPLASH_MODE 12
60#elif VERSION_EU || VERSION_JP
61#define STDWTITL_SPLASH_MODE 13
229#if VERSION_US || VERSION_JP
#define INTERRUPT_SHARED
A variable that an interrupt's callback writes while the game waits for it in a loop: the original re...
#define TASK_HEADER(Type)
One frame of a sprite animation; frame 0xFF ends it (or loops it)
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
The fade out from the screen's edges once an option is chosen.
s32(* isDone)(struct EdgeFadeTask *task)
void(* start)(struct EdgeFadeTask *task)
A glint (sprite 4) played once, then sprite 2 lit.
void(* show)(struct GlintTask *task)
u8 pad[8]
never read or written
The logo: sprite 6, and sprites 3 and 5 animated once.
u8 pad[8]
never read or written
void(* show)(struct LogoTask *task)
s32 skip
start fully shown
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
The background, and its eight looping sprite animations.
A part of the title that slides in from a side of the screen.
u8 pad[8]
never read or written
void(* show)(struct SlideTask *task)
s16 fade
sprite frame: 15 is black, 0 fully visible
Any task, seen through its header.
void(* animate)(struct TitleBackgroundTask *task)
u8 pad[0x10]
never read or written
TitleBackgroundTask * background
s32(* updateLerp)(MenuLerp *lerp)
s32(* updateFade)(PanelAnim *fade)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
void(* startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 duration)
STDWTITL_tickScreen's children.
struct TitleLoaderTask * title
u8 pad[0xD8]
never read or written: createTask allocates 0x13C bytes
void STDWTITL_drawTitle0Alt(SlideTask *task)
Draws the first part of the title (sprite 0) for the European version's language 0.
void STDWTITL_tickScreen(Task *task, TitleModeChildren *children)
The overlay's main task: by the low byte of the game mode, starts the title screen (0),...
void STDWTITL_drawEdgeFade(s32 level)
Darkens the screen by level: four subtractive triangles from its centre to its edges,...
GlintTask * STDWTITL_startGlintTask(s32 skip)
Creates the title screen's glint (task); skip: lit from the start.
u_long * STDWTITL_vlcBuffer1
void STDWTITL_drawTitle1Alt(SlideTask *task)
slides.c
s16 STDWTITL_glintFrames[]
u8 STDWTITL_menuSprites[][4]
The menu's sprites (press start, new game, continue) for each language.
AnimFrame STDWTITL_backgroundAnim7[]
s32 STDWTITL_updateFade(PanelAnim *fade)
void STDWTITL_tickTitleLoader(TitleLoaderTask *task, TitleTask **title)
The title loader's task: waits for the title's sound bank, loads the title's images,...
AnimFrame STDWTITL_backgroundAnim1[]
EdgeLine STDWTITL_edgeFadeLines[]
The screen's edges, from which it fades out.
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...
s32 STDWTITL_isEdgeFadeDone(EdgeFadeTask *task)
1 once the edge fade has ended (the task's isDone)
TitleLoaderTask * STDWTITL_startTitleLoaderTask(void)
Creates the title loader (task) and starts loading the title's sound bank.
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);...
AnimFrame STDWTITL_backgroundAnim2[]
u_short * STDWTITL_vlcTable
Point16 STDWTITL_background7Positions[]
MovieTask * STDWTITL_startMovieTask(s32 movie)
Creates the task that plays STDWTITL_movies[movie].
AnimFrame STDWTITL_backgroundAnim4[]
GlintTask * STDWTITL_startGlintAltTask(s32 skip)
Creates the title screen's glint (task) for the European version's language 0.
s16 STDWTITL_logoFrames[2][13]
The sprite frames of the logo's two animations; -1 ends each.
RECT STDWTITL_screenRect
STDWTITL's data, in its order: data/stdwtitl.c's, data/title.c's and data/movie.c's.
SlideTask * STDWTITL_startTitle0AltTask(s32 skip)
Creates the first part of the title (task) for the European version's language 0.
void STDWTITL_resetMenu(TitleMenuTask *task)
Back to waiting for Start on "PRESS START" (the task's reset), only while running; nothing in the ove...
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,...
s32 STDWTITL_updateLerp(MenuLerp *lerp)
void STDWTITL_tickTitle1(SlideTask *task)
The second part of the title: waits until shown, then slides in from the right in 10 steps (skip is n...
void STDWTITL_tickSplashLoader(Task *task, SplashTask **splash)
scene.c
void STDWTITL_drawGlint(GlintTask *task)
Draws the glint (sprite 4) while it plays, and sprite 2 once lit.
void STDWTITL_drawTitle0(SlideTask *task)
Draws the first part of the title (sprite 0)
AnimFrame STDWTITL_backgroundAnim5[]
void STDWTITL_showTitle0(SlideTask *task)
Starts sliding in the first part of the title (the task's show), only while it waits.
SplashTask * STDWTITL_startSplashTask(void)
Creates the still screen (task)
void STDWTITL_runTitleLoader(TitleLoaderTask *task, TitleTask **title)
title_loader.c
SlideTask * STDWTITL_startTitle1AltTask(s32 skip)
Creates the second part of the title (task) for the European version's language 0.
s32 STDWTITL_leaveTitle(TitleTask *task, TitleChildren *children)
title.c
void STDWTITL_showTitle1(SlideTask *task)
Starts sliding in the second part of the title (the task's show), only while it waits.
void STDWTITL_showGlint(GlintTask *task)
Starts the glint (the task's show), only while it waits.
u_char StCdIntrFlag
libcd's flag that StCdInterrupt is pending: libcd sets it as a word, the game reads and clears its lo...
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...
s32 STDWTITL_stepTitle(TitleTask *task, TitleChildren *children)
Brings in the titles, the glint, the logo and the menu, then waits for an option; returns 1 once the ...
AnimFrame STDWTITL_backgroundAnim6[]
void STDWTITL_tickTitle1Alt(SlideTask *task)
The second part of the title for the European version's language 0: waits until shown,...
void STDWTITL_tickEdgeFade(EdgeFadeTask *task)
The edge fade's task: once started, darkens the screen from its edges over 30 frames and keeps it dar...
MoviePlayerTask * STDWTITL_startMoviePlayerTask(s32 file, u32 endFrame)
Creates the movie player (task) for the movie in file, which ends on frame endFrame.
void STDWTITL_startFade(PanelAnim *fade, s32 fadeIn)
s32 STDWTITL_getEdgeFadeLevel(s32 time)
edge_fade.c
s32 STDWTITL_stepLoopingAnimation(AnimState *anim, AnimFrame *frames, s32 depth)
background.c
Task * STDWTITL_startSplashLoaderTask(void)
Creates the still screen's loader (task), for STDWTITL_SPLASH_MODE.
void STDWTITL_tickSplash(SplashTask *task)
The still screen's task: fades it in, waits 2 seconds, then for Start or five minutes,...
void STDWTITL_tickGlintAlt(GlintTask *task)
The glint's task for the European version's language 0: waits until shown, plays the glint's 12 frame...
s16 STDWTITL_glintAltFrames[]
void STDWTITL_drawSplash(SplashTask *task)
splash.c
SlideTask * STDWTITL_startTitle1Task(s32 skip)
Creates the second part of the title (task)
LogoTask * STDWTITL_startLogoTask(s32 skip)
Creates the title screen's logo (task); skip: shown complete from the start.
EdgeFadeTask * STDWTITL_startEdgeFadeTask(void)
Creates the fade out from the screen's edges (task), once an option is chosen.
TitleFuncs STDWTITL_titleFuncs
void STDWTITL_tickGlint(GlintTask *task)
The glint's task: waits until shown, plays the glint once (up to its last frame and back),...
void STDWTITL_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
Point16 STDWTITL_background6Positions[]
void STDWTITL_showMenu(TitleMenuTask *task)
Shows "PRESS START" (the task's show), only while it waits.
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_drawBackgroundSprites(TitleBackgroundTask *task)
Steps and draws the background's eight looping sprite animations; the last two at the positions picke...
TitleImages STDWTITL_titleImages[]
The title's TIM archives and sprite banks; the European version picks one by the language.
void STDWTITL_startEdgeFade(EdgeFadeTask *task)
Starts the fade out from the screen's edges (the task's start)
void STDWTITL_drawTitle1(SlideTask *task)
Draws the second part of the title (sprite 1)
void STDWTITL_drawGlintAlt(GlintTask *task)
glint.c
void STDWTITL_tickBackground(TitleBackgroundTask *task)
The background's task: draws the background; once animated, also its eight sprite animations,...
void STDWTITL_tickTitle0Alt(SlideTask *task)
The first part of the title for the European version's language 0: waits until shown,...
void STDWTITL_tickMenu(TitleMenuTask *task)
The menu's task: once shown, waits for Start on "PRESS START" (choice 3 after ten seconds),...
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...
void STDWTITL_loadTitleImages(void)
Loads the title's images to VRAM: the sprites (by the language in the European version) and the backg...
void STDWTITL_drawBackground(TitleBackgroundTask *task)
Draws the title screen's background, from entries 0-2 of its file.
u_long * STDWTITL_vlcBuffer0
Point STDWTITL_menuCursorPositions[]
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_drawMenu(TitleMenuTask *task)
menu.c
void STDWTITL_tickTitle0(SlideTask *task)
The first part of the title: waits until shown, then slides in from the left in 10 steps (skip is not...
s32 STDWTITL_getMenuChoice(TitleMenuTask *task)
The menu's choice (the task's getChoice): 0 none yet, 1 new game, 2 continue, 3 timed out.
MovieInfo STDWTITL_movies[]
Each movie's file, the frame it ends on and the game mode after it.
AnimFrame STDWTITL_backgroundAnim0[]
u_long * STDWTITL_imageBuffer0
AnimFrame STDWTITL_backgroundAnim3[]
void STDWTITL_showLogo(LogoTask *task)
Starts the logo's animations (the task's show), only while it waits.
TitleTask * STDWTITL_startTitleTask(TitleLoaderTask *parent)
Creates the title screen (task), under its title loader parent.
void STDWTITL_animateBackground(TitleBackgroundTask *task)
Starts the background's sprite animations (the task's animate)
TitleMenuTask * STDWTITL_startMenuTask(s16 skip)
Creates the title screen's menu (task); skip: the two options shown from the start.
TitleBackgroundTask * STDWTITL_startBackgroundTask(s32 skip)
Creates the title screen's background (task); skip is not used.
void STDWTITL_tickLogo(LogoTask *task)
The logo's task: waits until shown, plays its two animations once (STDWTITL_logoFrames),...
u_long * STDWTITL_ringBuffer
void STDWTITL_drawLogo(LogoTask *task)
logo.c
u_long * STDWTITL_imageBuffer1
void STDWTITL_tickTitle(TitleTask *task, TitleChildren *children)
The title screen's task: creates its background, title parts, glint, logo and menu (the Alt ones for ...
void STDWTITL_clearVram(void)
movie.c
u32 STDWTITL_movieEndFrame
SlideTask * STDWTITL_startTitle0Task(s32 skip)
Creates the first part of the title (task)
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...