src/field/field_psynergy_teleport.c
Teleport: the leader leaving in a burst of sparks and arriving in a whirl of them, and the cast that opens the picture of the world. More…
Included by field_psynergy.c.
Structures
| Name | Description | |
|---|---|---|
struct | TELEPORT_WHIRL_STATE | Teleport's whirl (heap slot battleEffect): the decoded spark picture, then the 100 sparks and their sprites. |
struct | TELEPORT_SPARKS_STATE | Teleport's burst of sparks (heap slot battleEffect): the decoded picture, then the sparks and their sprites. |
Macros
| Name | Description | |
|---|---|---|
#define | WHIRL_COUNT 100 | sparks that whirl round the leader |
#define | TELEPORT_SPARK_TICKS 20 | The ticks a spark flies before it vanishes. |
#define | TELEPORT_SPIN_TICKS 50 | Before the sparks, the leader spins for TELEPORT_SPIN_TICKS, its turn each tick TELEPORT_SPIN_ACCELERATION (1/65536 turns) faster than the last. |
#define | TELEPORT_SPIN_ACCELERATION 60 | |
#define | TELEPORT_SPARK_COUNT 100 | The sparks of Teleport's leaving burst. |
Enumerations
| Name | Description | |
|---|---|---|
enum | WHIRL_STAGE { WHIRL_FALLS_IN, WHIRL_LEADER_GROWS, WHIRL_DIES_AWAY } | The stages of fdTeleportPlayWhirl. |
enum | SPARK_STAGE { SPARKS_BURST, SPARKS_LEADER_SHRINKS, SPARKS_DIE_AWAY } | The stages of fdTeleportPlaySparks. |
Functions
| Name | Description | |
|---|---|---|
void | fdTeleportPlayWhirl (void) | The arriving half of a teleport: a whirl of sparks, the coloured orbs of RESOURCE_COLOURED_ORBS, falls in round the hidden leader with SE_SPARKLE_FALL, the leader spins and grows back to full size inside it, and the whirl dies away. |
void | fdTeleportPlaySparks (void) | The leaving half of a teleport, fdTeleportPlayWhirl's companion in the same scenes: the leader raises both arms in changing colours, spins faster and faster as sparks burst from it, shrinks away and is hidden. |
void | fdTeleportPlaySparksAndFade (void) | Runs fdTeleportPlaySparks, fades the palettes back to the saved ones and waits 10 ticks. |
void | fdPsynergyTeleportOnTarget (void) | Teleport cast on a target: does nothing. |
void | fdPsynergyTeleport (void) | Teleport: raises FIELD_RAISED_CUE_TELEPORT, which shows the picture of the whole world for the player to choose where to go. |
Description
Teleport: the leader leaving in a burst of sparks and arriving in a whirl of
them, and the cast that opens the picture of the world. Part of
field_psynergy.c.
Macros in detail
WHIRL_COUNT
#define WHIRL_COUNT 100
sparks that whirl round the leader
Referenced by fdTeleportPlayWhirl().
Definition at line 5 of file field_psynergy_teleport.c.
TELEPORT_SPARK_TICKS
#define TELEPORT_SPARK_TICKS 20
The ticks a spark flies before it vanishes.
Referenced by fdTeleportPlaySparks() and fdTeleportPlayWhirl().
Definition at line 7 of file field_psynergy_teleport.c.
TELEPORT_SPIN_TICKS
#define TELEPORT_SPIN_TICKS 50
Before the sparks, the leader spins for TELEPORT_SPIN_TICKS, its turn each
tick TELEPORT_SPIN_ACCELERATION (1/65536 turns) faster than the last.
Referenced by fdTeleportPlaySparks().
Definition at line 10 of file field_psynergy_teleport.c.
TELEPORT_SPIN_ACCELERATION
#define TELEPORT_SPIN_ACCELERATION 60
Referenced by fdTeleportPlaySparks().
Definition at line 11 of file field_psynergy_teleport.c.
TELEPORT_SPARK_COUNT
#define TELEPORT_SPARK_COUNT 100
The sparks of Teleport's leaving burst.
Referenced by fdTeleportPlaySparks().
Definition at line 192 of file field_psynergy_teleport.c.
Enumerations in detail
WHIRL_STAGE
enum WHIRL_STAGE
The stages of fdTeleportPlayWhirl.
| Enumerator | Value | Description |
|---|---|---|
WHIRL_FALLS_IN | 0 | more and more sparks fall in round the hidden leader |
WHIRL_LEADER_GROWS | 1 | |
WHIRL_DIES_AWAY | 2 |
Definition at line 14 of file field_psynergy_teleport.c.
SPARK_STAGE
enum SPARK_STAGE
The stages of fdTeleportPlaySparks.
| Enumerator | Value | Description |
|---|---|---|
SPARKS_BURST | 0 | more and more sparks burst from the spinning |
SPARKS_LEADER_SHRINKS | 1 | leader |
SPARKS_DIE_AWAY | 2 |
Definition at line 23 of file field_psynergy_teleport.c.
Functions in detail
fdTeleportPlayWhirl
void fdTeleportPlayWhirl(void)
The arriving half of a teleport: a whirl of sparks, the coloured orbs of
RESOURCE_COLOURED_ORBS, falls in round the hidden leader with
SE_SPARKLE_FALL, the leader spins and grows back to full size inside it, and
the whirl dies away. The scenes with Teleport circles call it (Mars
Lighthouse, the Anemos Inner Sanctum, the Yampi Desert and Islet caves,
Contigo).
References fdActorLookup(), fdActorSetSpriteFlagsStub(), fdCameraWorldToScreen(), fdEffectSpriteDraw(), fdEffectSpriteInit(), fdPartyGetLeaderActor(), fdPsynergyMarkWorldMapTilesUsed(), Sint32, syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syRandom(), syResourceGetTableEntry(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().
Referenced by fdEngineRun(), scIsletCaveFinishTeleport(), scMarsLighthouseEntranceTeleportFromNorthCircle() and scTeleportArriveWhirling().
Definition at line 46 of file field_psynergy_teleport.c.
fdTeleportPlaySparks
void fdTeleportPlaySparks(void)
The leaving half of a teleport, fdTeleportPlayWhirl's companion in the same
scenes: the leader raises both arms in changing colours, spins faster and
faster as sparks burst from it, shrinks away and is hidden.
References fdActorCycleSpriteColors(), fdActorFaceDirectionById(), fdActorLookup(), fdActorSelectAnimationStub(), fdActorSetSpriteFlagsStub(), fdAdvanceWithGravity3D(), fdEffectSpriteDrawAtWorldPos(), fdEffectSpriteInit(), fdPartyGetLeaderActor(), fdPsynergyFadeToCastColor(), Sint32, syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syRandom(), syResourceGetTableEntry(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().
Referenced by fdTeleportPlaySparksAndFade(), scAnemosInnerSanctumTeleportOut(), scContigoTeleportOut(), scLeaveByExit(), scMarsLighthouseEntranceTeleportFromBalm(), scMarsLighthouseEntranceTeleportFromDragonFaceNorth(), scMarsLighthouseEntranceTeleportFromDragonFaceSouth(), scMarsLighthouseEntranceTeleportFromHiddenCircle(), scMarsLighthouseEntranceTeleportFromNorthCircle(), scMarsLighthouseEntranceTeleportFromSouthCircle() and scMarsLighthouseHallTeleportToAerie().
Definition at line 206 of file field_psynergy_teleport.c.
fdTeleportPlaySparksAndFade
void fdTeleportPlaySparksAndFade(void)
Runs fdTeleportPlaySparks, fades the palettes back to the saved ones and
waits 10 ticks.
References fdPsynergyFadeFromCastColor(), fdTeleportPlaySparks() and sySynch().
Referenced by fdEngineRun() and scLemuriaTeleportToGirlsHouse().
Definition at line 373 of file field_psynergy_teleport.c.
fdPsynergyTeleportOnTarget
void fdPsynergyTeleportOnTarget(void)
Teleport cast on a target: does nothing.
Referenced by fdPsynergyDispatch().
Definition at line 381 of file field_psynergy_teleport.c.
fdPsynergyTeleport
void fdPsynergyTeleport(void)
Teleport: raises FIELD_RAISED_CUE_TELEPORT, which shows the picture of the
whole world for the player to choose where to go.
References fdActorLookup() and fdPartyGetLeaderActor().
Referenced by fdPsynergyRun().
Definition at line 387 of file field_psynergy_teleport.c.