src/scene/shared/colosso_path_opponent.c
The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): the opponent who races Isaac by running a recorded path, and the race gauge that shows how near each of them is to the finish.
Included by colosseum_azart_match.c, colosseum_navampa_match.c and colosseum_satrage_match.c.
Structures
| Name | Description | |
|---|---|---|
struct | COLOSSO_RACE_STATE | The race's state in HEAP_SLOT_COLOSSO_RACE, allocated whole when the gauge starts: the gauge, then the opponent's path. |
Macros
| Name | Description | |
|---|---|---|
#define | COLOSSO_PATH_HALFWORDS (7200 * 2) | The halfwords of the opponent's path: x and z for 7,200 ticks, the last pair the (0, 0) that ends it, as scColossoUpdatePathOpponent records it. |
#define | GAUGE_PALETTE 14 | The gauge's sprite palette. |
#define | GAUGE_COURSE_PER_PIXEL 14 | Pixels of course a pixel of the gauge stands for. |
Enumerations
| Name | Description | |
|---|---|---|
enum | COLOSSO_GAUGE_TILE { GAUGE_TILE_END, GAUGE_TILE_BAR, GAUGE_TILE_FINISH, GAUGE_TIL … } | The gauge's tiles (gauge.png): the bar's end, a 16-pixel piece of bar, half of the finish at its centre, and the marks of the player (1P) and the opponent (2P). |
Functions
| Name | Description | |
|---|---|---|
static void | scColossoUpdatePathOpponent (void) | The opponent's event, each tick. |
static void | scColossoDrawGauge (void) | The race gauge's event: a bar across the top of the screen, with the finish at its centre and blinking marks for the opponent and Isaac at their distances from it. |
Variables
| Name | Description | |
|---|---|---|
extern Uint8 | ColossoGaugeGraphics [] | The gauge's packed tiles, decoded as it first shows. |
Description
The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): the opponent who races Isaac by running a recorded path, and the race gauge that shows how near each of them is to the finish.
Macros in detail
COLOSSO_PATH_HALFWORDS
#define COLOSSO_PATH_HALFWORDS (7200 * 2)
The halfwords of the opponent's path: x and z for 7,200 ticks, the last pair
the (0, 0) that ends it, as scColossoUpdatePathOpponent records it.
Referenced by scColossoUpdatePathOpponent().
Definition at line 7 of file colosso_path_opponent.c.
GAUGE_PALETTE
#define GAUGE_PALETTE 14
The gauge's sprite palette.
Referenced by scColossoDrawGauge().
Definition at line 137 of file colosso_path_opponent.c.
GAUGE_COURSE_PER_PIXEL
#define GAUGE_COURSE_PER_PIXEL 14
Pixels of course a pixel of the gauge stands for.
Referenced by scColossoDrawGauge().
Definition at line 140 of file colosso_path_opponent.c.
Enumerations in detail
COLOSSO_GAUGE_TILE
enum COLOSSO_GAUGE_TILE
The gauge's tiles (gauge.png): the bar's end, a 16-pixel piece of bar, half
of the finish at its centre, and the marks of the player (1P) and the
opponent (2P).
| Enumerator | Value | Description |
|---|---|---|
GAUGE_TILE_END | 0 | |
GAUGE_TILE_BAR | 2 | |
GAUGE_TILE_FINISH | 6 | |
GAUGE_TILE_PLAYER_MARK | 8 | |
GAUGE_TILE_OPPONENT_MARK | 12 | |
GAUGE_TILE_COUNT | 16 |
Definition at line 145 of file colosso_path_opponent.c.
Functions in detail
scColossoUpdatePathOpponent
static void scColossoUpdatePathOpponent(void)
The opponent's event, each tick. Playing, it puts him on the next point of
his path, turning at most FACING_STEP a tick to face the way he runs and
standing once he has kept still three ticks; at the path's end he walks to
the first prize, or the second when Isaac is there first, and holds it up.
Recording, it keeps the recorded actor's place each tick, and once the path
is full (two minutes) plays it back on the opponent.
References ColossoOpponentFinishScript, fdActorGetById(), fdActorSelectAnimation(), fdActorStartScript(), gmFlagGet(), gmFlagSet(), SceneLocalState, scFieldActorSetMoveTargetFX(), Sint32, state and syAtan().
Referenced by scColosseumSatrageMatchStartOpponentPath() and scColossoStartOpponent().
Definition at line 30 of file colosso_path_opponent.c.
scColossoDrawGauge
static void scColossoDrawGauge(void)
The race gauge's event: a bar across the top of the screen, with the finish
at its centre and blinking marks for the opponent and Isaac at their
distances from it. It slides down when the race starts and back up while
FLAG_MENU_OPEN is set; hold keeps it down.
References ColossoGaugeGraphics, ColossoGaugePalette, fdActorLookup(), gmFlagGet(), scFieldDecompressTaggedLZ(), Sint32, syDMAXCopy(), syHeapAllocateEWRAM(), syHeapCallAlternatePool(), syHeapRelease(), syOAMAddSpriteAtDepth(), syVRAMCacheLoad(), syVRAMCacheReleaseVRAM(), TickCount, VramCacheEntries and width.
Referenced by scColosseumSatrageMatchStartRaceGauge() and scColossoStartRaceGauge().
Definition at line 159 of file colosso_path_opponent.c.
Variables in detail
ColossoGaugeGraphics
extern Uint8 ColossoGaugeGraphics[]
The gauge's packed tiles, decoded as it first shows.
Referenced by scColosseumSatrageMatchStartRaceGauge(), scColossoDrawGauge() and scColossoStartRaceGauge().
Definition at line 134 of file colosso_path_opponent.c.