Skip to Content
The Alchemy Project

src/scene/shared/colosso_guide.c

The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): what a stage's guide uses to describe the stage. More…

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

Macros

NameDescription
#defineFIELD_OUTLINE_EDGE 15The sprite outline's colours: the field's own, as field_actors.c sets them up, and those of the warrior a stage's guide shows.
#defineFIELD_OUTLINE_FILL 0
#defineWARRIOR_OUTLINE_EDGE 1
#defineWARRIOR_OUTLINE_FILL 4
#definePOINTER_SHOWN_TICKS 13The guide's pointer: one 16x16 sprite centred on a point of the screen, shown for POINTER_SHOWN_TICKS of every POINTER_BLINK_TICKS, that can glide from point to point.
#definePOINTER_BLINK_TICKS 20

Functions

NameDescription
voidscColossoFadeInWarrior (Sint32 id, Sint32 x, Sint32 z)Isaac (id) appears at pixel (x, z) on the stage, facing south: he fades in through the backgrounds while he stretches from thin and tall to his own shape, settles and nods.
voidscColossoRestoreWarrior (Sint32 id)Puts Isaac (id) back where scColossoFadeInWarrior found him: he stands if he was climbing, or else turns south, nods and waits half a second; then returns to his kept position and facing with his motion stopped, and the outline colours are the field's again.
voidscActorResetMotionFields (Sint32 actorId)Stops the actor where it is: no velocity and no destination.
static voidscColossoLoadPointer (void)Loads the pointer's picture into a free VRAM block, once.
static voidscColossoUpdatePointer (void)The pointer's event: glide one step, then draw it while it blinks on (a glide keeps it on).
voidscColossoShowPointer (Uint32 x, Uint32 y, Uint32 style)Shows the pointer at screen pixel (x, y), mirrored by style & 3 (1 left to right, 2 top to bottom); every caller passes 0.
voidscColossoMovePointer (Uint32 x, Uint32 y, Uint32 duration)Glides the pointer to screen pixel (x, y) over duration ticks.
voidscColossoHidePointer (void)Hides the pointer and frees its VRAM block.
voidscColossoWalkActorTo (Sint32 actorId, Sint32 x, Sint32 z)Runs the actor at 2 pixels a tick towards pixel (x, z) and returns at once.
voidscColossoWalkActorToAndStand (Sint32 actorId, Sint32 x, Sint32 z)Runs the actor at 1.25 pixels a tick to pixel (x, z), waits until it arrives and stands it there.

Variables

NameDescription
extern Sint16ColossoPointerStepsThe pointer's glide: its steps and the step it is on, where it is now, where the glide started and where it ends (screen pixels), its blink counter and its flip.
extern Sint16ColossoPointerStep
extern Sint16ColossoPointerX
extern POINTER_COORDINATEColossoPointerStartX
extern Sint16ColossoPointerEndX
extern Sint16ColossoPointerY
extern POINTER_COORDINATEColossoPointerStartY
extern Sint16ColossoPointerEndY
extern Sint16ColossoPointerBlink
extern Sint16ColossoPointerFlip

Description

The sites of the three Colosso finals matches (Colosseum Final 1, 2 and 3): what a stage's guide uses to describe the stage. Isaac appears on the stage to show how it is crossed, a blinking pointer moves over the screen, and Isaac is put back where he stood.

Macros in detail

FIELD_OUTLINE_EDGE

#define FIELD_OUTLINE_EDGE 15

The sprite outline's colours: the field's own, as field_actors.c sets them up, and those of the warrior a stage's guide shows.

Referenced by scColossoRestoreWarrior().

Definition at line 8 of file colosso_guide.c.

FIELD_OUTLINE_FILL

#define FIELD_OUTLINE_FILL 0

Referenced by scColossoRestoreWarrior().

Definition at line 9 of file colosso_guide.c.

WARRIOR_OUTLINE_EDGE

#define WARRIOR_OUTLINE_EDGE 1

Referenced by scColossoFadeInWarrior().

Definition at line 10 of file colosso_guide.c.

WARRIOR_OUTLINE_FILL

#define WARRIOR_OUTLINE_FILL 4

Referenced by scColossoFadeInWarrior().

Definition at line 11 of file colosso_guide.c.

POINTER_SHOWN_TICKS

#define POINTER_SHOWN_TICKS 13

