Skip to Content
The Alchemy Project

src/scene/shared/colosso_setup.c

Colosseum Final 1 and 3: setting up a race against the opponent, with the race gauge at the top of the screen and the opponent running a recorded path (colosso_path_opponent.c).

Included by colosseum_azart_match.c and colosseum_navampa_match.c.

Functions

NameDescription
voidscColossoStartRaceGauge (Sint32 playerActorId, Sint32 opponentActorId, Sint32 segments, FIXED finishX, FIXED finishZ, Sint32 finishItemActorIdA, Sint32 finishItemActorIdB)Starts the race gauge (COLOSSO_RACE_STATE, in HEAP_SLOT_COLOSSO_RACE): Isaac and the opponent as playerActorId and opponentActorId, a bar of segments pieces either side, and the finish at pixel (finishX, finishZ) in 16.16, where the two item actors stand.
voidscColossoStartOpponent (Sint32 resource)Decodes the opponent's recorded path (resource) after the gauge's state and, unless the party returns to where it was, has the opponent run it from the start, mirrored across the finish; then starts the opponent's event.

Description

Colosseum Final 1 and 3: setting up a race against the opponent, with the race gauge at the top of the screen and the opponent running a recorded path (colosso_path_opponent.c).

Functions in detail

scColossoStartRaceGauge

void scColossoStartRaceGauge(Sint32 playerActorId, Sint32 opponentActorId, Sint32 segments, FIXED finishX, FIXED finishZ, Sint32 finishItemActorIdA, Sint32 finishItemActorIdB)

Starts the race gauge (COLOSSO_RACE_STATE, in HEAP_SLOT_COLOSSO_RACE): Isaac and the opponent as playerActorId and opponentActorId, a bar of segments pieces either side, and the finish at pixel (finishX, finishZ) in 16.16, where the two item actors stand. Unless the party returns to where it was, the opponent is put opposite Isaac across x = finishX.

References ColossoGaugeGraphics, fdActorGet(), gmFlagGet(), scColossoDrawGauge(), scFieldDecompressTaggedLZ(), Sint32, state, syHeapAllocateEWRAM(), syHeapRelease(), syHeapSlotAllocateEWRAM(), sySetTickEvent(), syVRAMCacheFindFreeEntry() and syVRAMCacheLoad().

Referenced by scInit().

Definition at line 10 of file colosso_setup.c.

scColossoStartOpponent

void scColossoStartOpponent(Sint32 resource)

Decodes the opponent's recorded path (resource) after the gauge's state and, unless the party returns to where it was, has the opponent run it from the start, mirrored across the finish; then starts the opponent's event.

References gmFlagGet(), scColossoUpdatePathOpponent(), SceneLocalState, scFieldDecompressTaggedLZ(), Sint32, state, syResourceGetTableEntry() and sySetTickEvent().

Referenced by scInit().

Definition at line 62 of file colosso_setup.c.