Alchemy
Loading...
Searching...
No Matches

colosso_task.h File Reference

Go to the source code of this file.

Data Structures

struct  Sprite
 One lettering piece as queued for drawing: a header word, then its OAM attributes. More...

Enumerations

enum  ColossoLetteringCommand {
  COLOSSO_LETTERING_PLACE = 0x4000 , COLOSSO_LETTERING_ACCELERATE = 0x3000 , COLOSSO_LETTERING_SCALE = 0x1000 , COLOSSO_LETTERING_FADE = 0x2000 ,
  COLOSSO_LETTERING_WAIT = 0x7fff , COLOSSO_LETTERING_END = -1
}
 The Colosso finals' three courses (Colosso Log, River and Wall): the large lettering a race starts with. More...

Functions

static __inline__ void Dma_Wait (volatile u32 *dma)
static void Colosso_LoadLettering (s32 id)
 Loads lettering picture id into the lettering's VRAM block (taken once) and its palette into sprite palette 15.
static void Colosso_UpdateLettering (void)
 The lettering's scene callback: run its script, move, scale and fade it, and draw it as double-size affine sprites blended over the screen, in the shape of gColosso_LetteringMode (gColosso_LetteringParam picks the second half of a picture): 1: four 32x16 pieces in a row (Match 1 to 3, Lend a Hand); 2: one 32x32 piece (3, 2, 1); 3: two 32x16 pieces (Won or Lose); 4: Go!

Variables

s16 gColosso_LetteringTimer
s16 gColosso_ModeMoveTarget
s16 gColosso_ModeMoveDuration
s16 gColosso_LetteringMode
s16 gColosso_LetteringParam
s32 gColosso_LetteringPosition
s16 * gColosso_LetteringScript

Enumeration Type Documentation

◆ ColossoLetteringCommand

The Colosso finals' three courses (Colosso Log, River and Wall): the large lettering a race starts with.

It reads "Match 1", "3", "2", "1", "Go!", from the pictures of games/tbs/src/graphics/colosso/lettering.tsv, in this order: 0 Lend a Hand, 1 to 3 Match 1 to 3, 4 Won and Lose, 5 the 3 and the 2, 6 the 1 and 7 Go. Each picture is 0x400 bytes of tiles after the palettes.

The lettering moves by a script of 16-bit words, a command and its values:

Enumerator
COLOSSO_LETTERING_PLACE 

x, speed: put the lettering at x pixels from the centre, moving at speed 256ths of a pixel a frame

COLOSSO_LETTERING_ACCELERATE 

speed, frames: change the speed over that many frames

COLOSSO_LETTERING_SCALE 

scale, frames: grow or shrink to scale (256 is its own size)

COLOSSO_LETTERING_FADE 

weight, frames: fade to weight sixteenths over the screen

COLOSSO_LETTERING_WAIT 

frames: run the moves for that many frames before the next command

COLOSSO_LETTERING_END 

remove the lettering and free its VRAM block

Definition at line 32 of file colosso_task.h.

Function Documentation

◆ Dma_Wait()

__inline__ void Dma_Wait ( volatile u32 * dma)
static

◆ Colosso_LoadLettering()

void Colosso_LoadLettering ( s32 id)
static

Loads lettering picture id into the lettering's VRAM block (taken once) and its palette into sprite palette 15.

Picture 8 is picture 4 in another palette.

Definition at line 70 of file colosso_task.h.

◆ Colosso_UpdateLettering()

void Colosso_UpdateLettering ( void )
static

The lettering's scene callback: run its script, move, scale and fade it, and draw it as double-size affine sprites blended over the screen, in the shape of gColosso_LetteringMode (gColosso_LetteringParam picks the second half of a picture): 1: four 32x16 pieces in a row (Match 1 to 3, Lend a Hand); 2: one 32x32 piece (3, 2, 1); 3: two 32x16 pieces (Won or Lose); 4: Go!

, one 64x32 piece, or two 32x16 in French.

Definition at line 96 of file colosso_task.h.

Referenced by Colosso_UpdateLettering().

Variable Documentation

◆ gColosso_LetteringTimer

◆ gColosso_ModeMoveTarget

◆ gColosso_ModeMoveDuration

◆ gColosso_LetteringMode

◆ gColosso_LetteringParam

◆ gColosso_LetteringPosition

◆ gColosso_LetteringScript