The guide's pointer: one 16x16 sprite centred on a point of the screen, shown for POINTER_SHOWN_TICKS of every POINTER_BLINK_TICKS, that can glide from point to point.

Referenced by scColossoUpdatePointer().

Definition at line 132 of file colosso_guide.c.

#define POINTER_BLINK_TICKS 20

Referenced by scColossoUpdatePointer().

Definition at line 133 of file colosso_guide.c.

Functions in detail

scColossoFadeInWarrior

void scColossoFadeInWarrior(Sint32 id, Sint32 x, Sint32 z)

Isaac (id) appears at pixel (x, z) on the stage, facing south: he fades in through the backgrounds while he stretches from thin and tall to his own shape, settles and nods. While he is shown his sprite is outlined in the warrior's colours. His position and facing are kept for scColossoRestoreWarrior.

References ColossoWarriorStartAngle, ColossoWarriorStartX, ColossoWarriorStartZ, fdActorFaceActorById(), fdActorGetById(), fdActorSelectAnimation(), fdActorSetAnimationAndWait(), fdActorSetPosFX(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdScriptWait(), Sint32, sySoundPlay() and sySynch().

Referenced by scColosseumAzartMatchTalkToBridgeAttendant(), scColosseumAzartMatchTalkToLumberAttendant(), scColosseumAzartMatchTalkToRockAttendant(), scColosseumNavampaMatchTalkToFreeClimbAttendant(), scColosseumNavampaMatchTalkToMovingSidewalkAttendant(), scColosseumNavampaMatchTalkToSteppingStoneAttendant(), scColosseumNavampaMatchTalkToWallWedgeAttendant(), scColosseumSatrageMatchTalkToBoardWalkAttendant(), scColosseumSatrageMatchTalkToLogRollingAttendant(), scColosseumSatrageMatchTalkToMiniMazeAttendant(), scColosseumSatrageMatchTalkToShiftingFloorAttendant() and scColosseumSatrageMatchTalkToWallAttendant().

Definition at line 18 of file colosso_guide.c.

scColossoRestoreWarrior

void scColossoRestoreWarrior(Sint32 id)

Puts Isaac (id) back where scColossoFadeInWarrior found him: he stands if he was climbing, or else turns south, nods and waits half a second; then returns to his kept position and facing with his motion stopped, and the outline colours are the field's again.

References ColossoWarriorStartAngle, ColossoWarriorStartX, ColossoWarriorStartZ, fdActorFaceDirection(), fdActorGetById(), fdActorSelectAnimation(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdScriptWait(), MainRoutineStateWork, Sint32 and sySynch().

Referenced by scColosseumAzartMatchTalkToBridgeAttendant(), scColosseumAzartMatchTalkToLumberAttendant(), scColosseumAzartMatchTalkToRockAttendant(), scColosseumNavampaMatchTalkToFreeClimbAttendant(), scColosseumNavampaMatchTalkToMovingSidewalkAttendant(), scColosseumNavampaMatchTalkToSteppingStoneAttendant(), scColosseumNavampaMatchTalkToWallWedgeAttendant(), scColosseumSatrageMatchTalkToBoardWalkAttendant(), scColosseumSatrageMatchTalkToLogRollingAttendant(), scColosseumSatrageMatchTalkToMiniMazeAttendant(), scColosseumSatrageMatchTalkToShiftingFloorAttendant() and scColosseumSatrageMatchTalkToWallAttendant().

Definition at line 80 of file colosso_guide.c.

scActorResetMotionFields

void scActorResetMotionFields(Sint32 actorId)

Stops the actor where it is: no velocity and no destination.

References fdActorGetById(), fdActorStartIdle() and Sint32.

Referenced by scColosseumAzartMatchTalkToRockAttendant() and scColosseumNavampaMatchTalkToMovingSidewalkAttendant().

Definition at line 118 of file colosso_guide.c.

scColossoLoadPointer

static void scColossoLoadPointer(void)

Loads the pointer's picture into a free VRAM block, once.

References ColossoPointerSlot and mnPointingHandLoadIntoFreeSlot().

Referenced by scColossoShowPointer().

Definition at line 136 of file colosso_guide.c.

scColossoUpdatePointer

static void scColossoUpdatePointer(void)

The pointer's event: glide one step, then draw it while it blinks on (a glide keeps it on).

References ColossoPointerBlink, ColossoPointerEndX, ColossoPointerEndY, ColossoPointerFlip, ColossoPointerOam, ColossoPointerSlot, ColossoPointerStartX, ColossoPointerStartY, ColossoPointerStep, ColossoPointerSteps, ColossoPointerX, ColossoPointerY, Sint32, syOAMAddSpriteAtDepth() and VramCacheEntries.

Referenced by scColossoHidePointer(), scColossoMovePointer() and scColossoShowPointer().

Definition at line 160 of file colosso_guide.c.

scColossoShowPointer

void scColossoShowPointer(Uint32 x, Uint32 y, Uint32 style)

Shows the pointer at screen pixel (x, y), mirrored by style & 3 (1 left to right, 2 top to bottom); every caller passes 0.

References ColossoPointerBlink, ColossoPointerFlip, ColossoPointerSteps, ColossoPointerX, ColossoPointerY, scColossoLoadPointer(), scColossoUpdatePointer() and sySetTickEvent().

Referenced by scColosseumAzartMatchTalkToLumberAttendant(), scColosseumAzartMatchTalkToPipeworksAttendant(), scColosseumNavampaMatchTalkToLogRollingAttendant(), scColosseumNavampaMatchTalkToScalesAttendant() and scColosseumNavampaMatchTalkToSteppingStoneAttendant().

Definition at line 209 of file colosso_guide.c.

scColossoMovePointer

void scColossoMovePointer(Uint32 x, Uint32 y, Uint32 duration)

Glides the pointer to screen pixel (x, y) over duration ticks.

References ColossoPointerEndX, ColossoPointerEndY, ColossoPointerStartX, ColossoPointerStartY, ColossoPointerStep, ColossoPointerSteps, ColossoPointerX, ColossoPointerY, scColossoUpdatePointer() and sySetTickEvent().

Referenced by scColosseumAzartMatchTalkToPipeworksAttendant(), scColosseumNavampaMatchTalkToLogRollingAttendant(), scColosseumNavampaMatchTalkToScalesAttendant() and scColosseumNavampaMatchTalkToSteppingStoneAttendant().

Definition at line 223 of file colosso_guide.c.

scColossoHidePointer

void scColossoHidePointer(void)

Hides the pointer and frees its VRAM block.

References ColossoPointerSlot, scColossoUpdatePointer(), syCloseEvent() and syVRAMCacheFreeEntry().

Referenced by scColosseumAzartMatchTalkToLumberAttendant(), scColosseumAzartMatchTalkToPipeworksAttendant(), scColosseumNavampaMatchTalkToLogRollingAttendant(), scColosseumNavampaMatchTalkToScalesAttendant() and scColosseumNavampaMatchTalkToSteppingStoneAttendant().

Definition at line 236 of file colosso_guide.c.

scColossoWalkActorTo

void scColossoWalkActorTo(Sint32 actorId, Sint32 x, Sint32 z)

Runs the actor at 2 pixels a tick towards pixel (x, z) and returns at once.

References fdActorLookup(), fdActorSelectAnimation(), fdActorSetMoveTarget(), fdActorStartIdle() and Sint32.

Referenced by scColosseumNavampaMatchTalkToWallWedgeAttendant().

Definition at line 244 of file colosso_guide.c.

scColossoWalkActorToAndStand

void scColossoWalkActorToAndStand(Sint32 actorId, Sint32 x, Sint32 z)

Runs the actor at 1.25 pixels a tick to pixel (x, z), waits until it arrives and stands it there.

References fdActorLookup(), fdActorSelectAnimation(), fdActorSetMoveTarget(), fdActorStartIdle(), fdActorWaitForMove() and Sint32.

Referenced by scColosseumAzartMatchTalkToLumberAttendant(), scColosseumAzartMatchTalkToRockAttendant(), scColosseumNavampaMatchTalkToSteppingStoneAttendant(), scColosseumSatrageMatchTalkToBoardWalkAttendant(), scColosseumSatrageMatchTalkToLogRollingAttendant(), scColosseumSatrageMatchTalkToMiniMazeAttendant(), scColosseumSatrageMatchTalkToShiftingFloorAttendant() and scColosseumSatrageMatchTalkToWallAttendant().

Definition at line 264 of file colosso_guide.c.

Variables in detail

ColossoPointerStartX

extern POINTER_COORDINATE ColossoPointerStartX

Referenced by scColossoMovePointer() and scColossoUpdatePointer().

Definition at line 150 of file colosso_guide.c.