13 switch (task->
state) {
26 for (i = 0; i < 2; i++) {
27 if (now - task->
times[i] > i + 1) {
31 task->
pos[i][0] = task->
pos[i][1] = 0;
76 switch (task->
state) {
89 if (task->
frame >= 36) {
114 switch (task->
state) {
void STPLNMET_updateSparkles(NameSparkle *task)
The sparkles' task: draws five sparkles in place, all on the same looping frame.
void STPLNMET_setScrollLayer(NameScroll *task, s32 layer, s32 depth)
Sets the layer and depth the scrolling sprites are drawn in (scroll->setLayer)
NameSparkle * STPLNMET_createShine(void)
Creates the shine (task)
NameSparkle * STPLNMET_createSparkles(void)
Creates the sparkles (task)
void STPLNMET_updateScroll(NameScroll *task)
The scrolling sprites' task: once their image is loaded, moves the two sprites diagonally at differen...
void STPLNMET_loadScroll(NameScroll *task, s32 x, s32 y)
Loads the scrolling sprites' image into VRAM at (x, y) (scroll->load)
NameScroll * STPLNMET_createScroll(void)
Creates the scrolling sprites (task), drawn once their image is loaded.
void STPLNMET_updateShine(NameSparkle *task)
The shine's task: draws a sprite animated by STPLNMET_sparkleFrames, looping.
GfxState GFX
GFX: the graphics state and its methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
FileCache FILE_CACHE
The file cache.
STPLNMET.PRO: the player's name entry (MODE_PLAYER_NAME).
#define PLNMET_MENU
sprite bank
#define FILE_PLNMET_IMAGE
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
s32 STPLNMET_scrollEnds[]
Where each scroll layer starts over (STPLNMET_updateScroll)
SparkleFrame STPLNMET_sparkleFrames[]
The sparkle's frames (STPLNMET_updateShine): sprite 0 starts over.
void *(* getEntry)(u32 fileAndIndex)
An animated sprite (STPLNMET_updateSparkles, STPLNMET_updateShine)
void(* nextState)(struct NameSparkle *task)
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
void(* setImagePos)()
(x, y)
void(* loadArchive)()
(archive): each image 64 halfwords to the right
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.