src/scene/sanctum.c
The Sanctum, the room of the Healers that Vale, Vault, Bilibin, Xian and Altin each have (SceneIdSanctum). More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "debug/debug.h"#include "field/script_inline.h"#include "field/field_effect.h"#include "field/speaker.h"#include "graphics/graphics.h"#include "text/msg_ids.h"#include "shared/item_icon_grow_script.c"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_SANCTUM_WARNED_BEFORE_LEAVING FLAG_SCENE_TEMP(0x00) | After the quest is refused, the Great Healer has warned Isaac at the door that stepping outside the village is final. |
#define | FLAG_SANCTUM_QUEST_RESTARTED FLAG_SCENE_TEMP(0x01) | The party is starting again from the Great Healer after refusing the quest, so the account of Sol Sanctum is skipped. |
#define | SANCTUM_SPARKLE_ORBIT_STEP (TRIG_TURN * 9 / 128) | How far each sparkle circling the Great Healer goes around him in a tick. |
#define | WISE_ONE_VANISH_SPARKS 32 | The sparks the Wise One gives off as he shrinks away after giving Isaac and Garet their mission, one each four ticks. |
#define | SANCTUM_NEW_FRIENDS_SPEAKER | Who answers "......" when the healer asks whether Isaac's new friends are Adepts: Ivan in every edition but the Japanese, Garet before. |
#define | ROOM_PALEST_COLOR 15 | The last and palest colour of the room's first palette, a pale cream on its brightest highlights. |
#define | QUESTION_X JAPANESE_OR(7, 2) | The question's window after the refusal ending, in tiles, and its cursor's x in pixels. |
#define | QUESTION_WIDTH JAPANESE_OR(17, 25) | |
#define | CURSOR_X JAPANESE_OR(64, 24) |
Enumerations
| Name | Description | |
|---|---|---|
enum | SANCTUM_METATILE_BEHAVIOR { METATILE_BEHAVIOR_SANCTUM_DOORWAY, METATILE_BEHAVIOR_SANCTUM … } | The metatiles the room's step cues answer. |
enum | SANCTUM_ACTOR_ID { ACTOR_HEALER, ACTOR_WEST_HEALER, ACTOR_EAST_HEALER, ACTOR_DO … } | The placed actors, numbering the rows of the table scGetActorPlacements returns for the entrance. |
Functions
| Name | Description | |
|---|---|---|
const ACTOR_PLACE * | scGetActorPlacements (void) | Who stands in the room depends on the door the party came in by: the town's Healers, the gathering after the eruption, or nobody. |
static void | scSanctumAskToAcceptQuest (void) | Back in Vale's Sanctum after the eruption, Isaac and Garet tell the Great Healer, Dora, the Mayor and the Healers what happened in Sol Sanctum, and the Great Healer asks Isaac to take on the quest. |
static void | scSanctumReceiveWiseOnesMission (void) | Once Isaac accepts, Garet protests and the Mayor tells him the choice was Isaac's; the Great Healer calls on the Wise One, who comes down over the altar to give Isaac and Garet their mission while a red glow shimmers about the Great Healer and sparkles circle him. |
static void | scSanctumShowHealerAfterimage (void) | Puts a red-tinted copy of the Great Healer on him, the glow of his Psynergy. |
static void | scSanctumHideHealerAfterimage (void) | Takes the Great Healer's red glow away. |
static void | scSanctumUpdateHealerAfterimage (ACTOR *actor) | Each tick moves the red copy a few pixels to another side of the Great Healer, so that it shimmers about him. |
static void | scSanctumSpawnOrbitingEffect (Sint32 actorId, Sint32 angleStep) | Starts a sparkle circling the actor, high above his feet, going around by the given angle each tick. |
static Sint32 | scSanctumChooseRestartOption (void) | After the refusal ending, clears the room and asks whether to start again "From the Great Healer" (0) or go to the file screen (1). |
static void | scSanctumActOutSolSanctum (void) | Isaac and Garet act out, in sepia, what happened in Sol Sanctum, the item each part of the story turns on rising over them. |
static void | scSanctumRaiseItemIcon (Sint32 item, FIXED fixedX, FIXED fixedY, FIXED fixedZ) | An item's menu icon leaps up from a place (16.16) and hangs where it stops, for a second in all. |
static void | scSanctumSpawnActorSpark (Sint32 id) | A glint rises from beside the actor, for half a second to a second and a half. |
static void | scSanctumRemoveCounter (void) | Takes away the small stone counter before the altar for the quest's visits: its picture goes, and its metatiles (11, 8) to (13, 9) become plain floor. |
static UNREAD_RESULT | scSanctumKeepFacingActor (ACTOR *actor) | An update function: the actor keeps turned towards the actor whose id its faceActorId holds. |
const SCENE_ENTRANCE * | scGetEntrances (void) | The entrances of every town's Sanctum. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | The scene has no exit regions: its regions entry returns none. |
const Uint32 * | scGetExits (void) | Both scenes share one exit table. |
const CUE * | scGetCues (void) | The cues by the door the party came in by; Vale's Sanctum also changes once the party has left Vale and again once it has reached Kalay. |
static void | scSanctumTalkAboutGoldenStatue (void) | Talking to the man in a long robe wandering Vault's Sanctum: while the gold statue is missing he starts to say what worries the Healer, then thinks better of it; once it is back he speaks of fate guiding those who stray. |
static void | scSanctumReadMindAboutGoldenStatue (void) | Mind Read on the man in a long robe wandering Vault's Sanctum: while the gold statue is missing he wonders if they will ever see it again; once it is back he thinks of a child who has awakened to their teachings; on the later visit through Vault, of how well the dirty statue cleaned up. |
static void | scSanctumAskQuestAgain (void) | Talking to the Great Healer after Isaac has refused the quest: he asks "Are you sure?", then whether Isaac would like to think it over, then whether he will take the fate of the world in his hands. |
static void | scSanctumAskAboutNewAdepts (void) | Talking to the Healer on the west side of Vale's Sanctum once the party has reached Kalay: "Isaac, are your new friends Adepts by any chance?" A yes makes him marvel that others besides Valeans have Psynergy. |
static void | scSanctumAskAboutPsynergyChanges (void) | Talking to the Healer on the east side of Vale's Sanctum once the party has left Vale: he turns to Isaac and asks "Do you feel any change in your Psynergy?" A yes makes him wish the Wise One would come to him too; a no, recall that the Great Healer's powers grew when he met the Wise One. |
Sint32 | scInit (void) | Every visit but a plain one to Vale's Sanctum opens without the area name. |
static void | scSanctumWarnBeforeLeaving (void) | When Isaac heads for the door of Vale's Sanctum after refusing the quest (the row just inside it, metatiles (10, 15) to (14, 15)), the view pans back up the room, the Great Healer turns to him and shakes his head: "Once you step outside the village, you cannot take back your decision." He warns only once (FLAG_SANCTUM_WARNED_BEFORE_LEAVING). |
static void | scSanctumLeaveAfterRefusing (void) | Stepping into the doorway of Vale's Sanctum after refusing the quest (metatiles (10, 16) to (14, 16)) ends the game. |
static UNREAD_RESULT | scSanctumMatchLeaderPriority (ACTOR *actor) | Keeps this actor at the party leader's drawing priority. |
static inline void | scSanctumNodAll (void) | Has Isaac, Garet, Dora, the Mayor and the two healers nod, waiting for the last of them. |
static inline void | scSanctumStartAllRepeatedMotion (void) | Starts the same six's repeated motions and waits for the last of them. |
static inline void | scSanctumShowAllEmotes (void) | Shows the same emote on the same six. |
static void | scSanctumUpdateOrbitingEffect (ACTOR *effect) | Moves a sparkle one step along its ellipse around the Great Healer. |
static void | scSanctumUpdateRisingSpark (ACTOR *spark) | A glint's update: it drifts up, twinkling between full size and three fifths, and goes once its ticks run out. |
static Bool | scSanctumIsLeaderFacingHealer (void) | Whether the leader faces north, across the counter toward the Healer. |
static void | scSanctumTalkToHealer (void) | Talking to the Great Healer in Vale's Sanctum: across the counter, the Sanctum's services. |
static void | scSanctumTalkToVaultHealer (void) | Talking to the Healer of Vault's Sanctum: across the counter, the Sanctum's services. |
static void | scSanctumTalkAboutCurse (void) | Talking to the Healer of Bilibin's Sanctum: across the counter, the Sanctum's services. |
static void | scSanctumTalkAboutAltinMonsters (void) | Talking to the Healer of Altin's Sanctum: across the counter, the Sanctum's services. |
static void | scSanctumTalkAboutJourneyFromXian (void) | Talking to the Healer of Xian's Sanctum: across the counter, the Sanctum's services; from any other side, "I came to Xian from very distant lands to spread good will." |
Variables
| Name | Description | |
|---|---|---|
extern Uint32 | SanctumLeaderCircleScript [] | |
extern Uint32 | SanctumGaretCircleScript [] | |
extern Sint32 | ItemIconGrowScript [] | An item icon's entrance: drawn at half size, it grows to full size over 8 ticks, holds for 16, then swells to one and a half times its size and back twice. |
extern Sint32 | SanctumItemIconEndScript [] | |
extern SCENE_ENTRANCE | SanctumEntrances [] | |
extern Uint32 | SanctumExits [] | |
extern ACTOR_PLACE | SanctumNoActorPlacements [] | |
extern ACTOR_PLACE | SanctumValeActorPlacements [] | |
extern ACTOR_PLACE | SanctumIvanActorPlacement [] | |
extern ACTOR_PLACE | SanctumVaultBilibinActorPlacements [] | |
extern ACTOR_PLACE | SanctumQuestActorPlacements [] | |
extern ACTOR_PLACE | SanctumAltinXianActorPlacements [] | |
extern CUE | SanctumValeCues [] | |
extern CUE | SanctumVaultCues [] | |
extern CUE | SanctumVaultRevisitCues [] | |
extern CUE | SanctumQuestCues [] | |
extern CUE | SanctumValeCuesAfterLeaving [] | |
extern CUE | SanctumValeCuesAfterKalay [] | |
extern CUE | SanctumAltinCues [] | |
extern CUE | SanctumBilibinCues [] | |
extern CUE | SanctumXianCues [] | |
extern Sint32 | SanctumCursorOffsets [] | The choice cursor's offset to the right in pixels, swaying a step every two ticks. |
extern Sint32 | SanctumOrbitingSparkleScript [] | A sparkle circling the Great Healer rises half a pixel a tick for 96 ticks, then is gone. |
extern Sint32 | SanctumSparkEndScript [] |
Description
The Sanctum, the room of the Healers that Vale, Vault, Bilibin, Xian and
Altin each have (SceneIdSanctum). One room serves them all: the door the
party comes in by decides whose Sanctum it is, which people stand in it, and
which town its door leads back out to. The Healer stands at the top of the
room before the altar, behind a small stone counter. Talking to him across
it, facing north, opens the Sanctum's services; from any other side he only
talks.
- Vale's Sanctum: the Great Healer, with a Healer on each side of the room
who speaks of Psynergy. After the eruption of Mt. Aleph, the Great
Healer brings Isaac and Garet here from Vale (
vale_eruption.c, entranceSANCTUM_FROM_VALE_ERUPTION). Dora and the Mayor are waiting. Isaac and Garet act out what happened in Sol Sanctum while the room is tinted sepia, the Great Healer tells what the Wise One showed him, and he asks Isaac to take on the quest. For these visits the stone counter is taken away and the Great Healer stands beside the altar.
A yes brings the Wise One down over the altar to give Isaac and Garet their
mission; the screen fades to black over the inn's night music, and the two
are in Vale's plaza (vale_plaza.c). A no leaves everyone waiting in the room:
the Great Healer asks again when spoken to, he warns Isaac as he heads for
the door, and stepping out ends the game, "And so the world began drifting
toward its fated destruction...", with a choice to start again from the Great
Healer (SANCTUM_FROM_QUEST_RESTART, without the acting out) or to go to the
file screen. After the party has left Vale (FLAG_VALE_PARTY_LEFT), and again
after it has reached Kalay (FLAG_KALAY_REACHED), the three Healers talk of
what the eruption and the Wise One changed.
- Vault's Sanctum: the Healer, and a man with long brown hair in a long robe
who wanders the room. A gold statue was stolen from them during the
eruption. Once the party has caught the thieves at the inn
(
FLAG_VAULT_THIEVES_JAILED) the statue stands back behind the Healer, and on the party's later visit through Vault (vault_revisit.c) it has been polished and the Healer worries about earthquakes on Mt. Aleph. - Bilibin's Sanctum: the Healer and a man like Vault's, who talk of Kolima's
curse, before and after it is lifted
(
FLAG_KOLIMA_CURSE_LIFTED). - Xian's Sanctum: a Healer who came to Xian from very distant lands.
- Altin's Sanctum: a Healer who tells of the water-spewing beasts in the
mine, until the party has saved Altin from them
(
FLAG_HYDROS_STATUES_DEFEATED).
Entrance SANCTUM_UNUSED, which no exit leads to, places nobody and gives the
room the name Sanctum alone.
Macros in detail
FLAG_SANCTUM_WARNED_BEFORE_LEAVING
#define FLAG_SANCTUM_WARNED_BEFORE_LEAVING FLAG_SCENE_TEMP(0x00)
After the quest is refused, the Great Healer has warned Isaac at the door that stepping outside the village is final.
Referenced by SanctumQuestCues and scSanctumWarnBeforeLeaving().
Definition at line 92 of file sanctum.c.
FLAG_SANCTUM_QUEST_RESTARTED
#define FLAG_SANCTUM_QUEST_RESTARTED FLAG_SCENE_TEMP(0x01)
The party is starting again from the Great Healer after refusing the quest, so the account of Sol Sanctum is skipped.
Referenced by scInit() and scSanctumAskToAcceptQuest().
Definition at line 95 of file sanctum.c.
SANCTUM_SPARKLE_ORBIT_STEP
#define SANCTUM_SPARKLE_ORBIT_STEP (TRIG_TURN * 9 / 128)
How far each sparkle circling the Great Healer goes around him in a tick.
Referenced by scSanctumAskToAcceptQuest().
Definition at line 157 of file sanctum.c.
WISE_ONE_VANISH_SPARKS
#define WISE_ONE_VANISH_SPARKS 32
The sparks the Wise One gives off as he shrinks away after giving Isaac and Garet their mission, one each four ticks.
Referenced by scSanctumReceiveWiseOnesMission().
Definition at line 161 of file sanctum.c.
SANCTUM_NEW_FRIENDS_SPEAKER
#define SANCTUM_NEW_FRIENDS_SPEAKER
Who answers "......" when the healer asks whether Isaac's new friends are Adepts: Ivan in every edition but the Japanese, Garet before.
Referenced by scSanctumAskAboutNewAdepts().
Definition at line 388 of file sanctum.c.
ROOM_PALEST_COLOR
#define ROOM_PALEST_COLOR 15
The last and palest colour of the room's first palette, a pale cream on its brightest highlights.
Referenced by scSanctumLeaveAfterRefusing().
Definition at line 527 of file sanctum.c.
QUESTION_X
#define QUESTION_X JAPANESE_OR(7, 2)
The question's window after the refusal ending, in tiles, and its cursor's x in pixels.
Referenced by scSanctumChooseRestartOption().
Definition at line 1789 of file sanctum.c.
QUESTION_WIDTH
#define QUESTION_WIDTH JAPANESE_OR(17, 25)
Referenced by scSanctumChooseRestartOption().
Definition at line 1790 of file sanctum.c.
CURSOR_X
#define CURSOR_X JAPANESE_OR(64, 24)
Referenced by scSanctumChooseRestartOption().
Definition at line 1791 of file sanctum.c.
Enumerations in detail
SANCTUM_METATILE_BEHAVIOR
enum SANCTUM_METATILE_BEHAVIOR
The metatiles the room's step cues answer.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_SANCTUM_DOORWAY | 1 | The doorway, metatiles (10, 16) to (14, 16). |
METATILE_BEHAVIOR_SANCTUM_BEFORE_DOOR | The row just inside it, metatiles (10, 15) to (14, 15). |
Definition at line 82 of file sanctum.c.
SANCTUM_ACTOR_ID
enum SANCTUM_ACTOR_ID
The placed actors, numbering the rows of the table scGetActorPlacements
returns for the entrance.
The party's rows take their own ids. Every place's first row is its healer.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_HEALER | ACTOR_FIRST_PLACED | The town's Healer, a man with a white beard in a tall hat and a long purple and blue robe, before the altar at the top of the room. He is the Great Healer in Vale's Sanctum. Vale Sanctum (SanctumValeActorPlacements, and SanctumQuestActorPlacements at the quest). The western of Vale's two other Healers, men with long brown hair in long robes, standing on either side of the stone counter. |
ACTOR_WEST_HEALER | Mind Read hears a villager in cottage_rooms_a.c call the Sanctum's people so: "The healers are supposed to guard Sol Sanctum." Before the quest: "Our Psynergy was given to us by the sacred power of Mt. Aleph." | |
ACTOR_EAST_HEALER | The eastern one. "Psynergy is a power that should only be used for good... Never for evil!" | |
ACTOR_DORA | The quest (SanctumQuestActorPlacements). Isaac's mother, a woman with fair hair tied up. | |
ACTOR_GARETS_GRANDFATHER | The Mayor, Garet's grandfather, an old man with white hair and a cane. The Great Healer calls him so: "That is all, Mayor." | |
ACTOR_WISE_ONE | Appears to the Great Healer. | |
ACTOR_HEALER_AFTERIMAGE | A copy of the Great Healer for its afterimages. | |
ACTOR_SANCTUM_MEMBER | ACTOR_FIRST_PLACED + 1 | Vault Sanctum and Bilibin Sanctum (SanctumVaultBilibinActorPlacements). The other man of Vault's and Bilibin's Sanctums, who wanders the room. He wears the western Healer's sprite (a man with long brown hair in a long robe). He speaks of the healer as someone else and of "our teachings" and "our meditations". In Vault: "I wonder if we'll ever see our stolen gold statue again..." |
ACTOR_GOLD_STATUE | Vault Sanctum's gold statue, placed off the map until the thieves are jailed (FLAG_VAULT_THIEVES_JAILED). Its sprite is that of the one a chest gives back in log_rooms_a.c. |
Definition at line 101 of file sanctum.c.
Functions in detail
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Who stands in the room depends on the door the party came in by: the town's Healers, the gathering after the eruption, or nobody.
References MainRoutineStateWork, SanctumAltinXianActorPlacements, SanctumNoActorPlacements, SanctumQuestActorPlacements, SanctumValeActorPlacements and SanctumVaultBilibinActorPlacements.
Definition at lines 55 and 199 of file sanctum.c.
scSanctumAskToAcceptQuest
static void scSanctumAskToAcceptQuest(void)
Back in Vale's Sanctum after the eruption, Isaac and Garet tell the Great Healer, Dora, the Mayor and the Healers what happened in Sol Sanctum, and the Great Healer asks Isaac to take on the quest. The account of Jenna and Kraden's capture is acted out in sepia, and the Great Healer tells of the hovering stone, the Wise One, who showed him all of it. Starting again after a refusal skips straight to the question. A yes gives the mission; a no leaves Isaac free to walk out.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetMovementTypeById(), fdActorSetSpriteColorById(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForAnimationChange(), fdActorWalkToAndWait(), fdCameraWaitForMove(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagGet(), gmFlagSet(), scSanctumActOutSolSanctum(), scSanctumHideHealerAfterimage(), scSanctumMatchLeaderPriority(), scSanctumReceiveWiseOnesMission(), scSanctumShowHealerAfterimage(), scSanctumSpawnOrbitingEffect(), syImportScriptSetExitRequest(), sySoundPlay() and sySoundWaitForBGMRestore().
Referenced by scInit().
Definition at lines 149 and 633 of file sanctum.c.
scSanctumReceiveWiseOnesMission
static void scSanctumReceiveWiseOnesMission(void)
Once Isaac accepts, Garet protests and the Mayor tells him the choice was Isaac's; the Great Healer calls on the Wise One, who comes down over the altar to give Isaac and Garet their mission while a red glow shimmers about the Great Healer and sparkles circle him.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetSpriteColorById(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForMove(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptPlaySound(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait(), scSanctumHideHealerAfterimage(), scSanctumNodAll(), scSanctumShowAllEmotes(), scSanctumShowHealerAfterimage(), scSanctumSpawnActorSpark(), scSanctumStartAllRepeatedMotion() and sySoundPlay().
Referenced by scSanctumAskQuestAgain() and scSanctumAskToAcceptQuest().
Definition at lines 150 and 1259 of file sanctum.c.
scSanctumShowHealerAfterimage
static void scSanctumShowHealerAfterimage(void)
Puts a red-tinted copy of the Great Healer on him, the glow of his Psynergy.
References fdActorGet(), fdActorSetAnimation(), fdActorSetPosFX() and scSanctumUpdateHealerAfterimage().
Referenced by scSanctumAskToAcceptQuest() and scSanctumReceiveWiseOnesMission().
Definition at lines 151 and 1667 of file sanctum.c.
scSanctumHideHealerAfterimage
static void scSanctumHideHealerAfterimage(void)
Takes the Great Healer's red glow away.
References fdActorGet() and state.
Referenced by scSanctumAskToAcceptQuest() and scSanctumReceiveWiseOnesMission().
Definition at lines 152 and 1702 of file sanctum.c.
scSanctumUpdateHealerAfterimage
static void scSanctumUpdateHealerAfterimage(ACTOR *actor)
Each tick moves the red copy a few pixels to another side of the Great Healer, so that it shimmers about him.
References fdActorGet() and TickCount.
Referenced by scSanctumShowHealerAfterimage().
Definition at lines 153 and 1711 of file sanctum.c.
scSanctumSpawnOrbitingEffect
static void scSanctumSpawnOrbitingEffect(Sint32 actorId, Sint32 angleStep)
Starts a sparkle circling the actor, high above his feet, going around by the given angle each tick.
References fdActorGet(), fdActorStartScript(), SanctumOrbitingSparkleScript, scFieldActorCreate(), scSanctumUpdateOrbitingEffect() and Sint32.
Referenced by scSanctumAskToAcceptQuest().
Definition at lines 154 and 1757 of file sanctum.c.
scSanctumChooseRestartOption
static Sint32 scSanctumChooseRestartOption(void)
After the refusal ending, clears the room and asks whether to start again "From the Great Healer" (0) or go to the file screen (1).
References fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptWait(), FrameCount, mnArrowRelease(), mnSaveCountFilesExcludingSent(), mnTextDrawMessage(), mnWindowClose(), mnWindowCreate(), PerPush, PerRepeat, SanctumCursorOffsets, scFieldMenuArrowCreate(), scFieldMenuArrowSetPos() and Sint32.
Referenced by scSanctumLeaveAfterRefusing().
Definition at lines 162 and 1795 of file sanctum.c.
scSanctumActOutSolSanctum
static void scSanctumActOutSolSanctum(void)
Isaac and Garet act out, in sepia, what happened in Sol Sanctum, the item each part of the story turns on rising over them.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetScript(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWaitForScriptEndById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdScriptWait(), SanctumGaretCircleScript, SanctumLeaderCircleScript, scSanctumKeepFacingActor() and scSanctumRaiseItemIcon().
Referenced by scSanctumAskToAcceptQuest().
Definition at lines 163 and 1847 of file sanctum.c.
scSanctumRaiseItemIcon
static void scSanctumRaiseItemIcon(Sint32 item, FIXED fixedX, FIXED fixedY, FIXED fixedZ)
An item's menu icon leaps up from a place (16.16) and hangs where it stops, for a second in all.
References fdActorStartScript(), glyph, ItemIconGrowScript, mnIconDrawItem(), SanctumItemIconEndScript, scFieldActorCreate(), Sint32, syHeapSlotAllocate(), syHeapSlotRelease(), sySynch() and syVRAMCacheLoad().
Referenced by scSanctumActOutSolSanctum().
Definition at lines 164 and 2078 of file sanctum.c.
scSanctumSpawnActorSpark
static void scSanctumSpawnActorSpark(Sint32 id)
A glint rises from beside the actor, for half a second to a second and a half.
References fdActorGet(), scFieldActorCreate(), scSanctumUpdateRisingSpark(), Sint32, syMathRemainderUnsigned() and syRandomNext().
Referenced by scSanctumReceiveWiseOnesMission().
Definition at lines 166 and 2142 of file sanctum.c.
scSanctumRemoveCounter
static void scSanctumRemoveCounter(void)
Takes away the small stone counter before the altar for the quest's visits: its picture goes, and its metatiles (11, 8) to (13, 9) become plain floor.
References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo() and sySynch().
Referenced by scInit().
Definition at lines 167 and 2174 of file sanctum.c.
scSanctumKeepFacingActor
static UNREAD_RESULT scSanctumKeepFacingActor(ACTOR *actor)
An update function: the actor keeps turned towards the actor whose id its faceActorId holds.
References fdActorGet() and syAtan().
Referenced by scSanctumActOutSolSanctum().
Definition at line 171 of file sanctum.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
The entrances of every town's Sanctum.
References SanctumEntrances.
Definition at line 182 of file sanctum.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 187 of file sanctum.c.
scGetExits
const Uint32 *scGetExits(void)
References SanctumExits.
Definition at line 192 of file sanctum.c.
scGetCues
const CUE *scGetCues(void)
The cues by the door the party came in by; Vale's Sanctum also changes once the party has left Vale and again once it has reached Kalay.
References gmFlagGet(), MainRoutineStateWork, SanctumAltinCues, SanctumBilibinCues, SanctumQuestCues, SanctumValeCues, SanctumValeCuesAfterKalay, SanctumValeCuesAfterLeaving, SanctumVaultCues, SanctumVaultRevisitCues and SanctumXianCues.
Definition at line 223 of file sanctum.c.
scSanctumTalkAboutGoldenStatue
static void scSanctumTalkAboutGoldenStatue(void)
Talking to the man in a long robe wandering Vault's Sanctum: while the gold statue is missing he starts to say what worries the Healer, then thinks better of it; once it is back he speaks of fate guiding those who stray. On the later visit through Vault he has polished it: "It's so shiny, you won't even recognize it!"
References fdActorFaceEachOther(), fdActorSetAnimation(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet() and MainRoutineStateWork.
Referenced by SanctumVaultCues and SanctumVaultRevisitCues.
Definition at line 255 of file sanctum.c.
scSanctumReadMindAboutGoldenStatue
static void scSanctumReadMindAboutGoldenStatue(void)
Mind Read on the man in a long robe wandering Vault's Sanctum: while the gold statue is missing he wonders if they will ever see it again; once it is back he thinks of a child who has awakened to their teachings; on the later visit through Vault, of how well the dirty statue cleaned up. He stops to be read and wanders on after.
References fdActorSetAnimation(), fdActorSetMovementTypeById(), fdActorStop(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet() and MainRoutineStateWork.
Referenced by SanctumVaultCues and SanctumVaultRevisitCues.
Definition at line 285 of file sanctum.c.
scSanctumAskQuestAgain
static void scSanctumAskQuestAgain(void)
Talking to the Great Healer after Isaac has refused the quest: he asks "Are you sure?", then whether Isaac would like to think it over, then whether he will take the fate of the world in his hands. A yes to the first keeps the refusal; no, yes and yes accept. Isaac then walks back to his place before the Great Healer, who first steps aside if he was turned to the altar, and the Wise One gives the mission as after a first yes.
References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimationAndWait(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scSanctumReceiveWiseOnesMission(), syImportScriptSetExitRequest(), sySoundPlay() and sySoundWaitForBGMRestore().
Referenced by SanctumQuestCues and scSanctumTalkToVaultHealer().
Definition at line 317 of file sanctum.c.
scSanctumAskAboutNewAdepts
static void scSanctumAskAboutNewAdepts(void)
Talking to the Healer on the west side of Vale's Sanctum once the party has reached Kalay: "Isaac, are your new friends Adepts by any chance?" A yes makes him marvel that others besides Valeans have Psynergy. A no draws a silent "......" from two of the party, and he sees that Isaac's friend is angered by his words. The silent pair is Ivan and Mia in the editions of the first patch on, which first bring Ivan into the room; before it, Garet and Mia.
References fdScriptAppendActorPlacements(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), SanctumIvanActorPlacement, scFieldScriptShowTwoMessagesAndWait() and sySynch().
Referenced by SanctumValeCuesAfterKalay.
Definition at line 398 of file sanctum.c.
scSanctumAskAboutPsynergyChanges
static void scSanctumAskAboutPsynergyChanges(void)
Talking to the Healer on the east side of Vale's Sanctum once the party has left Vale: he turns to Isaac and asks "Do you feel any change in your Psynergy?" A yes makes him wish the Wise One would come to him too; a no, recall that the Great Healer's powers grew when he met the Wise One.
References fdActorFaceActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and fdScriptWait().
Referenced by SanctumValeCuesAfterLeaving.
Definition at line 438 of file sanctum.c.
scInit
Sint32 scInit(void)
Every visit but a plain one to Vale's Sanctum opens without the area name. In
Vault's, the gold statue stands behind the Healer once the thieves are
jailed. Brought here after the eruption, or starting again after refusing,
the stone counter is taken away and the Great Healer's question begins; a
return from a battle or the menu (FLAG_KEEP_PARTY_POSITION) skips it.
References fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptWait(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scSanctumAskToAcceptQuest(), scSanctumRemoveCounter() and Sint32.
Definition at line 461 of file sanctum.c.
scSanctumWarnBeforeLeaving
static void scSanctumWarnBeforeLeaving(void)
When Isaac heads for the door of Vale's Sanctum after refusing the quest (the
row just inside it, metatiles (10, 15) to (14, 15)), the view pans back up
the room, the Great Healer turns to him and shakes his head: "Once you step
outside the village, you cannot take back your decision." He warns only once
(FLAG_SANCTUM_WARNED_BEFORE_LEAVING).
References fdActorFaceActor(), fdActorSetAnimationAndWait(), fdCameraMoveToActorById(), fdCameraWaitForMove(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait() and gmFlagSet().
Referenced by SanctumQuestCues.
Definition at line 507 of file sanctum.c.
scSanctumLeaveAfterRefusing
static void scSanctumLeaveAfterRefusing(void)
Stepping into the doorway of Vale's Sanctum after refusing the quest (metatiles (10, 16) to (14, 16)) ends the game. Everyone freezes and the room fades to sepia, with its palest colour turning white; "And so the world began drifting toward its fated destruction..." shows across the screen, the screen fades to black, and the player chooses to start again "From the Great Healer" or to go "To the File Screen" ("Restart the game" when there is no saved file).
References fdActorSetAnimation(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), mnFieldMessageShowCentered(), scSanctumChooseRestartOption() and syImportScriptSetExitRequest().
Referenced by SanctumQuestCues.
Definition at line 536 of file sanctum.c.
scSanctumMatchLeaderPriority
static UNREAD_RESULT scSanctumMatchLeaderPriority(ACTOR *actor)
Keeps this actor at the party leader's drawing priority.
References fdActorGet().
Referenced by scSanctumAskToAcceptQuest().
Definition at line 583 of file sanctum.c.
scSanctumNodAll
static inline void scSanctumNodAll(void)
Has Isaac, Garet, Dora, the Mayor and the two healers nod, waiting for the last of them.
References fdActorSetAnimation() and fdActorSetAnimationAndWait().
Referenced by scSanctumReceiveWiseOnesMission().
Definition at line 594 of file sanctum.c.
scSanctumStartAllRepeatedMotion
static inline void scSanctumStartAllRepeatedMotion(void)
Starts the same six's repeated motions and waits for the last of them.
References fdActorRunRepeatedMotion() and fdActorStartRepeatedMotion().
Referenced by scSanctumReceiveWiseOnesMission().
Definition at line 605 of file sanctum.c.
scSanctumShowAllEmotes
static inline void scSanctumShowAllEmotes(void)
Shows the same emote on the same six.
References fdActorShowEmote().
Referenced by scSanctumReceiveWiseOnesMission().
Definition at line 616 of file sanctum.c.
scSanctumUpdateOrbitingEffect
static void scSanctumUpdateOrbitingEffect(ACTOR *effect)
Moves a sparkle one step along its ellipse around the Great Healer.
References syCos() and sySin().
Referenced by scSanctumSpawnOrbitingEffect().
Definition at line 1735 of file sanctum.c.
scSanctumUpdateRisingSpark
static void scSanctumUpdateRisingSpark(ACTOR *spark)
A glint's update: it drifts up, twinkling between full size and three fifths, and goes once its ticks run out.
References fdActorStartScript() and SanctumSparkEndScript.
Referenced by scSanctumSpawnActorSpark().
Definition at line 2119 of file sanctum.c.
scSanctumIsLeaderFacingHealer
static Bool scSanctumIsLeaderFacingHealer(void)
Whether the leader faces north, across the counter toward the Healer.
References fdActorGet().
Referenced by scSanctumTalkAboutAltinMonsters(), scSanctumTalkAboutCurse(), scSanctumTalkAboutJourneyFromXian(), scSanctumTalkToHealer() and scSanctumTalkToVaultHealer().
Definition at line 2182 of file sanctum.c.
scSanctumTalkToHealer
static void scSanctumTalkToHealer(void)
Talking to the Great Healer in Vale's Sanctum: across the counter, the Sanctum's services. From any other side he says that wielders of Psynergy are called Adepts, messengers of good; once the party has left Vale, that his control over Psynergy has grown since he met the Wise One; once it has reached Kalay, that the path to Sol Sanctum is still closed.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet(), mnSanctumRun() and scSanctumIsLeaderFacingHealer().
Referenced by SanctumValeCues, SanctumValeCuesAfterKalay and SanctumValeCuesAfterLeaving.
Definition at line 2198 of file sanctum.c.
scSanctumTalkToVaultHealer
static void scSanctumTalkToVaultHealer(void)
Talking to the Healer of Vault's Sanctum: across the counter, the Sanctum's
services. From any other side, "We will help you anytime, as long as you are
pure of heart" while the gold statue is missing, "It was the hand of fate
that returned the gold statue" once it is back, and on the later visit
through Vault, that there seem to be a lot of earthquakes on Mt. Aleph. It
also asks Isaac again (scSanctumAskQuestAgain) if run during the quest's
visits, whose own cue table runs that directly instead.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet(), MainRoutineStateWork, mnSanctumRun(), scSanctumAskQuestAgain(), scSanctumIsLeaderFacingHealer() and Sint32.
Referenced by SanctumVaultCues and SanctumVaultRevisitCues.
Definition at line 2224 of file sanctum.c.
scSanctumTalkAboutCurse
static void scSanctumTalkAboutCurse(void)
Talking to the Healer of Bilibin's Sanctum: across the counter, the Sanctum's services. From any other side, that this is only a beginning while Kolima is cursed, and once the curse is lifted, that it is still not safe outside town.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet(), mnSanctumRun() and scSanctumIsLeaderFacingHealer().
Referenced by SanctumBilibinCues.
Definition at line 2270 of file sanctum.c.
scSanctumTalkAboutAltinMonsters
static void scSanctumTalkAboutAltinMonsters(void)
Talking to the Healer of Altin's Sanctum: across the counter, the Sanctum's services. From any other side, how the water-spewing beasts appeared in the mine after the night the gems fell from the sky; once the party has beaten them, that saving Altin was the hand of Fate.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet(), mnSanctumRun() and scSanctumIsLeaderFacingHealer().
Referenced by SanctumAltinCues.
Definition at line 2291 of file sanctum.c.
scSanctumTalkAboutJourneyFromXian
static void scSanctumTalkAboutJourneyFromXian(void)
Talking to the Healer of Xian's Sanctum: across the counter, the Sanctum's services; from any other side, "I came to Xian from very distant lands to spread good will."
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), mnSanctumRun() and scSanctumIsLeaderFacingHealer().
Referenced by SanctumXianCues.
Definition at line 2310 of file sanctum.c.
Variables in detail
SanctumLeaderCircleScript
extern Uint32 SanctumLeaderCircleScript[]
Uint32 SanctumLeaderCircleScript[]
Referenced by scSanctumActOutSolSanctum().
Definition at lines 56 and 2326 of file sanctum.c.
SanctumGaretCircleScript
extern Uint32 SanctumGaretCircleScript[]
Uint32 SanctumGaretCircleScript[]
Referenced by scSanctumActOutSolSanctum().
Definition at lines 57 and 2352 of file sanctum.c.
SanctumItemIconEndScript
extern Sint32 SanctumItemIconEndScript[]
Sint32 SanctumItemIconEndScript[]
References Sint32.
Referenced by scSanctumRaiseItemIcon().
Definition at lines 59 and 2380 of file sanctum.c.
SanctumEntrances
extern SCENE_ENTRANCE SanctumEntrances[]
SCENE_ENTRANCE SanctumEntrances[]
Referenced by scGetEntrances().
Definition at lines 60 and 2385 of file sanctum.c.
SanctumExits
extern Uint32 SanctumExits[]
Uint32 SanctumExits[]
Referenced by scGetExits().
Definition at lines 61 and 2405 of file sanctum.c.
SanctumNoActorPlacements
extern ACTOR_PLACE SanctumNoActorPlacements[]
ACTOR_PLACE SanctumNoActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 62 and 2419 of file sanctum.c.
SanctumValeActorPlacements
extern ACTOR_PLACE SanctumValeActorPlacements[]
ACTOR_PLACE SanctumValeActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 63 and 2423 of file sanctum.c.
SanctumIvanActorPlacement
extern ACTOR_PLACE SanctumIvanActorPlacement[]
ACTOR_PLACE SanctumIvanActorPlacement[]
Referenced by scSanctumAskAboutNewAdepts().
Definition at lines 64 and 2438 of file sanctum.c.
SanctumVaultBilibinActorPlacements
extern ACTOR_PLACE SanctumVaultBilibinActorPlacements[]
ACTOR_PLACE SanctumVaultBilibinActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 65 and 2445 of file sanctum.c.
SanctumQuestActorPlacements
extern ACTOR_PLACE SanctumQuestActorPlacements[]
ACTOR_PLACE SanctumQuestActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 66 and 2455 of file sanctum.c.
SanctumAltinXianActorPlacements
extern ACTOR_PLACE SanctumAltinXianActorPlacements[]
ACTOR_PLACE SanctumAltinXianActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 67 and 2475 of file sanctum.c.
SanctumValeCues
extern CUE SanctumValeCues[]
CUE SanctumValeCues[]
References scSanctumTalkToHealer().
Referenced by scGetCues().
Definition at lines 68 and 2481 of file sanctum.c.
SanctumVaultCues
extern CUE SanctumVaultCues[]
CUE SanctumVaultCues[]
References scSanctumReadMindAboutGoldenStatue(), scSanctumTalkAboutGoldenStatue() and scSanctumTalkToVaultHealer().
Referenced by scGetCues().
Definition at lines 69 and 2489 of file sanctum.c.
SanctumVaultRevisitCues
extern CUE SanctumVaultRevisitCues[]
CUE SanctumVaultRevisitCues[]
References scSanctumReadMindAboutGoldenStatue(), scSanctumTalkAboutGoldenStatue() and scSanctumTalkToVaultHealer().
Referenced by scGetCues().
Definition at lines 70 and 2503 of file sanctum.c.
SanctumQuestCues
extern CUE SanctumQuestCues[]
CUE SanctumQuestCues[]
References scSanctumAskQuestAgain(), scSanctumLeaveAfterRefusing() and scSanctumWarnBeforeLeaving().
Referenced by scGetCues().
Definition at lines 71 and 2515 of file sanctum.c.
SanctumValeCuesAfterLeaving
extern CUE SanctumValeCuesAfterLeaving[]
CUE SanctumValeCuesAfterLeaving[]
References scSanctumAskAboutPsynergyChanges() and scSanctumTalkToHealer().
Referenced by scGetCues().
Definition at lines 72 and 2530 of file sanctum.c.
SanctumValeCuesAfterKalay
extern CUE SanctumValeCuesAfterKalay[]
CUE SanctumValeCuesAfterKalay[]
References scSanctumAskAboutNewAdepts() and scSanctumTalkToHealer().
Referenced by scGetCues().
Definition at lines 73 and 2544 of file sanctum.c.
SanctumAltinCues
extern CUE SanctumAltinCues[]
CUE SanctumAltinCues[]
References scSanctumTalkAboutAltinMonsters().
Referenced by scGetCues().
Definition at lines 74 and 2558 of file sanctum.c.
SanctumBilibinCues
extern CUE SanctumBilibinCues[]
CUE SanctumBilibinCues[]
References scSanctumTalkAboutCurse().
Referenced by scGetCues().
Definition at lines 75 and 2570 of file sanctum.c.
SanctumXianCues
extern CUE SanctumXianCues[]
CUE SanctumXianCues[]
References scSanctumTalkAboutJourneyFromXian().
Referenced by scGetCues().
Definition at lines 76 and 2588 of file sanctum.c.
SanctumCursorOffsets
extern Sint32 SanctumCursorOffsets[]
Sint32 SanctumCursorOffsets[]
The choice cursor's offset to the right in pixels, swaying a step every two ticks.
References Sint32.
Referenced by scSanctumChooseRestartOption().
Definition at lines 77 and 2599 of file sanctum.c.
SanctumOrbitingSparkleScript
extern Sint32 SanctumOrbitingSparkleScript[]
Sint32 SanctumOrbitingSparkleScript[]
A sparkle circling the Great Healer rises half a pixel a tick for 96 ticks, then is gone.
References Sint32.
Referenced by scSanctumSpawnOrbitingEffect().
Definition at lines 78 and 2620 of file sanctum.c.
SanctumSparkEndScript
extern Sint32 SanctumSparkEndScript[]
Sint32 SanctumSparkEndScript[]
References Sint32.
Referenced by scSanctumUpdateRisingSpark().