src/scene/shared/colosso_task.c
The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): the large lettering a race starts with. More…
Included by colosseum_azart_match.c, colosseum_navampa_match.c and colosseum_satrage_match.c.
Macros
| Name | Description | |
|---|---|---|
#define | COLOSSO_LETTERING_PICTURE_BYTES (4 * 32 * 16 / 2) | The bytes of one lettering picture's tiles: 2,048 pixels at 4 bits each, as four 32x16 pieces or two 32x32 ones (lettering.tsv). |
#define | COLOSSO_LETTERING_SUBPIXELS 256 | The lettering's x and speed are kept in 256ths of a pixel. |
#define | COLOSSO_LETTERING_DEPTH (OAM_DEPTH_WINDOW - 4) | The lettering's sprites are drawn just behind the windows. |
#define | COLOSSO_LETTERING_PALETTE 15 | The sprite palette the lettering's colours are loaded into. |
#define | COLOSSO_LETTERING_PIECE_X (i, n) ((i) * 32 - ((n) - 1) * 16) | The lettering's pieces are 32 pixels wide: piece i of a row of n lies this far from the row's centre. |
Enumerations
| Name | Description | |
|---|---|---|
enum | COLOSSO_LETTERING_COMMAND { COLOSSO_LETTERING_PLACE, COLOSSO_LETTERING_ACCELERATE, COLOS … } | The lettering moves by a script of 16-bit words, a command and its values: |
enum | COLOSSO_LETTERING_PICTURE { COLOSSO_PICTURE_LEND_A_HAND, COLOSSO_PICTURE_MATCH_TITLE_FIR … } | The lettering pictures, in lettering.tsv's order (scColossoLoadLettering). |
enum | COLOSSO_LETTERING_SHAPE { COLOSSO_SHAPE_TITLE, COLOSSO_SHAPE_DIGIT, COLOSSO_SHAPE_RESU … } | How scColossoUpdateLettering lays a picture out (ColossoLetteringMode); ColossoLetteringParameter picks the second half of a picture. |
Functions
| Name | Description | |
|---|---|---|
static void | scColossoLoadLettering (Sint32 id) | Loads lettering picture id into the lettering's VRAM block (taken once) and its palette into COLOSSO_LETTERING_PALETTE. |
static void | scColossoUpdateLettering (void) | The lettering's event: run its script, move, scale and fade it, and draw it as double-size affine sprites blended over the screen, in the shape of ColossoLetteringMode. |
Variables
| Name | Description | |
|---|---|---|
extern Sint16 | ColossoLetteringTimer | The lettering's script as it runs: the ticks its wait has left, its glide's target and ticks, its layout mode and parameter, its position (8.8 pixels) and the script itself. |
extern Sint16 | ColossoLetteringMoveTarget | |
extern Sint16 | ColossoLetteringMoveDuration | |
extern Sint16 | ColossoLetteringMode | |
extern Sint16 | ColossoLetteringParameter | |
extern Sint32 | ColossoLetteringPosition | |
extern Sint16 * | ColossoLetteringScript |
Description
The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3):
the large lettering a race starts with. It reads "The 1st Match", "3", "2",
"1", "GO", from the pictures of games/tbs/src/graphics/colosso/lettering.tsv
(COLOSSO_LETTERING_PICTURE). Each picture is COLOSSO_LETTERING_PICTURE_BYTES
of tiles after the palettes.
Macros in detail
COLOSSO_LETTERING_PICTURE_BYTES
#define COLOSSO_LETTERING_PICTURE_BYTES (4 * 32 * 16 / 2)
The bytes of one lettering picture's tiles: 2,048 pixels at 4 bits each, as
four 32x16 pieces or two 32x32 ones (lettering.tsv).
Referenced by scColossoLoadLettering().
Definition at line 45 of file colosso_task.c.
COLOSSO_LETTERING_SUBPIXELS
#define COLOSSO_LETTERING_SUBPIXELS 256
The lettering's x and speed are kept in 256ths of a pixel.
Referenced by scColossoUpdateLettering().
Definition at line 48 of file colosso_task.c.
COLOSSO_LETTERING_DEPTH
#define COLOSSO_LETTERING_DEPTH (OAM_DEPTH_WINDOW - 4)
The lettering's sprites are drawn just behind the windows.
Referenced by scColossoUpdateLettering().
Definition at line 51 of file colosso_task.c.
COLOSSO_LETTERING_PALETTE
#define COLOSSO_LETTERING_PALETTE 15
The sprite palette the lettering's colours are loaded into.
Referenced by scColossoLoadLettering() and scColossoUpdateLettering().
Definition at line 53 of file colosso_task.c.
COLOSSO_LETTERING_PIECE_X
#define COLOSSO_LETTERING_PIECE_X(i, n) ((i) * 32 - ((n) - 1) * 16)
The lettering's pieces are 32 pixels wide: piece i of a row of n lies this far from the row's centre.
Referenced by scColossoUpdateLettering().
Definition at line 56 of file colosso_task.c.
Enumerations in detail
COLOSSO_LETTERING_COMMAND
enum COLOSSO_LETTERING_COMMAND
The lettering moves by a script of 16-bit words, a command and its values:
| Enumerator | Value | Description |
|---|---|---|
COLOSSO_LETTERING_PLACE | 0x4000 | x, speed: put the lettering at x pixels from the centre, moving speed / COLOSSO_LETTERING_SUBPIXELS pixels a tick |
COLOSSO_LETTERING_ACCELERATE | 0x3000 | speed, ticks: change the speed over that many ticks |
COLOSSO_LETTERING_SCALE | 0x1000 | scale, ticks: grow or shrink to scale (256 is its own size) |
COLOSSO_LETTERING_FADE | 0x2000 | weight, ticks: fade to weight sixteenths over the screen |
COLOSSO_LETTERING_WAIT | 0x7fff | ticks: run the moves for that many ticks before the next command |
COLOSSO_LETTERING_END | -1 | remove the lettering and free its VRAM block |
Definition at line 10 of file colosso_task.c.
COLOSSO_LETTERING_PICTURE
enum COLOSSO_LETTERING_PICTURE
The lettering pictures, in lettering.tsv's order (scColossoLoadLettering).
| Enumerator | Value | Description |
|---|---|---|
COLOSSO_PICTURE_LEND_A_HAND | 0 | |
COLOSSO_PICTURE_MATCH_TITLE_FIRST | 1 | "The 1st Match", then the 2nd and |
COLOSSO_PICTURE_WIN_LOSE | 4 | 3rd |
COLOSSO_PICTURE_COUNTDOWN_START | 5 | the countdown's 3 and 2 |
COLOSSO_PICTURE_COUNTDOWN_END | 6 | the countdown's 1 |
COLOSSO_PICTURE_GO | 7 | |
COLOSSO_PICTURE_WIN_LOSE_FOR_LOSS | 8 | COLOSSO_PICTURE_WIN_LOSE in the blue loss palette |
Definition at line 30 of file colosso_task.c.
COLOSSO_LETTERING_SHAPE
enum COLOSSO_LETTERING_SHAPE
How scColossoUpdateLettering lays a picture out (ColossoLetteringMode);
ColossoLetteringParameter picks the second half of a picture.
| Enumerator | Value | Description |
|---|---|---|
COLOSSO_SHAPE_TITLE | 1 | Four 32x16 pieces in a row: The 1st to 3rd Match, Lend a Hand! |
COLOSSO_SHAPE_DIGIT | 2 | one 32x32 piece: 3, 2, 1 |
COLOSSO_SHAPE_RESULT | 3 | two 32x16 pieces: WIN or LOSE |
COLOSSO_SHAPE_GO | 4 | Go!: one 64x32 piece, or two 32x16 in French |
Definition at line 60 of file colosso_task.c.
Functions in detail
scColossoLoadLettering
static void scColossoLoadLettering(Sint32 id)
Loads lettering picture id into the lettering's VRAM block (taken once) and
its palette into COLOSSO_LETTERING_PALETTE.
References ColossoLetteringPaletteOffsets, ColossoLetteringSlot, mnVRAMLoad(), scFieldDecompressTaggedLZ(), Sint32, syDMAWait(), syDMAXCopy(), syHeapAllocateEWRAM(), syHeapRelease(), syResourceGetTableEntry() and syVRAMCacheFindFreeEntry().
Referenced by scColossoShowMatchResult() and scColossoShowOpeningLettering().
Definition at line 82 of file colosso_task.c.
scColossoUpdateLettering
static void scColossoUpdateLettering(void)
The lettering's event: run its script, move, scale and fade it, and draw it
as double-size affine sprites blended over the screen, in the shape of
ColossoLetteringMode.
References ColossoLetteringFadeStart, ColossoLetteringFadeStep, ColossoLetteringFadeTarget, ColossoLetteringMode, ColossoLetteringMoveDuration, ColossoLetteringMoveStart, ColossoLetteringMoveStep, ColossoLetteringMoveTarget, ColossoLetteringParameter, ColossoLetteringPosition, ColossoLetteringScaleDuration, ColossoLetteringScaleStart, ColossoLetteringScaleStep, ColossoLetteringScaleTarget, ColossoLetteringScript, ColossoLetteringSlot, ColossoLetteringSprites, ColossoLetteringTimer, Sint32, syCloseEvent(), syOAMAddSpriteAtDepth(), syOAMMatrixAllocateFromTransform(), syVRAMCacheFreeEntry() and VramCacheEntries.
Referenced by scColossoStartLettering().
Definition at line 112 of file colosso_task.c.
Variables in detail
ColossoLetteringScript
extern Sint16 *ColossoLetteringScript
Referenced by scColossoStartLettering() and scColossoUpdateLettering().
Definition at line 78 of file colosso_task.c.