Skip to Content
The Alchemy Project

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

NameDescription
structCOLOSSO_RACE_STATEThe race's state in HEAP_SLOT_COLOSSO_RACE, allocated whole when the gauge starts: the gauge, then the opponent's path.

Macros

NameDescription
#defineCOLOSSO_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.
#defineGAUGE_PALETTE 14The gauge's sprite palette.
#defineGAUGE_COURSE_PER_PIXEL 14Pixels of course a pixel of the gauge stands for.

Enumerations

NameDescription
enumCOLOSSO_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

NameDescription
static voidscColossoUpdatePathOpponent (void)The opponent's event, each tick.
static voidscColossoDrawGauge (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

NameDescription
extern Uint8ColossoGaugeGraphics []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).

EnumeratorValueDescription
GAUGE_TILE_END0
GAUGE_TILE_BAR2
GAUGE_TILE_FINISH6
GAUGE_TILE_PLAYER_MARK8
GAUGE_TILE_OPPONENT_MARK12
GAUGE_TILE_COUNT16

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.