Skip to Content
The Alchemy Project

src/scene/shared/colosso_finish.c

The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): the end of the race at the arena, where each warrior walks up to a prize and holds it up. More…

Included by colosseum_azart_match.c, colosseum_navampa_match.c and colosseum_satrage_match.c.

Macros

NameDescription
#defineCOLOSSO_GIVE_AND_EQUIP_ITEM scGiveAndEquipItem
#definePRIZE_SETTLE_SPEED toFIXED(0.0039)The speed, in pixels a tick, below which the raised prize has settled.

Functions

NameDescription
static voidscColossoNoOperation (void)Does nothing; the arena's step script calls it first.
static voidscColossoMarkOpponentFinished (void)Unused: marks the opponent's recorded run finished, as scColossoUpdatePathOpponent does when it reaches the end of the path.
static voidscColossoWaitForOpponentToFinish (void)Waits until the opponent has run his recorded path to its end.
static voidscColossoSparkleAroundPrize (ACTOR *prize)The raised prize's hook (ColossoPrizeScript): it settles once it has almost stopped rising, and on about one tick in ten a sparkle (ColossoPrizeSparkleScript) appears somewhere within 16 pixels of it.
static Sint32scColossoRaisePrize (ACTOR *warrior)Called from a warrior's finish script once he stands at his prize: the prize (the actor id in his prizeActorId) rises to 36 pixels above him with the treasure jingle, and the cleared prizeActorId lets scColossoTakePrize go on.
static Sint32scColossoTakePrize (Sint32 firstItem, Sint32 secondItem)Isaac reaches the finish: he walks up to the first prize, or the second when the opponent is there before him, holds it up, is given and equipped with it, and MsgGotItem names him and the item he got.

Description

The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): the end of the race at the arena, where each warrior walks up to a prize and holds it up. The first to arrive takes the better one (ColossoOpponentFinishScript, ColossoLeaderFinishScript).

Macros in detail

COLOSSO_GIVE_AND_EQUIP_ITEM

#define COLOSSO_GIVE_AND_EQUIP_ITEM scGiveAndEquipItem

#define COLOSSO_GIVE_AND_EQUIP_ITEM

Referenced by scColossoTakePrize().

Definition at lines 9 and 11 of file colosso_finish.c.

PRIZE_SETTLE_SPEED

#define PRIZE_SETTLE_SPEED toFIXED(0.0039)

The speed, in pixels a tick, below which the raised prize has settled.

Referenced by scColossoSparkleAroundPrize().

Definition at line 41 of file colosso_finish.c.

Functions in detail

scColossoNoOperation

static void scColossoNoOperation(void)

Does nothing; the arena's step script calls it first.

Referenced by scColossoReachArena().

Definition at line 16 of file colosso_finish.c.

scColossoMarkOpponentFinished

static void scColossoMarkOpponentFinished(void)

Unused: marks the opponent's recorded run finished, as scColossoUpdatePathOpponent does when it reaches the end of the path.

References SceneLocalState.

Definition at line 22 of file colosso_finish.c.

scColossoWaitForOpponentToFinish

static void scColossoWaitForOpponentToFinish(void)

Waits until the opponent has run his recorded path to its end.

References SceneLocalState and sySynch().

Referenced by scColossoReachArena().

Definition at line 30 of file colosso_finish.c.

scColossoSparkleAroundPrize

static void scColossoSparkleAroundPrize(ACTOR *prize)

The raised prize's hook (ColossoPrizeScript): it settles once it has almost stopped rising, and on about one tick in ten a sparkle (ColossoPrizeSparkleScript) appears somewhere within 16 pixels of it.

References ColossoPrizeSparkleScript, fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), scFieldActorCreate(), Sint32, syRandomNext() and syVectorAddPolarOffset().

Referenced by ColossoPrizeScript.

Definition at line 46 of file colosso_finish.c.

scColossoRaisePrize

static Sint32 scColossoRaisePrize(ACTOR *warrior)

Called from a warrior's finish script once he stands at his prize: the prize (the actor id in his prizeActorId) rises to 36 pixels above him with the treasure jingle, and the cleared prizeActorId lets scColossoTakePrize go on.

References ColossoPrizeScript, fdActorGet(), fdActorStartScript(), scFieldActorSetMoveTargetFX(), Sint32 and sySoundPlay().

Referenced by ColossoLeaderFinishScript and ColossoOpponentFinishScript.

Definition at line 86 of file colosso_finish.c.

scColossoTakePrize

static Sint32 scColossoTakePrize(Sint32 firstItem, Sint32 secondItem)

Isaac reaches the finish: he walks up to the first prize, or the second when the opponent is there before him, holds it up, is given and equipped with it, and MsgGotItem names him and the item he got. Returns nonzero when the opponent arrived first.

References ColossoLeaderFinishScript, fdActorGet(), fdActorStartScript(), fdActorWaitForScriptEnd(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, mnFieldMessageShow(), mnMessageArgumentPush(), scFieldActorSetMoveTargetFX(), Sint32 and sySynch().

Referenced by scColossoReachArena().

Definition at line 105 of file colosso_finish.c.