src/scene/mt_aleph_summit.c
The summit of Mt. More…
#include "field/field_engine.h"#include "graphics/palette_buffers.h"#include "field/script_inline.h"#include "game/game.h"#include "field/actor_script.h"#include "field/call.h"#include "scene/scene.h"#include "text/msg_ids.h"#include "shared/actor_set_sprite_priority.c"#include "../field/field_effect_move.c"#include "shared/field_effect_spawn.c"#include "shared/field_effect_duration_scripts.c"#include "../field/field_effect_advance_motion.c"
Macros
| Name | Description | |
|---|---|---|
#define | PALETTE_CHANNELS (3 * PALETTE_COLORS) | The palette fade's three channels of one 16-colour palette. |
#define | EFFECT_SET_MODE fdActorSelectAnimation | |
#define | EFFECT_SET_SCRIPT fdActorStartScript | |
#define | CREEP_STEPS 10 | Alex's climb as the Golden Sun forms: he creeps up the mountain's side a pixel every 30 ticks for CREEP_STEPS steps, the camera drifting after him from the third; the sky turns gold in SKY_GOLD_STEPS steps of four ticks; then he climbs two pixels every eight ticks for CLIMB_STEPS steps, the camera panning up to the summit at CLIMB_CAMERA_STEP and the screen fading out at CLIMB_FADE_STEP. |
#define | SKY_GOLD_STEPS 10 | |
#define | SKY_RED_LEVELS_PER_GREEN 16 | Each step of the sky's turn to gold raises its green by one level for every SKY_RED_LEVELS_PER_GREEN its red rises, more than red ever rises in one. |
#define | CLIMB_STEPS 20 | |
#define | CLIMB_CAMERA_STEP 16 | |
#define | CLIMB_FADE_STEP 19 | |
#define | BG2_SCROLL_STEPS 30 | Alex takes the power. |
#define | POWER_STEPS 84 | |
#define | POWER_ALEX_GOLDEN 16 | |
#define | POWER_SUMMIT_GOLDEN 20 | |
#define | POWER_BLEND_PAUSE 28 | |
#define | POWER_BLEND_RESUME 34 | |
#define | POWER_BLEND_FULL 50 | |
#define | POWER_WHITEN 50 | |
#define | POWER_TREMOR 51 | |
#define | WISE_ONE_BLINKS 10 | The Wise One's blinks at each of its four sways as Alex gathers his power. |
#define | SUMMIT_HOLD_PASSES 320 | How many times any other entrance reads the buttons before it goes on to the credits. |
Enumerations
| Name | Description | |
|---|---|---|
enum | MT_ALEPH_SUMMIT_ACTOR_ID { ACTOR_ALEX, ACTOR_WISE_ONE } | The summit, by the rows of ActorPlacements. |
enum | anonymous enum { ENTRANCE_GOLDEN_SUN_FORMS, ENTRANCE_ALEX_TAKES_THE_POWER, EN … } | The summit's ways in, each a stretch of the ending. |
enum | MT_ALEPH_SUMMIT_ALEX_LINE { ALEX_WHO_ARE_YOU, ALEX_TRYING_TO_ANGER_ME } | Alex's lines that open a run of the summit's talk, as message numbers counted from the talk's first line, MsgGoldenSunEternalLifeAndPower. |
enum | anonymous enum { STAFF_CREDIT_OPENING, STAFF_CREDIT_TO_BEACONS } | The stretches of the staff credits the summit goes on to (staff_credit.c's entrances): the opening, which comes back to the Golden Sun forming, and the one that goes on to the lighthouses' beacons. |
enum | anonymous enum { EPILOGUE_FROM_MT_ALEPH_SUMMIT } | The epilogue's entrance from the summit, once the Wise One has gone. |
Functions
| Name | Description | |
|---|---|---|
const SCENE_ENTRANCE * | scGetEntrances (void) | Where the party can enter: the cave under the spring has its own entrances. |
const SCENE_REGION * | scGetExitRegions (void) | The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room. |
const Uint32 * | scGetExits (void) | The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN. |
const ACTOR_PLACE * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
void | scMtAlephSummitStepColorsToward (Uint16 *colors, Uint16 *target, Sint32 count) | Moves each of count colours one step of red, green and blue toward its target colour. |
void | scMtAlephSummitShiftColors (Uint16 *colors, Sint32 count, Sint32 delta) | Adds delta to each of count colours' red, green and blue, kept within 0 to 31. |
void | scMtAlephSummitPulseColors (void) | Each tick after Alex takes the power: background palette 4's colours 1 to 15 pulse up to two levels brighter and darker than palette 6's, once every 64 ticks. |
void | scFieldEffectSpawn (Sint32 x, Sint32 y, Sint32 z, Sint32 velocityX, Sint32 velocityY, Sint32 velocityZ, Uint32 flags, const EFFECT_OPTIONS *options) | Spawns a field effect at x, y, z moving at the velocity given, its type, scale, palette, priority, script, rotation, spin and update chosen by the EFFECT_USE_ flags from the options. |
void | scMtAlephSummitScatterDustRing (Sint32 radius, Uint32 count) | Scatters count dust puffs in a ring of radius around Alex. |
Sint32 | scInit (void) | Plays the stretch of the ending the entrance names, the Golden Sun forming or Alex taking its power until Mt. Aleph sinks, then goes on to the credits or the epilogue. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
Variables
| Name | Description | |
|---|---|---|
extern const Sint32 * | FieldEffectDurationScripts [] | The field effects' three scripts by how long an effect lasts: short, medium and long. |
extern Uint32 | FieldEffectShortScript [] | |
extern Uint32 | FieldEffectMediumScript [] | The flash about the Tomegathericon: held 45 ticks, then put away and freed. |
extern Uint32 | FieldEffectLongScript [] | |
SCENE_ENTRANCE | SceneEntrances [] | Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole. |
Uint32 | SceneExits [] | The room has no exits of its own. |
ACTOR_PLACE | ActorPlacements [] | The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's. |
CUE | SceneCues [] | The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers. |
Description
The summit of Mt. Aleph, at the end of the game: the Golden Sun forms over the mountain, Alex claims its power, and the scene's colours and dust follow what happens.
Macros in detail
PALETTE_CHANNELS
#define PALETTE_CHANNELS (3 * PALETTE_COLORS)
The palette fade's three channels of one 16-colour palette.
Referenced by scInit().
Definition at line 68 of file mt_aleph_summit.c.
EFFECT_SET_MODE
#define EFFECT_SET_MODE fdActorSelectAnimation
Referenced by EFFECT_SPAWN.
Definition at line 77 of file mt_aleph_summit.c.
EFFECT_SET_SCRIPT
#define EFFECT_SET_SCRIPT fdActorStartScript
Referenced by EFFECT_SPAWN.
Definition at line 78 of file mt_aleph_summit.c.
CREEP_STEPS
#define CREEP_STEPS 10
Alex's climb as the Golden Sun forms: he creeps up the mountain's side a
pixel every 30 ticks for CREEP_STEPS steps, the camera drifting after him
from the third; the sky turns gold in SKY_GOLD_STEPS steps of four ticks;
then he climbs two pixels every eight ticks for CLIMB_STEPS steps, the camera
panning up to the summit at CLIMB_CAMERA_STEP and the screen fading out at
CLIMB_FADE_STEP.
Referenced by scInit().
Definition at line 311 of file mt_aleph_summit.c.
SKY_GOLD_STEPS
#define SKY_GOLD_STEPS 10
Referenced by scInit().
Definition at line 312 of file mt_aleph_summit.c.
SKY_RED_LEVELS_PER_GREEN
#define SKY_RED_LEVELS_PER_GREEN 16
Each step of the sky's turn to gold raises its green by one level for every
SKY_RED_LEVELS_PER_GREEN its red rises, more than red ever rises in one.
Referenced by scInit().
Definition at line 315 of file mt_aleph_summit.c.
CLIMB_STEPS
#define CLIMB_STEPS 20
Referenced by scInit().
Definition at line 316 of file mt_aleph_summit.c.
CLIMB_CAMERA_STEP
#define CLIMB_CAMERA_STEP 16
Referenced by scInit().
Definition at line 317 of file mt_aleph_summit.c.
CLIMB_FADE_STEP
#define CLIMB_FADE_STEP 19
Referenced by scInit().
Definition at line 318 of file mt_aleph_summit.c.
BG2_SCROLL_STEPS
#define BG2_SCROLL_STEPS 30
Alex takes the power. While the summit shakes, background 2 scrolls eight
pixels every five ticks for BG2_SCROLL_STEPS steps. Then, in POWER_STEPS
steps of four ticks, Alex turns golden at POWER_ALEX_GOLDEN and the column of
light (background 1) blends in a level every two steps, up to 8 by
POWER_BLEND_PAUSE and on from POWER_BLEND_RESUME to full strength by
POWER_BLEND_FULL; the summit (palette 4) turns to palette 6's gold from
POWER_SUMMIT_GOLDEN; the background brightens a level a step from
POWER_WHITEN; and at POWER_TREMOR the earth trembles and the colours saved at
the start are put back under the brightening.
Referenced by scInit().
Definition at line 329 of file mt_aleph_summit.c.
POWER_STEPS
#define POWER_STEPS 84
Referenced by scInit().
Definition at line 330 of file mt_aleph_summit.c.
POWER_ALEX_GOLDEN
#define POWER_ALEX_GOLDEN 16
Referenced by scInit().
Definition at line 331 of file mt_aleph_summit.c.
POWER_SUMMIT_GOLDEN
#define POWER_SUMMIT_GOLDEN 20
Referenced by scInit().
Definition at line 332 of file mt_aleph_summit.c.
POWER_BLEND_PAUSE
#define POWER_BLEND_PAUSE 28
Referenced by scInit().
Definition at line 333 of file mt_aleph_summit.c.
POWER_BLEND_RESUME
#define POWER_BLEND_RESUME 34
Referenced by scInit().
Definition at line 334 of file mt_aleph_summit.c.
POWER_BLEND_FULL
#define POWER_BLEND_FULL 50
Referenced by scInit().
Definition at line 335 of file mt_aleph_summit.c.
POWER_WHITEN
#define POWER_WHITEN 50
Referenced by scInit().
Definition at line 336 of file mt_aleph_summit.c.
POWER_TREMOR
#define POWER_TREMOR 51
Referenced by scInit().
Definition at line 337 of file mt_aleph_summit.c.
WISE_ONE_BLINKS
#define WISE_ONE_BLINKS 10
The Wise One's blinks at each of its four sways as Alex gathers his power.
Referenced by scInit().
Definition at line 340 of file mt_aleph_summit.c.
SUMMIT_HOLD_PASSES
#define SUMMIT_HOLD_PASSES 320
How many times any other entrance reads the buttons before it goes on to the credits. It waits no tick between reads, so it passes at once unless B is held.
Referenced by scInit().
Definition at line 345 of file mt_aleph_summit.c.
Enumerations in detail
MT_ALEPH_SUMMIT_ACTOR_ID
enum MT_ALEPH_SUMMIT_ACTOR_ID
The summit, by the rows of ActorPlacements.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_ALEX | ACTOR_FIRST_PLACED | |
ACTOR_WISE_ONE | "I am called the Wise One..." |
Definition at line 15 of file mt_aleph_summit.c.
anonymous enum
enum { ENTRANCE_GOLDEN_SUN_FORMS, ENTRANCE_ALEX_TAKES_THE_POWER, ENTRANCE_SKIP_TO_CREDITS }
The summit's ways in, each a stretch of the ending. Nothing in the game enters it any other way; one that does goes on to the credits' opening at once, unless B is held, which keeps it on the summit until B is let go or A is pressed.
| Enumerator | Value | Description |
|---|---|---|
ENTRANCE_GOLDEN_SUN_FORMS | 2 | Alex sees the Golden Sun begin to form and climbs toward it, between the credits' first two stretches. |
ENTRANCE_ALEX_TAKES_THE_POWER | 3 | Alex takes the Golden Sun's power and the Wise One shows him its limits, after the lighthouses' beacons. |
ENTRANCE_SKIP_TO_CREDITS | 10 | Unused: goes straight on to the credits' world map, by the Jupiter Lighthouse (its entrance 72). |
Definition at line 25 of file mt_aleph_summit.c.
MT_ALEPH_SUMMIT_ALEX_LINE
enum MT_ALEPH_SUMMIT_ALEX_LINE
Alex's lines that open a run of the summit's talk, as message numbers counted
from the talk's first line, MsgGoldenSunEternalLifeAndPower.
| Enumerator | Value | Description |
|---|---|---|
ALEX_WHO_ARE_YOU | 4 | "Wh-Who are you?" |
ALEX_TRYING_TO_ANGER_ME | 12 | "If you are trying to anger me, have a little taste of exactly how much power I have attained!" |
Definition at line 40 of file mt_aleph_summit.c.
anonymous enum
enum { STAFF_CREDIT_OPENING, STAFF_CREDIT_TO_BEACONS }
The stretches of the staff credits the summit goes on to (staff_credit.c's
entrances): the opening, which comes back to the Golden Sun forming, and the
one that goes on to the lighthouses' beacons.
| Enumerator | Value | Description |
|---|---|---|
STAFF_CREDIT_OPENING | 0 | |
STAFF_CREDIT_TO_BEACONS | 1 |
Definition at line 51 of file mt_aleph_summit.c.
anonymous enum
enum { EPILOGUE_FROM_MT_ALEPH_SUMMIT }
The epilogue's entrance from the summit, once the Wise One has gone. The
epilogue reads no entrance and lists only its default
(shared/scene_entrances_mapless.c): the number is the summit's alone.
| Enumerator | Value | Description |
|---|---|---|
EPILOGUE_FROM_MT_ALEPH_SUMMIT | 1 |
Definition at line 60 of file mt_aleph_summit.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 84 of file mt_aleph_summit.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 89 of file mt_aleph_summit.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 94 of file mt_aleph_summit.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References ActorPlacements.
Definition at line 99 of file mt_aleph_summit.c.
scGetCues
const CUE *scGetCues(void)
References SceneCues.
Definition at line 104 of file mt_aleph_summit.c.
scMtAlephSummitStepColorsToward
void scMtAlephSummitStepColorsToward(Uint16 *colors, Uint16 *target, Sint32 count)
Moves each of count colours one step of red, green and blue toward its target colour.
References Sint32.
Referenced by scInit().
Definition at line 111 of file mt_aleph_summit.c.
scMtAlephSummitShiftColors
void scMtAlephSummitShiftColors(Uint16 *colors, Sint32 count, Sint32 delta)
Adds delta to each of count colours' red, green and blue, kept within 0 to 31.
References Sint32.
Referenced by scInit().
Definition at line 149 of file mt_aleph_summit.c.
scMtAlephSummitPulseColors
void scMtAlephSummitPulseColors(void)
Each tick after Alex takes the power: background palette 4's colours 1 to 15 pulse up to two levels brighter and darker than palette 6's, once every 64 ticks.
References Sint32, sySin() and TickCount.
Referenced by scInit().
Definition at line 181 of file mt_aleph_summit.c.
scMtAlephSummitScatterDustRing
void scMtAlephSummitScatterDustRing(Sint32 radius, Uint32 count)
Scatters count dust puffs in a ring of radius around Alex.
References fdActorGet(), fdEffectAdvanceMotion(), scFieldEffectSpawn(), Sint32, syCos() and sySin().
Referenced by scInit().
Definition at line 269 of file mt_aleph_summit.c.
scInit
Sint32 scInit(void)
Plays the stretch of the ending the entrance names, the Golden Sun forming or Alex taking its power until Mt. Aleph sinks, then goes on to the credits or the epilogue.
References BgScrollWork, fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationSpeedById(), fdActorSetAttachedEffect(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWalkTo(), fdActorWalkToAndWait(), fdBattleEffectEndArcEffect(), fdBattleEffectSetObjectUpdateMode(), fdBattleEffectStartArcEffect(), fdBattleEffectWaitForArcGroups(), fdCameraWaitForArrival(), fdMapGridSetShakeFX(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptFinishScreenTransition(), fdScriptPlaySound(), fdScriptSetDestination(), fdScriptShowMessage(), fdScriptStartColorTransition(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), fdStartPaletteTransition(), MainRoutineStateWork, mnWindowColorApply(), PerWork, scFieldActorSetSpritePriority(), scFieldCloseEvent(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scMtAlephSummitPulseColors(), scMtAlephSummitScatterDustRing(), scMtAlephSummitShiftColors(), scMtAlephSummitStepColorsToward(), Sint32, syHeapAllocateEWRAM(), syHeapRelease(), sySetTickEvent(), sySynch(), syWindowLoadGraphics() and syWordsCopy().
Definition at line 350 of file mt_aleph_summit.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 903 of file mt_aleph_summit.c.
Variables in detail
FieldEffectDurationScripts
extern const Sint32 *FieldEffectDurationScripts[]
const Sint32 *FieldEffectDurationScripts[]
References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.
Referenced by fdEffectSpawnResident(), scFieldEffectSpawn() and scFieldEffectSpawnLocal().
Definition at lines 70 and 215 of file mt_aleph_summit.c.
SceneEntrances
SCENE_ENTRANCE SceneEntrances[]
Referenced by scGetEntrances().
Definition at line 221 of file mt_aleph_summit.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 227 of file mt_aleph_summit.c.
ActorPlacements
ACTOR_PLACE ActorPlacements[]
Referenced by scGetActorPlacements().
Definition at line 231 of file mt_aleph_summit.c.
SceneCues
CUE SceneCues[]
Referenced by scGetCues().
Definition at line 253 of file mt_aleph_summit.c.