src/scene/kolima.c
Kolima's overlay, which holds three scenes. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "graphics/graphics.h"#include "scene/kolima.h"#include "scene/kolima_curse_dust.h"#include "scene/party_nod.h"#include "text/msg_ids.h"#include "shared/actor_facing.c"#include "shared/mind_read.c"#include "shared/kolima_grow.c"#include "shared/kolima_blink.c"#include "shared/kolima_curse_dust.c"#include "shared/kolima_squash.c"#include "shared/kolima_sparkle_burst_script.c"
Macros
| Name | Description | |
|---|---|---|
#define | DUST_PUFF_ANIMATION_QUICK 1 | SPRITE_DUST_PUFF's quick billow: its eight pictures once, then blank. |
#define | PSYNERGY_FIELD_ANIMATION_WHOLE 1 | SPRITE_PSYNERGY_FIELD's animations: the whole dome, held, and a flash of its five pictures, a tick each, before the whole dome again. |
#define | PSYNERGY_FIELD_ANIMATION_FLASH 2 | |
#define | KOLIMA_PARTY_ROWS 3 | KolimaActorPlacements' rows for Garet, Ivan and Mia, before the villagers'. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { BRIDGE_DEBRIS_PIECES } | The pieces the drawbridge throws out where it lands (SPRITE_DUST_PUFF). |
enum | KOLIMA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_KOLIMA_UNUSED_EXIT, METATILE_BEHAVIOR_KOLI … } | The metatiles of Kolima and Kolima Bridge that the cues answer, besides the doorways, which answer by the exit they lead to. |
enum | KOLIMA_ACTOR_ID { ACTOR_YOUNG_MAN_VILLAGE_OF_LUMBERJACKS, ACTOR_VILLAGER_RELYI … } | Actors of Kolima, numbering the rows of KolimaActorPlacements from ACTOR_FIRST_PLACED. |
enum | KOLIMA_BRIDGE_ACTOR_ID { ACTOR_BRIDGE_VILLAGER, ACTOR_BRIDGE_VILLAGER_AS_TREE } | Kolima Bridge's villager, numbering the rows of KolimaBridgeActorPlacements from ACTOR_FIRST_PLACED: the same villager as a man and as a tree, in the same place. |
Functions
| Name | Description | |
|---|---|---|
static void | scKolimaWitnessForestCurse (void) | In Kolima, on the first entry from the World Map (KOLIMA_WORLD_MAP), the party sees the curse fall. |
static void | scKolimaShowMessageAndWait (Sint32 actorId, Sint32 waitTicks) | Shows the script's next line, spoken by actorId, then waits waitTicks. |
static void | scKolimaFaceActorAndWait (Sint32 actorId, Sint32 facing, Sint32 waitTicks) | Turns an actor at once to facing, then waits waitTicks. |
static void | scKolimaSpawnCurseSparkle (void) | Every eighth tick, a sparkle of the curse (SPRITE_GOLDEN_RINGS) falls from the sky over the party, with its sound while KolimaSparkleSoundOn is set. |
static void | scKolimaRestoreBridgeState (void) | Sets up Kolima Bridge: the villager as a man once the curse is lifted and as a tree before, with the metatiles where the man stood made walkable, and the drawbridge down once he has lowered it. |
static Sint32 | scKolimaFlashHitPsynergyFields (ACTOR *actor) | The end of a Psynergy field's growing: if a speck of the curse has burst on the fields meanwhile, this one flashes. |
static Sint32 | scKolimaTwinkleGroundSparkle (ACTOR *actor) | Each tick, a sparkle on Kolima's ground: red-tinted, it flashes white for the last few ticks of each twinkle, which lasts about 24 ticks at a random pace. |
static void | scKolimaInitCursedVillagers (ACTOR_PLACE *placements) | While the curse lasts, gives Kolima's nine villagers, ACTOR_FIRST_VILLAGER to ACTOR_LAST_VILLAGER, tree sprites: SPRITE_TREE, or SPRITE_SMALL_TREE for the two children, ACTOR_BOY_DID_NOT_MIND_BEING_A_TREE and ACTOR_GIRL_SLEEPY_TREES. |
static Sint32 | scKolimaUpdateFallingDebris (ACTOR *debris) | Each tick of a piece thrown out where the drawbridge lands: it flies, swells and is gone when its timer runs out. |
const SCENE_ENTRANCE * | scGetEntrances (void) | Selects the entrances of Kolima, Kolima Tunnel or Kolima Bridge. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | Only Kolima Tunnel has regions: its two ways out, KOLIMA_TUNNEL_LOG_ROOMS_C and KOLIMA_TUNNEL_KOLIMA. |
const Uint32 * | scGetExits (void) | The ways out of all three scenes. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Selects the people of Kolima or Kolima Bridge. |
static void | scKolimaTalkToHealer (void) | In Kolima, once the curse is lifted, talking to the healer (ACTOR_HEALER) across his counter (facing north) opens the Sanctum's services. |
static void | scKolimaGraniteJoins (void) | In Kolima, talking to Granite, a Venus Djinni, makes it join the party. |
const CUE * | scGetCues (void) | Selects Kolima Bridge's cues, or the table Kolima and Kolima Tunnel share. |
static void | scKolimaWalkThroughExit (Sint32 exitNumber) | Walks the leader north through a door of Kolima into the exit of the same number. |
static void | scKolimaEnterDoor (void) | In Kolima, walking into one of the five doorways leads into the houses and shops. |
static void | scKolimaLowerBridge (void) | At Kolima Bridge, the first time the party steps up to it, the villager beside it (ACTOR_BRIDGE_VILLAGER) asks whether they are going to cross, hops aside and lets the drawbridge down across the river, which lands with a thump and a scatter of pieces as the screen shakes. |
Sint32 | scInit (void) | Sets up whichever scene is entered: Kolima Bridge as the curse and the bridge leave it (scKolimaRestoreBridgeState), Kolima Tunnel with a window transition, and Kolima itself. |
static inline void | scKolimaFlickerPsynergyField (Sint32 actorId, Sint32 visibleOnOddTicks) | Shows one of the domes of Psynergy on its ticks, even or odd, and lifts it 500 pixels out of sight on the others. |
static void | scKolimaFlickerPsynergyFields (void) | Makes the four domes flicker, two on even ticks and two on odd. |
static Sint32 | scKolimaBurstOnPsynergyField (ACTOR *actor) | A speck of the curse that lands inside the party's Psynergy fields (two boxes with Mia in the party, three without her) bursts there with a drip, and the fields take their next pose once grown (scKolimaFlashHitPsynergyFields). |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | KolimaGaretWalksIn [] | Where Garet, Ivan and Mia walk on into the silent village and the way each turns (scKolimaWitnessForestCurse). |
extern Sint32 | KolimaIvanWalksIn [] | |
extern Sint32 | KolimaMiaWalksIn [] | |
extern Sint32 | KolimaPsynergyFieldGrowActions [] | A Psynergy field grows over its character from a tenth of its size, a fiftieth more each tick for 70 ticks, then flashes if a speck has burst on the fields meanwhile. |
extern Sint32 | KolimaPsynergyFieldShrinkActions [] | A Psynergy field, whole again, shrinks away over 90 ticks, drifting north, then is moved off to the map's corner. |
extern Sint32 | KolimaGroundSparkleActions [] | The sparkles on Kolima's ground: three quarters of their size, passed through, twinkling at random (scKolimaTwinkleGroundSparkle). |
extern Sint32 | KolimaDebrisScript [] | A piece thrown out where the drawbridge lands (scKolimaUpdateFallingDebris). |
extern Sint32 | KolimaFaceLeaderScript [] | Kolima Bridge's villager, once the drawbridge is down, turning to face the leader. |
extern Uint16 | KolimaDoorMetatiles [] | A door opening: two pictures of a metatile column two metatiles high. |
extern SCENE_ENTRANCE | KolimaEntrances [] | Kolima's entrances. |
extern SCENE_ENTRANCE | KolimaBridgeEntrances [] | |
extern SCENE_ENTRANCE | KolimaTunnelEntrances [] | |
extern SCENE_EXIT_REGION | KolimaTunnelRegions [] | The tops of Kolima Tunnel's two ladders. |
extern Uint32 | KolimaExits [] | Kolima's exits, then Kolima Bridge's and Kolima Tunnel's. |
extern ACTOR_PLACE | KolimaTunnelActorPlacements [] | |
extern ACTOR_PLACE | KolimaActorPlacements [] | Kolima's people: Garet, Ivan and Mia for the curse, the nine villagers, Tret's and Laurel's voices and the four domes until the curse has been seen (FLAG_KOLIMA_CURSE_WITNESSED), four sparkles while it lasts, and Granite until it joins (FLAG_DJINNI(DJINNI_GRANITE)). |
extern ACTOR_PLACE | KolimaMoreGroundSparklePlacements [] | Five more sparkles, placed by scInit once the curse has been seen and kept while it lasts. |
extern ACTOR_PLACE | KolimaBridgeActorPlacements [] | Kolima Bridge's villager, as a man (ACTOR_BRIDGE_VILLAGER) and as a tree (ACTOR_BRIDGE_VILLAGER_AS_TREE), in the same place. |
extern CUE | KolimaCues [] | The cues Kolima and Kolima Tunnel share: the exits and doorways, the villagers' words once the curse is lifted and their thoughts before and after, the healer, Granite and two jars. |
extern CUE | KolimaBridgeCues [] | Kolima Bridge's cues: its two ends, the bridge's fall and the villager. |
extern Sint32 | KolimaGoldenRingsScript [] | A sparkle of the curse stretching as it falls, until it lands (scKolimaSpawnCurseSparkle). |
Sint32 | KolimaPsynergyFieldHit | Set when a speck of the curse bursts on a Psynergy field: the fields then flash, once, as they finish growing (scKolimaFlashHitPsynergyFields). |
Sint32 | KolimaMiaInParty | Whether Mia was in the party as the curse struck, which decides her part in the script; read from FLAG_IN_PARTY(MIA) as it begins. |
Sint32 | KolimaSparkleSoundOn | Nonzero while the curse's sparkles fall: each new one plays SE_SPARKLE_FALL. |
Sint32 | KolimaCurseDustScript [] | A speck of the curse dust falls, flickering, two pixels a tick and then one, and bursts if it lands on a Psynergy field (scKolimaBurstOnPsynergyField). |
Description
Kolima's overlay, which holds three scenes. The village's houses and shops
are another overlay (log_rooms_c.c), and so is each scene of Kolima Forest.
Kolima (SceneIdKolima) is the village of lumberjacks, to which Lord McCoy has
barricaded the road from Bilibin since the trouble began. The party's first
entry from the World Map (KOLIMA_WORLD_MAP) plays
scKolimaWitnessForestCurse, unless the party has already seen the curse fall
in Kolima Forest (FLAG_KOLIMA_CURSE_WITNESSED). Every villager has been
turned into a tree. Sparkles fall from the sky and press the party down until
domes of their own Psynergy shield them, and two unseen voices, Tret and
Laurel, the spirits of the holy trees, send the party to look for Tret deep
within Kolima Forest.
Until the curse is lifted (FLAG_KOLIMA_CURSE_LIFTED), the nine villagers
(ACTOR_FIRST_VILLAGER to ACTOR_LAST_VILLAGER) stand still as trees, sparkles
twinkle on the ground, and the villagers answer only Mind Read, with the
thoughts of people stuck as trees. Afterwards they are people again and talk
of the curse, the holy tree and McCoy's money, and the healer (ACTOR_HEALER)
offers the Sanctum's services across his counter. Granite, a Venus Djinni,
waits in the village and joins when spoken to. Five doorways lead into the
houses and shops (SceneIdLogRoomsC), the west and east edges out to the World
Map, and one more door into Kolima Tunnel.
Kolima Tunnel (SceneIdKolimaTunnel) is a cave passage with no one in it, from
one of the houses to the village, with a ladder up at each end. Climbing a
ladder to its top leads out, by the tunnel's two exit regions
(KOLIMA_TUNNEL_LOG_ROOMS_C and KOLIMA_TUNNEL_KOLIMA). It is given the
village's cue table.
Kolima Bridge (SceneIdKolimaBridge) is "the grand bridge across the river"
and "the pride of Kolima" to the village's armor seller, with the World Map
at both ends. It is a drawbridge, standing raised between its posts. A
villager stands beside it, a tree while the curse lasts and a man afterwards.
The first time the party then steps up to it, scKolimaLowerBridge plays: he
asks whether they are going to cross, hops aside and lets the drawbridge down
across the river (FLAG_KOLIMA_BRIDGE_LOWERED). From then on it is drawn down
on every visit, and on the World Map too.
Macros in detail
DUST_PUFF_ANIMATION_QUICK
#define DUST_PUFF_ANIMATION_QUICK 1
SPRITE_DUST_PUFF's quick billow: its eight pictures once, then blank.
Referenced by scAltinPeakSpawnSpit(), scKalaySpawnTunnelParticle() and scKolimaLowerBridge().
Definition at line 81 of file kolima.c.
PSYNERGY_FIELD_ANIMATION_WHOLE
#define PSYNERGY_FIELD_ANIMATION_WHOLE 1
SPRITE_PSYNERGY_FIELD's animations: the whole dome, held, and a flash of its
five pictures, a tick each, before the whole dome again.
Referenced by KolimaPsynergyFieldShrinkActions.
Definition at line 85 of file kolima.c.
PSYNERGY_FIELD_ANIMATION_FLASH
#define PSYNERGY_FIELD_ANIMATION_FLASH 2
Referenced by scKolimaFlashHitPsynergyFields().
Definition at line 86 of file kolima.c.
KOLIMA_PARTY_ROWS
#define KOLIMA_PARTY_ROWS 3
KolimaActorPlacements' rows for Garet, Ivan and Mia, before the villagers'.
Referenced by scKolimaInitCursedVillagers().
Definition at line 199 of file kolima.c.
Enumerations in detail
anonymous enum
enum { BRIDGE_DEBRIS_PIECES }
The pieces the drawbridge throws out where it lands (SPRITE_DUST_PUFF).
| Enumerator | Value | Description |
|---|---|---|
BRIDGE_DEBRIS_PIECES | 10 |
Definition at line 75 of file kolima.c.
KOLIMA_METATILE_BEHAVIOR
enum KOLIMA_METATILE_BEHAVIOR
The metatiles of Kolima and Kolima Bridge that the cues answer, besides the doorways, which answer by the exit they lead to.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_KOLIMA_UNUSED_EXIT | 99 | Unused: no metatile of the three scenes' maps has it; it would lead out by exit 1, as the village's west edge does. |
METATILE_BEHAVIOR_KOLIMA_APPLE_JAR | 100 | The jars at metatiles |
METATILE_BEHAVIOR_KOLIMA_HERB_JAR | 101 | (23, 8) and (13, 23) of the village. |
METATILE_BEHAVIOR_KOLIMA_BRIDGE_ROAD_END | 10 | Kolima Bridge: the road just short of the river, metatiles (9, 18) to (11, 18) and on, where the party steps up to the raised drawbridge. |
Definition at line 90 of file kolima.c.
KOLIMA_ACTOR_ID
enum KOLIMA_ACTOR_ID
Actors of Kolima, numbering the rows of KolimaActorPlacements from
ACTOR_FIRST_PLACED. Garet, Ivan and Mia, who stand by for the curse, take
their own actor slots. The nine villagers are named by what they say once the
curse is lifted.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_YOUNG_MAN_VILLAGE_OF_LUMBERJACKS | ACTOR_FIRST_PLACED | A young man with brown hair. |
ACTOR_VILLAGER_RELYING_ON_FORESTS | A woman with fair hair, whose mind Ivan reads in scKolimaWitnessForestCurse. | |
ACTOR_VILLAGER_TIME_TO_THINK | A burly grey-haired man. | |
ACTOR_VILLAGER_SPARKLES_FELL | A woman in a green dress. | |
ACTOR_OLD_MAN_MCCOYS_MONEY | An old man with a cane. | |
ACTOR_OLD_WOMAN_HOLY_TREE_PALACE | An old woman. | |
ACTOR_BOY_DID_NOT_MIND_BEING_A_TREE | A small boy with fair hair. | |
ACTOR_GIRL_SLEEPY_TREES | A little girl with pigtails. | |
ACTOR_HEALER | A man with a white beard in a tall hat and a long robe. He opens the Sanctum's services across his counter (mnSanctumRun). | |
ACTOR_TRET | Tret's wrathful side, unseen while the curse falls. | |
ACTOR_LAUREL | Unseen while the curse falls. | |
ACTOR_LEADER_PSYNERGY_FIELD | The fields of Psynergy that rise over the party while the curse falls ("You know what those fields were?"), each set where its character stands in scKolimaWitnessForestCurse. Mia's is set only with her in the party. | |
ACTOR_IVAN_PSYNERGY_FIELD | ||
ACTOR_MIA_PSYNERGY_FIELD | ||
ACTOR_GARET_PSYNERGY_FIELD | ||
ACTOR_FIRST_SPARKLE | The four sparkles on the ground while the curse lasts (KolimaGroundSparkleActions). | |
ACTOR_GRANITE | ACTOR_FIRST_SPARKLE + 4 | Granite, a Venus Djinni, placed until it has joined. |
ACTOR_FIRST_VILLAGER | ACTOR_YOUNG_MAN_VILLAGE_OF_LUMBERJACKS | |
ACTOR_LAST_VILLAGER | ACTOR_HEALER |
Definition at line 117 of file kolima.c.
KOLIMA_BRIDGE_ACTOR_ID
enum KOLIMA_BRIDGE_ACTOR_ID
Kolima Bridge's villager, numbering the rows of KolimaBridgeActorPlacements
from ACTOR_FIRST_PLACED: the same villager as a man and as a tree, in the
same place.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_BRIDGE_VILLAGER | ACTOR_FIRST_PLACED | A burly grey-haired man. |
ACTOR_BRIDGE_VILLAGER_AS_TREE | The same villager as a tree, while the curse lasts. |
Definition at line 155 of file kolima.c.
Functions in detail
scKolimaWitnessForestCurse
static void scKolimaWitnessForestCurse(void)
In Kolima, on the first entry from the World Map (KOLIMA_WORLD_MAP), the
party sees the curse fall. This plays until FLAG_KOLIMA_CURSE_WITNESSED.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetDestinationOffset(), fdActorSetPosFX(), fdActorSetScript(), fdActorSetSpeedFX(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorStop(), fdActorWaitForMoveById(), fdActorWaitForScriptEndById(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagGet(), gmFlagSet(), gmPlayMusic(), KolimaCurseDustOffset, KolimaCurseDustState, KolimaCurseDustWidth, KolimaGaretWalksIn, KolimaIvanWalksIn, KolimaMiaInParty, KolimaMiaWalksIn, KolimaPartyRestoreScaleScript, KolimaPartySquashScript, KolimaPsynergyFieldGrowActions, KolimaPsynergyFieldHit, KolimaPsynergyFieldShrinkActions and 14 more.
Referenced by scInit().
Definition at lines 106 and 607 of file kolima.c.
scKolimaShowMessageAndWait
static void scKolimaShowMessageAndWait(Sint32 actorId, Sint32 waitTicks)
Shows the script's next line, spoken by actorId, then waits waitTicks.
References fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 107 and 1654 of file kolima.c.
scKolimaFaceActorAndWait
static void scKolimaFaceActorAndWait(Sint32 actorId, Sint32 facing, Sint32 waitTicks)
Turns an actor at once to facing, then waits waitTicks.
References fdActorFaceDirection(), fdScriptWait() and Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 108 and 1661 of file kolima.c.
scKolimaSpawnCurseSparkle
static void scKolimaSpawnCurseSparkle(void)
Every eighth tick, a sparkle of the curse (SPRITE_GOLDEN_RINGS) falls from
the sky over the party, with its sound while KolimaSparkleSoundOn is set.
References fdActorSelectAnimation(), fdActorStartScript(), KolimaGoldenRingsScript, KolimaSparkleSoundOn, scFieldActorCreate(), scFieldActorSetMoveTargetFX(), Sint32, sySoundPlay() and TickCount.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 110 and 1672 of file kolima.c.
scKolimaRestoreBridgeState
static void scKolimaRestoreBridgeState(void)
Sets up Kolima Bridge: the villager as a man once the curse is lifted and as a tree before, with the metatiles where the man stood made walkable, and the drawbridge down once he has lowered it.
References fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), gmFlagGet() and sySynch().
Referenced by scInit().
Definition at lines 111 and 1750 of file kolima.c.
scKolimaFlashHitPsynergyFields
static Sint32 scKolimaFlashHitPsynergyFields(ACTOR *actor)
The end of a Psynergy field's growing: if a speck of the curse has burst on the fields meanwhile, this one flashes.
References fdActorSelectAnimation(), KolimaPsynergyFieldHit and Sint32.
Referenced by KolimaPsynergyFieldGrowActions.
Definition at line 164 of file kolima.c.
scKolimaTwinkleGroundSparkle
static Sint32 scKolimaTwinkleGroundSparkle(ACTOR *actor)
Each tick, a sparkle on Kolima's ground: red-tinted, it flashes white for the last few ticks of each twinkle, which lasts about 24 ticks at a random pace.
References fdActorSetSpriteColor(), Sint32 and syRandomNext().
Referenced by KolimaGroundSparkleActions.
Definition at line 176 of file kolima.c.
scKolimaInitCursedVillagers
static void scKolimaInitCursedVillagers(ACTOR_PLACE *placements)
While the curse lasts, gives Kolima's nine villagers, ACTOR_FIRST_VILLAGER to
ACTOR_LAST_VILLAGER, tree sprites: SPRITE_TREE, or SPRITE_SMALL_TREE for the
two children, ACTOR_BOY_DID_NOT_MIND_BEING_A_TREE and
ACTOR_GIRL_SLEEPY_TREES. They stand still and keep their facing when spoken
to.
References Sint32.
Referenced by scGetActorPlacements().
Definition at line 206 of file kolima.c.
scKolimaUpdateFallingDebris
static Sint32 scKolimaUpdateFallingDebris(ACTOR *debris)
Each tick of a piece thrown out where the drawbridge lands: it flies, swells and is gone when its timer runs out.
References fdActorRelease() and Sint32.
Referenced by KolimaDebrisScript.
Definition at line 235 of file kolima.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
Selects the entrances of Kolima, Kolima Tunnel or Kolima Bridge.
References KolimaBridgeEntrances, KolimaEntrances, KolimaTunnelEntrances and MainRoutineStateWork.
Definition at line 256 of file kolima.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Only Kolima Tunnel has regions: its two ways out,
KOLIMA_TUNNEL_LOG_ROOMS_C and KOLIMA_TUNNEL_KOLIMA.
References KolimaTunnelRegions and MainRoutineStateWork.
Definition at line 273 of file kolima.c.
scGetExits
const Uint32 *scGetExits(void)
The ways out of all three scenes.
References KolimaExits.
Definition at line 283 of file kolima.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Selects the people of Kolima or Kolima Bridge. Kolima Tunnel has none. In Kolima the villagers are trees until the curse is lifted.
References gmFlagGet(), KolimaActorPlacements, KolimaBridgeActorPlacements, KolimaTunnelActorPlacements, MainRoutineStateWork, scKolimaInitCursedVillagers() and Sint32.
Definition at line 290 of file kolima.c.
scKolimaTalkToHealer
static void scKolimaTalkToHealer(void)
In Kolima, once the curse is lifted, talking to the healer (ACTOR_HEALER)
across his counter (facing north) opens the Sanctum's services.
References fdActorGet(), fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptStart(), mnSanctumRun() and Sint32.
Referenced by KolimaCues.
Definition at line 311 of file kolima.c.
scKolimaGraniteJoins
static void scKolimaGraniteJoins(void)
In Kolima, talking to Granite, a Venus Djinni, makes it join the party.
References fdDjinnJoinParty().
Referenced by KolimaCues.
Definition at line 332 of file kolima.c.
scGetCues
const CUE *scGetCues(void)
Selects Kolima Bridge's cues, or the table Kolima and Kolima Tunnel share.
References KolimaBridgeCues, KolimaCues and MainRoutineStateWork.
Definition at line 339 of file kolima.c.
scKolimaWalkThroughExit
static void scKolimaWalkThroughExit(Sint32 exitNumber)
Walks the leader north through a door of Kolima into the exit of the same number.
References fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), Sint32 and syImportScriptSetExitRequest().
Referenced by scKolimaEnterDoor().
Definition at line 350 of file kolima.c.
scKolimaEnterDoor
static void scKolimaEnterDoor(void)
In Kolima, walking into one of the five doorways leads into the houses and shops.
References fdActorGet(), fdActorSetDestinationOffset(), fdMapGridPlayMapEdit(), fdScriptEnd(), fdScriptStart(), KolimaDoorMetatiles, scKolimaWalkThroughExit(), Sint32, state, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by KolimaCues.
Definition at line 362 of file kolima.c.
scKolimaLowerBridge
static void scKolimaLowerBridge(void)
At Kolima Bridge, the first time the party steps up to it, the villager
beside it (ACTOR_BRIDGE_VILLAGER) asks whether they are going to cross, hops
aside and lets the drawbridge down across the river, which lands with a thump
and a scatter of pieces as the screen shakes. From then on he turns to watch
the leader.
References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSelectAnimation(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorStartScript(), fdActorWalkToAndWait(), fdCameraWaitForMove(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), KolimaDebrisScript, KolimaFaceLeaderScript, scFieldActorCreate(), scFieldActorWatchAndStartScript() and sySoundPlay().
Referenced by KolimaBridgeCues.
Definition at line 409 of file kolima.c.
scInit
Sint32 scInit(void)
Sets up whichever scene is entered: Kolima Bridge as the curse and the bridge
leave it (scKolimaRestoreBridgeState), Kolima Tunnel with a window
transition, and Kolima itself.
References fdActorGet(), fdActorReleaseById(), fdActorSetScript(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdScriptAppendActorPlacements(), gmFlagGet(), KolimaGroundSparkleActions, KolimaMoreGroundSparklePlacements, MainRoutineStateWork, scKolimaRestoreBridgeState(), scKolimaWitnessForestCurse() and Sint32.
Definition at line 503 of file kolima.c.
scKolimaFlickerPsynergyField
static inline void scKolimaFlickerPsynergyField(Sint32 actorId, Sint32 visibleOnOddTicks)
Shows one of the domes of Psynergy on its ticks, even or odd, and lifts it 500 pixels out of sight on the others.
References fdActorGet(), Sint32 and TickCount.
Referenced by scKolimaFlickerPsynergyFields().
Definition at line 576 of file kolima.c.
scKolimaFlickerPsynergyFields
static void scKolimaFlickerPsynergyFields(void)
Makes the four domes flicker, two on even ticks and two on odd.
References scKolimaFlickerPsynergyField().
Referenced by scKolimaWitnessForestCurse().
Definition at line 595 of file kolima.c.
scKolimaBurstOnPsynergyField
static Sint32 scKolimaBurstOnPsynergyField(ACTOR *actor)
A speck of the curse that lands inside the party's Psynergy fields (two boxes
with Mia in the party, three without her) bursts there with a drip, and the
fields take their next pose once grown (scKolimaFlashHitPsynergyFields).
References fdActorStartScript(), KolimaMiaInParty, KolimaPsynergyFieldHit, KolimaSparkleBurstScript, Sint32 and sySoundPlay().
Referenced by KolimaCurseDustScript.
Definition at line 1711 of file kolima.c.
Variables in detail
KolimaGaretWalksIn
extern Sint32 KolimaGaretWalksIn[]
Sint32 KolimaGaretWalksIn[]
Where Garet, Ivan and Mia walk on into the silent village and the way each
turns (scKolimaWitnessForestCurse).
References Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 52 and 1774 of file kolima.c.
KolimaIvanWalksIn
extern Sint32 KolimaIvanWalksIn[]
Sint32 KolimaIvanWalksIn[]
References Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 53 and 1783 of file kolima.c.
KolimaMiaWalksIn
extern Sint32 KolimaMiaWalksIn[]
Sint32 KolimaMiaWalksIn[]
References Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 54 and 1792 of file kolima.c.
KolimaPsynergyFieldGrowActions
extern Sint32 KolimaPsynergyFieldGrowActions[]
Sint32 KolimaPsynergyFieldGrowActions[]
A Psynergy field grows over its character from a tenth of its size, a fiftieth more each tick for 70 ticks, then flashes if a speck has burst on the fields meanwhile.
References scKolimaFlashHitPsynergyFields() and Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 55 and 1810 of file kolima.c.
KolimaPsynergyFieldShrinkActions
extern Sint32 KolimaPsynergyFieldShrinkActions[]
Sint32 KolimaPsynergyFieldShrinkActions[]
A Psynergy field, whole again, shrinks away over 90 ticks, drifting north, then is moved off to the map's corner.
References Sint32.
Referenced by scKolimaWitnessForestCurse().
Definition at lines 56 and 1825 of file kolima.c.
KolimaGroundSparkleActions
extern Sint32 KolimaGroundSparkleActions[]
Sint32 KolimaGroundSparkleActions[]
The sparkles on Kolima's ground: three quarters of their size, passed
through, twinkling at random (scKolimaTwinkleGroundSparkle).
References scKolimaTwinkleGroundSparkle() and Sint32.
Referenced by scInit().
Definition at lines 57 and 1839 of file kolima.c.
KolimaDebrisScript
extern Sint32 KolimaDebrisScript[]
Sint32 KolimaDebrisScript[]
A piece thrown out where the drawbridge lands (scKolimaUpdateFallingDebris).
References scKolimaUpdateFallingDebris() and Sint32.
Referenced by scKolimaLowerBridge().
Definition at lines 58 and 1850 of file kolima.c.
KolimaFaceLeaderScript
extern Sint32 KolimaFaceLeaderScript[]
Sint32 KolimaFaceLeaderScript[]
Kolima Bridge's villager, once the drawbridge is down, turning to face the leader.
References scTurnTowardTarget() and Sint32.
Referenced by scKolimaLowerBridge().
Definition at lines 59 and 1857 of file kolima.c.
KolimaDoorMetatiles
extern Uint16 KolimaDoorMetatiles[]
Uint16 KolimaDoorMetatiles[]
A door opening: two pictures of a metatile column two metatiles high.
Referenced by scKolimaEnterDoor().
Definition at lines 60 and 1863 of file kolima.c.
KolimaEntrances
extern SCENE_ENTRANCE KolimaEntrances[]
SCENE_ENTRANCE KolimaEntrances[]
Kolima's entrances. No exit leads to entrances 2, 10 and 12. Entrance 10 puts the party where
KOLIMA_WORLD_MAP does.
Referenced by scGetEntrances().
Definition at lines 61 and 1872 of file kolima.c.
KolimaBridgeEntrances
extern SCENE_ENTRANCE KolimaBridgeEntrances[]
SCENE_ENTRANCE KolimaBridgeEntrances[]
Referenced by scGetEntrances().
Definition at lines 62 and 1888 of file kolima.c.
KolimaTunnelEntrances
extern SCENE_ENTRANCE KolimaTunnelEntrances[]
SCENE_ENTRANCE KolimaTunnelEntrances[]
Referenced by scGetEntrances().
Definition at lines 63 and 1896 of file kolima.c.
KolimaTunnelRegions
extern SCENE_EXIT_REGION KolimaTunnelRegions[]
SCENE_EXIT_REGION KolimaTunnelRegions[]
The tops of Kolima Tunnel's two ladders.
Referenced by scGetExitRegions().
Definition at lines 64 and 1904 of file kolima.c.
KolimaExits
extern Uint32 KolimaExits[]
Uint32 KolimaExits[]
Kolima's exits, then Kolima Bridge's and Kolima Tunnel's.
Referenced by scGetExits().
Definition at lines 65 and 1911 of file kolima.c.
KolimaTunnelActorPlacements
extern ACTOR_PLACE KolimaTunnelActorPlacements[]
ACTOR_PLACE KolimaTunnelActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 66 and 1931 of file kolima.c.
KolimaActorPlacements
extern ACTOR_PLACE KolimaActorPlacements[]
ACTOR_PLACE KolimaActorPlacements[]
Kolima's people: Garet, Ivan and Mia for the curse, the nine villagers, Tret's and Laurel's
voices and the four domes until the curse has been seen (FLAG_KOLIMA_CURSE_WITNESSED), four
sparkles while it lasts, and Granite until it joins (FLAG_DJINNI(DJINNI_GRANITE)).
Referenced by scGetActorPlacements().
Definition at lines 67 and 1938 of file kolima.c.
KolimaMoreGroundSparklePlacements
extern ACTOR_PLACE KolimaMoreGroundSparklePlacements[]
ACTOR_PLACE KolimaMoreGroundSparklePlacements[]
Five more sparkles, placed by scInit once the curse has been seen and kept while it lasts.
Referenced by scInit().
Definition at lines 68 and 1989 of file kolima.c.
KolimaBridgeActorPlacements
extern ACTOR_PLACE KolimaBridgeActorPlacements[]
ACTOR_PLACE KolimaBridgeActorPlacements[]
Kolima Bridge's villager, as a man (ACTOR_BRIDGE_VILLAGER) and as a tree
(ACTOR_BRIDGE_VILLAGER_AS_TREE), in the same place. scKolimaRestoreBridgeState puts one of them
out of sight.
Referenced by scGetActorPlacements().
Definition at lines 69 and 2006 of file kolima.c.
KolimaCues
extern CUE KolimaCues[]
CUE KolimaCues[]
The cues Kolima and Kolima Tunnel share: the exits and doorways, the villagers' words once the curse is lifted and their thoughts before and after, the healer, Granite and two jars. Kolima Tunnel, which leaves by its regions, is given the same table.
References scKolimaEnterDoor(), scKolimaGraniteJoins() and scKolimaTalkToHealer().
Referenced by scGetCues().
Definition at lines 70 and 2017 of file kolima.c.
KolimaBridgeCues
extern CUE KolimaBridgeCues[]
CUE KolimaBridgeCues[]
Kolima Bridge's cues: its two ends, the bridge's fall and the villager.
References scKolimaLowerBridge().
Referenced by scGetCues().
Definition at lines 71 and 2095 of file kolima.c.
KolimaGoldenRingsScript
extern Sint32 KolimaGoldenRingsScript[]
Sint32 KolimaGoldenRingsScript[]
A sparkle of the curse stretching as it falls, until it lands
(scKolimaSpawnCurseSparkle).
References scFieldEffectStretchUntilArrived() and Sint32.
Referenced by scKolimaSpawnCurseSparkle().
Definition at lines 72 and 2109 of file kolima.c.
KolimaPsynergyFieldHit
Sint32 KolimaPsynergyFieldHit
Set when a speck of the curse bursts on a Psynergy field: the fields then
flash, once, as they finish growing (scKolimaFlashHitPsynergyFields).
References Sint32.
Referenced by scKolimaBurstOnPsynergyField(), scKolimaFlashHitPsynergyFields() and scKolimaWitnessForestCurse().
Definition at line 1801 of file kolima.c.
KolimaMiaInParty
Sint32 KolimaMiaInParty
Whether Mia was in the party as the curse struck, which decides her part in
the script; read from FLAG_IN_PARTY(MIA) as it begins.
References Sint32.
Referenced by scKolimaBurstOnPsynergyField() and scKolimaWitnessForestCurse().
Definition at line 1802 of file kolima.c.
KolimaSparkleSoundOn
Sint32 KolimaSparkleSoundOn
Nonzero while the curse's sparkles fall: each new one plays SE_SPARKLE_FALL.
References Sint32.
Referenced by scKolimaSpawnCurseSparkle() and scKolimaWitnessForestCurse().
Definition at line 1803 of file kolima.c.
KolimaCurseDustScript
Sint32 KolimaCurseDustScript[]
A speck of the curse dust falls, flickering, two pixels a tick and then one,
and bursts if it lands on a Psynergy field (scKolimaBurstOnPsynergyField).
References scKolimaBurstOnPsynergyField(), scKolimaFlickerCurseDust() and Sint32.
Referenced by scKolimaUpdateCurseDust().
Definition at line 2118 of file kolima.c.