src/scene/yallam.c
Yallam, the village near Taopo Swamp where Sunshine the blacksmith lives (its houses, inn and shops are in yallam_rooms.c). More…
#include "field/field_engine.h"#include "macros.h"#include "edition.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "field/field.h"#include "field/field_sprite.h"#include "field/field_engine_script.h"#include "game/game.h"#include "scene/scene.h"#include "window/window.h"#include "text/msg_ids.h"#include "shared/position_distance.c"#include "shared/scene_entrances_default.c"
Structures
| Name | Description | |
|---|---|---|
struct | SONG_RUNNER_STATE | A song game runner's ACTOR fields of the same names, kept while the game waits between songs. |
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_YALLAM_LOG_FALLEN FLAG_AREA_TEMP(0x00) | Set once Force has pushed the log off its ledge, to stand upright in the gap below. |
#define | STOP_RANGE 24 | How near in front of it, in pixels, a running child stops for the other child or for the leader. |
#define | LEADER_WALK_ON_RANGE 11 | In every edition but the Japanese, a running child walks on while the leader is this near, in pixels. |
#define | ANTIDOTE_SPOT_X 424 | Where the Antidote and the Nut lie once Cyclone has scattered the weeds over them, in pixels. |
#define | ANTIDOTE_SPOT_Z 232 | |
#define | NUT_SPOT_X 680 | |
#define | NUT_SPOT_Z 344 | |
#define | TOPPLE_SPIN_GAIN 40 | The falling log's spin, in angle units a tick: it gains this much each tick, from rest as it tips off the ledge and from TOPPLE_ROLL_SPIN as it rolls down. |
#define | TOPPLE_ROLL_SPIN 400 | |
#define | RUN_TO (step, x, z) | A step of a song game runner's path, kept in its songStep: sends it toward a point in the meadow, in pixels, and the step after waits for it to arrive there. |
#define | RUN_TO_AT_SPEED (step, speed, x, z) | As RUN_TO, at a new speed in pixels a tick: faster on the straight runs between the rings. |
#define | RUN_PAST (step, x, z, nextX, nextZ) | As RUN_TO to (x, z) and then to (nextX, nextZ), but the wait at the first point falls into the step after it: the runner turns for the next point a tick after setting out for this one, cutting the corner. |
Enumerations
| Name | Description | |
|---|---|---|
enum | YALLAM_ACTOR_ID { ACTOR_LOG_STUMP, ACTOR_FALLING_LOG, ACTOR_STANDING_LOG, ACTO … } | Yallam's actors, numbering the rows of YallamPlacements. |
enum | YALLAM_SONG_GAME_ACTOR_ID { ACTOR_SONG_LEADER, ACTOR_CIRCLES_CHILD, ACTOR_GAME_CHILD, AC … } | The children's meadow's actors, numbering the rows of YallamSongGamePlacements: the four children who play the song game. |
enum | YALLAM_TREASURE_ACTOR_ID { ACTOR_HIDDEN_NUT, ACTOR_HIDDEN_COINS, ACTOR_HIDDEN_ANTIDOTE } | Yallam's hidden treasure, the rows of its item table. |
enum | anonymous enum { CHILD_CHASES_GAME_CHILD, CHILD_TALKING } | The running children keep these flags in ACTOR.songStep. |
enum | YALLAM_METATILE { METATILE_WEEDS_OVER_CAVE_HOLE, METATILE_WEEDS_BELOW_SHOPS, M … } | The map metatiles Cyclone answers on, by the behaviour the map gives them: each set of weeds it scatters. |
enum | anonymous enum { SONG_GAME_GO, SONG_GAME_HALT, SONG_GAME_HALT_AND_STAND } | The song leader's songCommand in the song game: a command to every runner, which scYallamUpdateSongGame passes on and clears. |
enum | anonymous enum { RUNNER_GOING, RUNNER_HALTED, RUNNER_HALTING, RUNNER_HALTING_ … } | A runner's sceneCount in the song game: where it stands on its path. |
enum | anonymous enum { YALLAM_TO_SONG_GAME, YALLAM_FROM_SONG_GAME, YALLAM_SONG_GAME … } | The children's meadow, where the song game is played. |
enum | anonymous enum { SONG_STEP_STARS_EAST, SONG_STEP_STARS_RINGS, SONG_STEP_MOON, … } | The step of the runners' path where each verse's run begins, the step the singing waits for before it sings that verse; the stars song's first verse runs from step 0. |
Functions
| Name | Description | |
|---|---|---|
void | scYallamSingMoonSong (void) | The song of the moon, sung and run round the meadow's rings verse by verse as the stars song was; then the boy offers the third song. |
void | scYallamSingSunSong (void) | The song of the sun, sung and run round the meadow's rings verse by verse; then each child hops away and back in turn, the boy says that is all the games they have, and the screen fades back to the village. |
void | scYallamStartRunningChildren (void) | The boy and the girl with a topknot run round the big tree in the children's meadow, each after the other (scYallamUpdateRunningChild). |
void | scYallamUncoverCaveHole (void) | Cyclone cast in the weed patch in the village's north-west corner (metatiles (3, 7) to (7, 11)) scatters the weeds and uncovers a wood-rimmed hole in the middle of the patch, the way down into the cave that leads to the Masamune's chest. |
void | scYallamScatterWeedsBelowShops (void) | Cyclone cast by the weeds on the ledge below the shops' doors (metatiles (15, 22) and (16, 22)) scatters them; nothing lies under them. |
void | scYallamScatterWeedsInCorner (void) | Cyclone cast at the three weeds in the village's south-east corner (metatiles (44, 22), (43, 23) and (44, 23)) scatters them all; the Nut lies under the one at metatile (42, 21) (scYallamUncoverNut). |
void | scYallamScatterWeedsBySanctum (void) | Cyclone cast at the two weeds just west of the Sanctum's door (metatiles (24, 8) and (23, 9)) scatters them; nothing lies under them. |
void | scYallamOfferYeppSong (void) | The boy standing in the children's meadow asks "Do you want to hear one of the songs Yepp wrote?". |
void | scYallamTalkAboutSongGame (void) | The girl with a topknot running round the big tree in the children's meadow stops, turns to Felix and says the game that goes with the song is tough and she wants to play something else, then runs on; Mind Read hears she once heard that children's songs and stories have hidden meanings. |
void | scYallamForceLogDown (void) | Force cast at the log standing on its stump east of the cave mouth near Sunshine's house tips it over west: it spins off the ledge with a crash and drops upright into the gap below (metatile (10, 12)), a post Felix can now hop onto. |
void | scYallamNoOperation (void) | Nothing happens as Force first reaches the log; the push itself is scYallamForceLogDown. |
Sint32 | scYallamTurnSpriteAround (ACTOR *actor) | Unused: turns an actor's sprite half a turn, as an actor script's call. |
Sint32 | scYallamHideShadow (ACTOR *actor) | Takes the shadow off a log's part, as its actor script's call, once the script has set it in place. |
void | scYallamRunSongPath (Sint32 id) | One step of a runner's path round the meadow's rings in the song game, by its step counter, halting or going on as the song leader commands (scYallamUpdateSongGame). |
void | scYallamShowSongGame (void) | The boy sings the song of the stars ("If you want to go to the stars...") while the children lead Felix and Jenna round the meadow's rings, one verse at a time; then he offers the second song. |
BSS_DATA | ALIGNED (16) | The song game's five runners, kept while it is paused. |
Sint32 | scYallamStopIfFacingNear (ACTOR *actor, ACTOR *target, Sint32 range, Sint32 force) | Stops the actor (paused, standing) when the target is nearer than range pixels and lies ahead of it, within a sixteenth of a turn either side of its heading; force stops it regardless, and so does a talk with it (its sceneByte set). |
void | scYallamUpdateSongGame (void) | The song game's tick event: passes the song leader's command on to every runner, Felix among them, and moves each a step along the path. |
Sint32 | scYallamUpdateRunningChild (ACTOR *actor) | The update of the two children running their rings. |
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. |
void | scYallamEnterDoor (void) | Walking north into one of Yallam's doors opens it with a click and takes Felix inside: the inn's (metatile (35, 11)), Sunshine's by the log (metatile (15, 11)), the two other huts' (metatiles (34, 21) and (28, 23)), the three shops' in the ledge (metatiles (20, 20), (16, 19) and (13, 20)) or the Sanctum's wide door in the cliff (metatiles (26, 8) and (27, 8)). |
void | scYallamUncoverAntidote (void) | Cyclone cast at the pair of weeds on the raised ground south of the Sanctum's door (metatile (26, 14)) scatters both and uncovers the Antidote that lies under them, to be picked up there. |
void | scYallamUncoverNut (void) | Cyclone cast at the westernmost of the three weeds in the village's south-east corner (metatile (42, 21)) scatters them all and uncovers the Nut under it, to be picked up there. |
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 | scYallamTalkAboutSongCircles (void) | The boy running round the big tree in the children's meadow stops, turns to Felix and says running round in circles while singing one of Yepp's songs is pretty tough, then runs on; Mind Read hears that there is a lot to remember for each song. |
Bool | scYallamHasArrived (ACTOR *actor) | Whether an actor has reached its target, which is then unset. |
void | scYallamPauseSongGame (void) | Saves every runner's state and stops the game's event. |
void | scYallamResumeSongGame (void) | Restores every runner's state and starts the game's event again. |
void | scYallamStartRunner (Sint32 id) | Readies an actor to run the song game's path from its start. |
void | scYallamPlaceFallenLog (void) | Once Force has pushed it, the log stands in the gap where it fell. |
Sint32 | scInit (void) | Opens the room through the window transition, and in the debug room draws the cat 1.7 times its size. |
Sint32 | scPrepareMap (void) | Once the log has fallen, its metatile takes the hop again (scYallamForceLogDown). |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | YallamLogRaised [] | The log standing on its stump on the ledge, raised onto it. |
extern Sint32 | YallamStumpLowered [] | The stump, sunk into the ledge below the log. |
extern Uint32 | YallamCirclesChildRuns [] | The boy runs round the big tree in the children's meadow, a six-sided lap. |
extern Uint32 | YallamGameChildRuns [] | As YallamCirclesChildRuns, for the game child, half a lap ahead of it. |
extern Uint16 | YallamDoorOpening [] | The huts' doors' metatile animations as they open, one for each shape of door. |
extern Uint16 | YallamSecondDoorOpening [] | The second shape of hut door's opening, as YallamDoorOpening. |
extern Uint16 | YallamThirdDoorOpening [] | The third shape of hut door's opening, as YallamDoorOpening. |
extern Uint16 | YallamSanctumDoorOpening [] | The sanctum's door opening, two metatiles wide. |
SONG_RUNNER_STATE | YallamSavedSongGame [5] | The song game's five runners, kept while it is paused. |
extern MAP_EDIT | YallamDoors [] | Each door's opening and the metatile it is drawn at, by its exit's number. |
extern ACTOR_PLACE | YallamPlacements [] | The village, in YALLAM_ACTOR_ID order. |
extern ACTOR_PLACE | YallamCavePlacements [] | The cave places no actors. |
extern ACTOR_PLACE | YallamSongGamePlacements [] | The children's meadow, in YALLAM_SONG_GAME_ACTOR_ID order, and Jenna. |
extern CUE | YallamCues [] | The village: its exits and doors, its people, the Cyclone spots and the log. |
extern CUE | YallamCaveCues [] | The cave's exits. |
extern CUE | YallamSongGameCues [] | The song game's exit and its children. |
extern Uint32 | YallamCirclesChildGathers [] | The children who were running gather by the song leader. |
extern Uint32 | YallamGameChildGathers [] | As YallamCirclesChildGathers, for the game child. |
extern Uint32 | YallamSongLeaderForms [] | The children take their places in the ring for the game. |
extern Uint32 | YallamCirclesChildForms [] | As YallamSongLeaderForms, for the circles child. |
extern Uint32 | YallamGameChildForms [] | As YallamSongLeaderForms, for the game child. |
extern Uint32 | YallamStoryChildForms [] | As YallamSongLeaderForms, for the story child. |
extern Uint32 | YallamSongLeaderStarts [] | The children step to where the song's run begins. |
extern Uint32 | YallamGameChildStarts [] | As YallamSongLeaderStarts, for the game child. |
extern Uint32 | YallamCirclesChildStarts [] | As YallamSongLeaderStarts, for the circles child. |
extern Uint8 | MsgIfYouWant [] | The moon song's words, sung verse by verse. |
extern Uint8 | MsgIfYouWantTo [] | The sun song's words, sung verse by verse. |
extern Sint32 | YallamStandingLogLowered [] | The standing log, shrunk and sunk. |
Uint32 | SceneExits [] | The room has no exits of its own. |
Description
Yallam, the village near Taopo Swamp where Sunshine the blacksmith lives (its
houses, inn and shops are in yallam_rooms.c). East of the village is a meadow
of stumps ringed by worn paths round a big tree, where four children play the
game that goes with Yepp's songs: asked, the boy standing there leads Felix
and Jenna round the rings to the words of the songs of the stars, the moon
and the sun, which tell the way through the Sea of Time. Cyclone scatters
weeds round the village: the pair south of the Sanctum's door hide an
Antidote and the three in the south-east corner a Nut. Once the party has
Force, the log standing beside the cave mouth near Sunshine's house can be
tipped into the gap below it, and Cyclone on the weed patch in the north-west
corner opens a hole down into the cave that leads to the Masamune's chest.
Macros in detail
FLAG_YALLAM_LOG_FALLEN
#define FLAG_YALLAM_LOG_FALLEN FLAG_AREA_TEMP(0x00)
Set once Force has pushed the log off its ledge, to stand upright in the gap below.
Referenced by scPrepareMap(), scYallamForceLogDown(), scYallamPlaceFallenLog() and YallamCues.
Definition at line 27 of file yallam.c.
STOP_RANGE
#define STOP_RANGE 24
How near in front of it, in pixels, a running child stops for the other child or for the leader.
Referenced by scYallamUpdateRunningChild().
Definition at line 84 of file yallam.c.
LEADER_WALK_ON_RANGE
#define LEADER_WALK_ON_RANGE 11
In every edition but the Japanese, a running child walks on while the leader is this near, in pixels.
Referenced by scYallamUpdateRunningChild().
Definition at line 87 of file yallam.c.
ANTIDOTE_SPOT_X
#define ANTIDOTE_SPOT_X 424
Where the Antidote and the Nut lie once Cyclone has scattered the weeds over them, in pixels.
Referenced by scYallamUncoverAntidote().
Definition at line 114 of file yallam.c.
ANTIDOTE_SPOT_Z
#define ANTIDOTE_SPOT_Z 232
Referenced by scYallamUncoverAntidote().
Definition at line 115 of file yallam.c.
NUT_SPOT_X
#define NUT_SPOT_X 680
Referenced by scYallamUncoverNut().
Definition at line 116 of file yallam.c.
NUT_SPOT_Z
#define NUT_SPOT_Z 344
Referenced by scYallamUncoverNut().
Definition at line 117 of file yallam.c.
TOPPLE_SPIN_GAIN
#define TOPPLE_SPIN_GAIN 40
The falling log's spin, in angle units a tick: it gains this much each tick,
from rest as it tips off the ledge and from TOPPLE_ROLL_SPIN as it rolls
down.
Referenced by scYallamForceLogDown().
Definition at line 122 of file yallam.c.
TOPPLE_ROLL_SPIN
#define TOPPLE_ROLL_SPIN 400
Referenced by scYallamForceLogDown().
Definition at line 123 of file yallam.c.
RUN_TO
#define RUN_TO(step, x, z)
A step of a song game runner's path, kept in its songStep: sends it toward a point in the meadow, in pixels, and the step after waits for it to arrive there.
Referenced by scYallamRunSongPath().
Definition at line 640 of file yallam.c.
RUN_TO_AT_SPEED
#define RUN_TO_AT_SPEED(step, speed, x, z)
As RUN_TO, at a new speed in pixels a tick: faster on the straight runs
between the rings.
Referenced by scYallamRunSongPath().
Definition at line 653 of file yallam.c.
RUN_PAST
#define RUN_PAST(step, x, z, nextX, nextZ)
As RUN_TO to (x, z) and then to (nextX, nextZ), but the wait at the first
point falls into the step after it: the runner turns for the next point a
tick after setting out for this one, cutting the corner.
Referenced by scYallamRunSongPath().
Definition at line 668 of file yallam.c.
Enumerations in detail
YALLAM_ACTOR_ID
enum YALLAM_ACTOR_ID
Yallam's actors, numbering the rows of YallamPlacements.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_LOG_STUMP | ACTOR_FIRST_PLACED | The tree trunk on the ledge: its |
ACTOR_FALLING_LOG | broken stump, which stays, and the log standing on it, which Force pushes off (scYallamForceLogDown). | |
ACTOR_STANDING_LOG | Unused: a standing log, placed at the map's corner out of sight, where nothing moves it. | |
ACTOR_VILLAGER_FEW_VISITORS | "Yallam doesn't get many visitors. Hasn't for a long time." | |
ACTOR_VILLAGER_YEPP_DIED | "Our master boatsman, Yepp, died." | |
ACTOR_VILLAGER_IF_YEPP_LIVED | "If Yepp were alive today, our village would be thriving." | |
ACTOR_VILLAGER_PEARL_BED | "Yepp found this huge bed of pearls and sold them in another town." | |
ACTOR_VILLAGER_PEARL_DIVERS | "There used to be a lot of pearl divers here in Yallam." | |
ACTOR_VILLAGER_LOST_YEPP | "When we lost Yepp, all of Yallam practically fell to pieces." | |
ACTOR_BOATSMAN_TAUGHT_BY_YEPP | "Yepp was the one who taught me how to handle a boat." | |
ACTOR_BOATSMAN_TAUGHT_LITTLE | "Yepp told me the only thing he could teach me was how..." |
Definition at line 30 of file yallam.c.
YALLAM_SONG_GAME_ACTOR_ID
enum YALLAM_SONG_GAME_ACTOR_ID
The children's meadow's actors, numbering the rows of
YallamSongGamePlacements: the four children who play the song game.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_SONG_LEADER | ACTOR_FIRST_PLACED | "Yepp's songs are a lot of fun, because he made this game..."; he offers the song (scYallamOfferYeppSong) and leads the game. |
ACTOR_CIRCLES_CHILD | "Running around in circles here while singing one of..." | |
ACTOR_GAME_CHILD | "There's a game that goes along with the song, but it's tough." | |
ACTOR_STORY_CHILD | "Yepp wrote all of his children's songs while he was out here..." |
Definition at line 59 of file yallam.c.
YALLAM_TREASURE_ACTOR_ID
enum YALLAM_TREASURE_ACTOR_ID
Yallam's hidden treasure, the rows of its item table.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_HIDDEN_NUT | FIELD_TREASURE_ACTOR | |
ACTOR_HIDDEN_COINS | ||
ACTOR_HIDDEN_ANTIDOTE |
Definition at line 75 of file yallam.c.
anonymous enum
enum { CHILD_CHASES_GAME_CHILD, CHILD_TALKING }
The running children keep these flags in ACTOR.songStep.
| Enumerator | Value | Description |
|---|---|---|
CHILD_CHASES_GAME_CHILD | 1 | Set on the circles child, who runs after ACTOR_GAME_CHILD. |
CHILD_TALKING | 2 | Stops the child for the leader, whatever its heading, while a talk or Mind Read is open; nothing here sets it, since a talk stops a child by its sceneByte. |
Definition at line 90 of file yallam.c.
YALLAM_METATILE
enum YALLAM_METATILE
The map metatiles Cyclone answers on, by the behaviour the map gives them: each set of weeds it scatters.
| Enumerator | Value | Description |
|---|---|---|
METATILE_WEEDS_OVER_CAVE_HOLE | 20 | |
METATILE_WEEDS_BELOW_SHOPS | 21 | |
METATILE_WEEDS_OVER_ANTIDOTE | 22 | |
METATILE_WEEDS_IN_CORNER | 23 | |
METATILE_WEEDS_OVER_NUT | 24 | |
METATILE_WEEDS_BY_SANCTUM | 25 |
Definition at line 102 of file yallam.c.
anonymous enum
enum { SONG_GAME_GO, SONG_GAME_HALT, SONG_GAME_HALT_AND_STAND }
The song leader's songCommand in the song game: a command to every runner,
which scYallamUpdateSongGame passes on and clears.
| Enumerator | Value | Description |
|---|---|---|
SONG_GAME_GO | 1 | |
SONG_GAME_HALT | 2 | |
SONG_GAME_HALT_AND_STAND | 3 |
Definition at line 180 of file yallam.c.
anonymous enum
enum { RUNNER_GOING, RUNNER_HALTED, RUNNER_HALTING, RUNNER_HALTING_TO_STAND }
A runner's sceneCount in the song game: where it stands on its path.
| Enumerator | Value | Description |
|---|---|---|
RUNNER_GOING | 0 | walks on along its path |
RUNNER_HALTED | 1 | waits where it stopped |
RUNNER_HALTING | 2 | stops where it is this tick |
RUNNER_HALTING_TO_STAND | 3 | stops and stands this tick |
Definition at line 188 of file yallam.c.
anonymous enum
enum { YALLAM_TO_SONG_GAME, YALLAM_FROM_SONG_GAME, YALLAM_SONG_GAME, YALLAM_EXIT_SONG_GAME }
The children's meadow, where the song game is played. The path off the village's east edge (metatiles (45, 15) to (45, 17)) is exit 12, arriving by the meadow's entrance 15; the meadow's own way out, exit 15, arrives back by entrance 12.
| Enumerator | Value | Description |
|---|---|---|
YALLAM_TO_SONG_GAME | 12 | |
YALLAM_FROM_SONG_GAME | 12 | |
YALLAM_SONG_GAME | 15 | |
YALLAM_EXIT_SONG_GAME | 15 |
Definition at line 332 of file yallam.c.
anonymous enum
enum { SONG_STEP_STARS_EAST, SONG_STEP_STARS_RINGS, SONG_STEP_MOON, SONG_STEP_MOON_WEST, … }
The step of the runners' path where each verse's run begins, the step the singing waits for before it sings that verse; the stars song's first verse runs from step 0.
| Enumerator | Value | Description |
|---|---|---|
SONG_STEP_STARS_EAST | 34 | "...head to the east, past three to the north." |
SONG_STEP_STARS_RINGS | 42 | "There, run 'round thrice..." |
SONG_STEP_MOON | 108 | "If you want to go to the moon..." |
SONG_STEP_MOON_WEST | 114 | "Face west from the stars..." |
SONG_STEP_MOON_SOUTH | 150 | "...head to the south, then one swirl west." |
SONG_STEP_MOON_RINGS | 154 | "There, run 'round thrice..." |
SONG_STEP_SUN | 216 | "If you want to go to the sun..." |
SONG_STEP_SUN_SOUTH | 218 | "Face south from the moon..." |
SONG_STEP_SUN_WEST | 254 | "...head to the west, then six to the north." |
SONG_STEP_SUN_RINGS | 258 | "There, run 'round thrice..." |
SONG_STEP_END | 324 | the sun reached: the game is over |
Definition at line 620 of file yallam.c.
Functions in detail
scYallamSingMoonSong
void scYallamSingMoonSong(void)
The song of the moon, sung and run round the meadow's rings verse by verse as the stars song was; then the boy offers the third song.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdScriptFinishScreenTransition(), fdScriptOpenMessage(), fdScriptPlaySound(), fdScriptShowMessage(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, MsgIfYouWant, scFieldActorJump(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scYallamPauseSongGame(), scYallamResumeSongGame(), scYallamSingSunSong(), Sint32 and sySynch().
Referenced by scYallamShowSongGame().
Definition at lines 125 and 1169 of file yallam.c.
scYallamSingSunSong
void scYallamSingSunSong(void)
The song of the sun, sung and run round the meadow's rings verse by verse; then each child hops away and back in turn, the boy says that is all the games they have, and the screen fades back to the village.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorMoveToAndWait(), fdActorWalkToAndWait(), fdScriptFinishScreenTransition(), fdScriptPlaySound(), fdScriptShowMessage(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, MsgIfYouWantTo, scFieldActorJump(), scFieldActorSetMoveTargetFX(), scFieldActorWaitForMoveById(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scYallamPauseSongGame(), scYallamResumeSongGame(), Sint32 and sySynch().
Referenced by scYallamSingMoonSong().
Definition at lines 126 and 1254 of file yallam.c.
scYallamStartRunningChildren
void scYallamStartRunningChildren(void)
The boy and the girl with a topknot run round the big tree in the children's
meadow, each after the other (scYallamUpdateRunningChild).
References fdActorGet() and scYallamUpdateRunningChild().
Referenced by scInit().
Definition at lines 127 and 1459 of file yallam.c.
scYallamUncoverCaveHole
void scYallamUncoverCaveHole(void)
Cyclone cast in the weed patch in the village's north-west corner (metatiles
(3, 7) to (7, 11)) scatters the weeds and uncovers a wood-rimmed hole in the
middle of the patch, the way down into the cave that leads to the Masamune's
chest. The hole's picture and its exit to the cave
(YALLAM_YALLAM_CAVE_WEST) are copied from a spare metatile below the
village.
References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo() and fdTileCopiesCopyTouchedMetatiles().
Referenced by YallamCues.
Definition at lines 128 and 406 of file yallam.c.
scYallamScatterWeedsBelowShops
void scYallamScatterWeedsBelowShops(void)
Cyclone cast by the weeds on the ledge below the shops' doors (metatiles (15,
22) and (16, 22)) scatters them; nothing lies under them. The eastern of the
two weeds south of the Sanctum's door (metatile (27, 14) of the raised
ground's layer) runs this too, but only the metatiles the whirl touched
inside the two below the shops are cleared, so a cast there clears nothing
here; that pair is scattered, and its Antidote shown, by
scYallamUncoverAntidote.
References scFieldTileCopiesCopyTouchedMetatiles().
Referenced by YallamCues.
Definition at lines 129 and 420 of file yallam.c.
scYallamScatterWeedsInCorner
void scYallamScatterWeedsInCorner(void)
Cyclone cast at the three weeds in the village's south-east corner (metatiles
(44, 22), (43, 23) and (44, 23)) scatters them all; the Nut lies under the
one at metatile (42, 21) (scYallamUncoverNut).
References scFieldTileCopiesCopyTouchedMetatiles().
Referenced by YallamCues.
Definition at lines 130 and 460 of file yallam.c.
scYallamScatterWeedsBySanctum
void scYallamScatterWeedsBySanctum(void)
Cyclone cast at the two weeds just west of the Sanctum's door (metatiles (24, 8) and (23, 9)) scatters them; nothing lies under them.
References scFieldTileCopiesCopyTouchedMetatiles().
Referenced by YallamCues.
Definition at lines 131 and 499 of file yallam.c.
scYallamOfferYeppSong
void scYallamOfferYeppSong(void)
The boy standing in the children's meadow asks "Do you want to hear one of
the songs Yepp wrote?". A yes starts the song game (scYallamShowSongGame); a
no, and he says this is where all the kids in Yallam come to play. Felix
talks to him facing any way but west, south-west or north-west.
References fdScriptEnd(), fdScriptOpenMessage(), fdScriptShowMessage(), fdScriptStart(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId() and scYallamShowSongGame().
Referenced by YallamSongGameCues.
Definition at lines 132 and 522 of file yallam.c.
scYallamTalkAboutSongGame
void scYallamTalkAboutSongGame(void)
The girl with a topknot running round the big tree in the children's meadow stops, turns to Felix and says the game that goes with the song is tough and she wants to play something else, then runs on; Mind Read hears she once heard that children's songs and stories have hidden meanings.
References fdActorFaceActor(), fdActorGet(), fdScriptEnd(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy() and scFieldScriptSetMessageId().
Referenced by YallamSongGameCues.
Definition at lines 133 and 577 of file yallam.c.
scYallamForceLogDown
void scYallamForceLogDown(void)
Force cast at the log standing on its stump east of the cave mouth near Sunshine's house tips it over west: it spins off the ledge with a crash and drops upright into the gap below (metatile (10, 12)), a post Felix can now hop onto. The hop comes from the map's own hop metatile at (8, 12), whose flags are copied onto the log's metatile.
References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptPlaySound(), fdScriptSetFlag(), scFieldActorWaitForMove(), scFieldScriptWait(), Sint32 and sySynch().
Referenced by YallamCues.
Definition at lines 134 and 1415 of file yallam.c.
scYallamNoOperation
void scYallamNoOperation(void)
Nothing happens as Force first reaches the log; the push itself is
scYallamForceLogDown.
Referenced by YallamCues.
Definition at lines 135 and 1406 of file yallam.c.
scYallamTurnSpriteAround
Sint32 scYallamTurnSpriteAround(ACTOR *actor)
Unused: turns an actor's sprite half a turn, as an actor script's call.
References Sint32.
Definition at line 147 of file yallam.c.
scYallamHideShadow
Sint32 scYallamHideShadow(ACTOR *actor)
Takes the shadow off a log's part, as its actor script's call, once the script has set it in place.
References fdActorSetSpriteFlags() and Sint32.
Referenced by YallamLogRaised, YallamStandingLogLowered and YallamStumpLowered.
Definition at line 157 of file yallam.c.
scYallamRunSongPath
void scYallamRunSongPath(Sint32 id)
void scYallamRunSongPath(Sint32 actorId)
One step of a runner's path round the meadow's rings in the song game, by its
step counter, halting or going on as the song leader commands
(scYallamUpdateSongGame). Each verse of the songs ends at a step the singing
waits for (scYallamShowSongGame).
References fdActorGetById(), fdActorSelectAnimation(), fdActorSetMoveTarget() and Sint32.
Referenced by scYallamUpdateSongGame().
Definition at lines 165 and 690 of file yallam.c.
scYallamShowSongGame
void scYallamShowSongGame(void)
The boy sings the song of the stars ("If you want to go to the stars...") while the children lead Felix and Jenna round the meadow's rings, one verse at a time; then he offers the second song.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetScript(), fdActorWalkToAndWait(), fdCameraGetActor(), fdScriptFinishScreenTransition(), fdScriptOpenMessage(), fdScriptPlaySound(), fdScriptShowMessage(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldActorJump(), scFieldActorStop(), scFieldActorWaitForMoveById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scScriptCameraFollowActor(), scYallamPauseSongGame(), scYallamSingMoonSong(), scYallamStartRunner(), scYallamUpdateSongGame(), sySetTickEvent(), sySynch(), YallamCirclesChildForms, YallamCirclesChildGathers, YallamCirclesChildStarts, YallamGameChildForms, YallamGameChildGathers, YallamGameChildStarts, YallamSongLeaderForms, YallamSongLeaderStarts and YallamStoryChildForms.
Referenced by scYallamOfferYeppSong().
Definition at lines 166 and 1030 of file yallam.c.
scYallamStopIfFacingNear
Sint32 scYallamStopIfFacingNear(ACTOR *actor, ACTOR *target, Sint32 range, Sint32 force)
Stops the actor (paused, standing) when the target is nearer than range pixels and lies ahead of it, within a sixteenth of a turn either side of its heading; force stops it regardless, and so does a talk with it (its sceneByte set). Returns 1 when it stopped. A target out of range sets it walking again.
References fdActorSelectAnimation(), result, scPosDistance(), Sint32 and syAtan().
Referenced by scYallamUpdateRunningChild().
Definition at lines 200 and 210 of file yallam.c.
scYallamUpdateSongGame
void scYallamUpdateSongGame(void)
The song game's tick event: passes the song leader's command on to every runner, Felix among them, and moves each a step along the path.
References fdActorGet(), MainRoutineStateWork, scYallamRunSongPath() and Sint32.
Referenced by scYallamPauseSongGame(), scYallamResumeSongGame() and scYallamShowSongGame().
Definition at lines 204 and 897 of file yallam.c.
scYallamUpdateRunningChild
Sint32 scYallamUpdateRunningChild(ACTOR *actor)
The update of the two children running their rings. Each stops when it runs up behind the other, and otherwise when the leader is in its way; outside Japan it walks on while the leader is right beside it.
References fdActorGet(), fdActorSelectAnimation(), MainRoutineStateWork, scPosDistance(), scYallamStopIfFacingNear() and Sint32.
Referenced by scYallamStartRunningChildren().
Definition at lines 254 and 288 of file yallam.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 313 of file yallam.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 318 of file yallam.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 323 of file yallam.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References MainRoutineStateWork, YallamCavePlacements, YallamPlacements and YallamSongGamePlacements.
Definition at line 344 of file yallam.c.
scYallamEnterDoor
void scYallamEnterDoor(void)
Walking north into one of Yallam's doors opens it with a click and takes
Felix inside: the inn's (metatile (35, 11)), Sunshine's by the log (metatile
(15, 11)), the two other huts' (metatiles (34, 21) and (28, 23)), the three
shops' in the ledge (metatiles (20, 20), (16, 19) and (13, 20)) or the
Sanctum's wide door in the cliff (metatiles (26, 8) and (27, 8)). Each door's
metatiles carry its exit's number, which also picks its picture as it opens
from YallamDoors.
References fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdMapGridAnimateMetatiles(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptPlaySound(), fdScriptStart(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptWait(), Sint32 and YallamDoors.
Referenced by YallamCues.
Definition at lines 361 and 1473 of file yallam.c.
scYallamUncoverAntidote
void scYallamUncoverAntidote(void)
Cyclone cast at the pair of weeds on the raised ground south of the Sanctum's
door (metatile (26, 14)) scatters both and uncovers the Antidote that lies
under them, to be picked up there. Until the Antidote is taken, its hidden
item (ACTOR_HIDDEN_ANTIDOTE) is set at the spot, and if Felix is standing
on it he hops a metatile east, off it.
References fdActorGet(), fdActorSetAttachedEffect(), fdActorSetDestinationOffset(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), MainRoutineStateWork, scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy() and scFieldTileCopiesCopyTouchedMetatiles().
Referenced by YallamCues.
Definition at lines 430 and 1474 of file yallam.c.
scYallamUncoverNut
void scYallamUncoverNut(void)
Cyclone cast at the westernmost of the three weeds in the village's south-east corner (metatile (42, 21)) scatters them all and uncovers the Nut under it, to be picked up there. Until the Nut is taken, its hidden item is set at the spot, and if Felix is standing on it he hops a metatile north, off it.
References fdActorGet(), fdActorSetAttachedEffect(), fdActorSetDestinationOffset(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), MainRoutineStateWork, scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy() and scFieldTileCopiesCopyTouchedMetatiles().
Referenced by YallamCues.
Definition at lines 470 and 1475 of file yallam.c.
scGetCues
const CUE *scGetCues(void)
References MainRoutineStateWork, YallamCaveCues, YallamCues and YallamSongGameCues.
Definition at line 508 of file yallam.c.
scYallamTalkAboutSongCircles
void scYallamTalkAboutSongCircles(void)
The boy running round the big tree in the children's meadow stops, turns to Felix and says running round in circles while singing one of Yepp's songs is pretty tough, then runs on; Mind Read hears that there is a lot to remember for each song. The boy keeps his heading through the talk, so he runs on the way he was going; Mind Read stops him without turning him.
References fdActorFaceActor(), fdActorGet(), fdScriptEnd(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy() and scFieldScriptSetMessageId().
Referenced by YallamSongGameCues.
Definition at lines 543 and 1476 of file yallam.c.
scYallamHasArrived
Bool scYallamHasArrived(ACTOR *actor)
Whether an actor has reached its target, which is then unset.
References Sint32.
Definition at line 608 of file yallam.c.
scYallamPauseSongGame
void scYallamPauseSongGame(void)
Saves every runner's state and stops the game's event.
References fdActorGet(), MainRoutineStateWork, scFieldCloseEvent(), scYallamUpdateSongGame() and YallamSavedSongGame.
Referenced by scYallamShowSongGame(), scYallamSingMoonSong() and scYallamSingSunSong().
Definition at line 939 of file yallam.c.
scYallamResumeSongGame
void scYallamResumeSongGame(void)
Restores every runner's state and starts the game's event again.
References fdActorGet(), MainRoutineStateWork, scYallamUpdateSongGame(), sySetTickEvent() and YallamSavedSongGame.
Referenced by scYallamSingMoonSong() and scYallamSingSunSong().
Definition at line 972 of file yallam.c.
scYallamStartRunner
void scYallamStartRunner(Sint32 id)
Readies an actor to run the song game's path from its start.
References fdActorGet(), fdActorSetAnimation() and Sint32.
Referenced by scYallamShowSongGame().
Definition at line 1005 of file yallam.c.
scYallamPlaceFallenLog
void scYallamPlaceFallenLog(void)
Once Force has pushed it, the log stands in the gap where it fell.
References fdActorGet() and fdScriptGetFlag().
Referenced by scInit().
Definition at line 1373 of file yallam.c.
scInit
Sint32 scInit(void)
References MainRoutineStateWork, scYallamPlaceFallenLog(), scYallamStartRunningChildren() and Sint32.
Definition at line 1382 of file yallam.c.
scPrepareMap
Sint32 scPrepareMap(void)
Once the log has fallen, its metatile takes the hop again
(scYallamForceLogDown).
References fdMapGridCopyMetatileAttributes(), fdScriptGetFlag(), MainRoutineStateWork and Sint32.
Definition at line 1396 of file yallam.c.
Variables in detail
YallamLogRaised
extern Sint32 YallamLogRaised[]
Sint32 YallamLogRaised[]
The log standing on its stump on the ledge, raised onto it.
References scYallamHideShadow() and Sint32.
Referenced by YallamPlacements.
Definition at lines 137 and 1481 of file yallam.c.
YallamStumpLowered
extern Sint32 YallamStumpLowered[]
Sint32 YallamStumpLowered[]
The stump, sunk into the ledge below the log.
References scYallamHideShadow() and Sint32.
Referenced by YallamPlacements.
Definition at lines 138 and 1490 of file yallam.c.
YallamCirclesChildRuns
extern Uint32 YallamCirclesChildRuns[]
Uint32 YallamCirclesChildRuns[]
The boy runs round the big tree in the children's meadow, a six-sided lap.
Referenced by YallamSongGamePlacements.
Definition at lines 139 and 1509 of file yallam.c.
YallamGameChildRuns
extern Uint32 YallamGameChildRuns[]
Uint32 YallamGameChildRuns[]
As YallamCirclesChildRuns, for the game child, half a lap ahead of it.
Referenced by YallamSongGamePlacements.
Definition at lines 140 and 1529 of file yallam.c.
YallamDoorOpening
extern Uint16 YallamDoorOpening[]
Uint16 YallamDoorOpening[]
The huts' doors' metatile animations as they open, one for each shape of door.
Referenced by YallamDoors.
Definition at lines 141 and 1755 of file yallam.c.
YallamSecondDoorOpening
extern Uint16 YallamSecondDoorOpening[]
Uint16 YallamSecondDoorOpening[]
The second shape of hut door's opening, as YallamDoorOpening.
Referenced by YallamDoors.
Definition at lines 142 and 1762 of file yallam.c.
YallamThirdDoorOpening
extern Uint16 YallamThirdDoorOpening[]
Uint16 YallamThirdDoorOpening[]
The third shape of hut door's opening, as YallamDoorOpening.
Referenced by YallamDoors.
Definition at lines 143 and 1769 of file yallam.c.
YallamSanctumDoorOpening
extern Uint16 YallamSanctumDoorOpening[]
Uint16 YallamSanctumDoorOpening[]
The sanctum's door opening, two metatiles wide.
Referenced by YallamDoors.
Definition at lines 144 and 1776 of file yallam.c.
YallamSavedSongGame
SONG_RUNNER_STATE YallamSavedSongGame[5]
The song game's five runners, kept while it is paused.
Referenced by scYallamPauseSongGame() and scYallamResumeSongGame().
Definition at line 197 of file yallam.c.
YallamDoors
extern MAP_EDIT YallamDoors[]
MAP_EDIT YallamDoors[]
Each door's opening and the metatile it is drawn at, by its exit's number.
References YallamDoorOpening, YallamSanctumDoorOpening, YallamSecondDoorOpening and YallamThirdDoorOpening.
Referenced by scYallamEnterDoor().
Definition at lines 198 and 1783 of file yallam.c.
YallamPlacements
extern ACTOR_PLACE YallamPlacements[]
ACTOR_PLACE YallamPlacements[]
The village, in YALLAM_ACTOR_ID order.
References Sint32, YallamLogRaised, YallamStandingLogLowered and YallamStumpLowered.
Referenced by scGetActorPlacements().
Definition at lines 340 and 1698 of file yallam.c.
YallamCavePlacements
extern ACTOR_PLACE YallamCavePlacements[]
ACTOR_PLACE YallamCavePlacements[]
The cave places no actors.
Referenced by scGetActorPlacements().
Definition at lines 341 and 1735 of file yallam.c.
YallamSongGamePlacements
extern ACTOR_PLACE YallamSongGamePlacements[]
ACTOR_PLACE YallamSongGamePlacements[]
The children's meadow, in YALLAM_SONG_GAME_ACTOR_ID order, and Jenna.
References Sint32, YallamCirclesChildRuns and YallamGameChildRuns.
Referenced by scGetActorPlacements().
Definition at lines 342 and 1740 of file yallam.c.
YallamCues
extern CUE YallamCues[]
CUE YallamCues[]
The village: its exits and doors, its people, the Cyclone spots and the log.
References scYallamEnterDoor(), scYallamForceLogDown(), scYallamNoOperation(), scYallamScatterWeedsBelowShops(), scYallamScatterWeedsBySanctum(), scYallamScatterWeedsInCorner(), scYallamUncoverAntidote(), scYallamUncoverCaveHole(), scYallamUncoverNut() and Sint32.
Referenced by scGetCues().
Definition at lines 504 and 1795 of file yallam.c.
YallamCaveCues
extern CUE YallamCaveCues[]
CUE YallamCaveCues[]
The cave's exits.
Referenced by scGetCues().
Definition at lines 505 and 1863 of file yallam.c.
YallamSongGameCues
extern CUE YallamSongGameCues[]
CUE YallamSongGameCues[]
The song game's exit and its children.
References scYallamOfferYeppSong(), scYallamTalkAboutSongCircles() and scYallamTalkAboutSongGame().
Referenced by scGetCues().
Definition at lines 506 and 1872 of file yallam.c.
YallamCirclesChildGathers
extern Uint32 YallamCirclesChildGathers[]
Uint32 YallamCirclesChildGathers[]
The children who were running gather by the song leader.
Referenced by scYallamShowSongGame().
Definition at lines 1017 and 1549 of file yallam.c.
YallamGameChildGathers
extern Uint32 YallamGameChildGathers[]
Uint32 YallamGameChildGathers[]
As YallamCirclesChildGathers, for the game child.
Referenced by scYallamShowSongGame().
Definition at lines 1018 and 1561 of file yallam.c.
YallamSongLeaderForms
extern Uint32 YallamSongLeaderForms[]
Uint32 YallamSongLeaderForms[]
The children take their places in the ring for the game.
Referenced by scYallamShowSongGame().
Definition at lines 1019 and 1573 of file yallam.c.
YallamCirclesChildForms
extern Uint32 YallamCirclesChildForms[]
Uint32 YallamCirclesChildForms[]
As YallamSongLeaderForms, for the circles child.
Referenced by scYallamShowSongGame().
Definition at lines 1020 and 1589 of file yallam.c.
YallamGameChildForms
extern Uint32 YallamGameChildForms[]
Uint32 YallamGameChildForms[]
As YallamSongLeaderForms, for the game child.
Referenced by scYallamShowSongGame().
Definition at lines 1021 and 1605 of file yallam.c.
YallamStoryChildForms
extern Uint32 YallamStoryChildForms[]
Uint32 YallamStoryChildForms[]
As YallamSongLeaderForms, for the story child.
Referenced by scYallamShowSongGame().
Definition at lines 1022 and 1621 of file yallam.c.
YallamSongLeaderStarts
extern Uint32 YallamSongLeaderStarts[]
Uint32 YallamSongLeaderStarts[]
The children step to where the song's run begins.
Referenced by scYallamShowSongGame().
Definition at lines 1023 and 1634 of file yallam.c.
YallamGameChildStarts
extern Uint32 YallamGameChildStarts[]
Uint32 YallamGameChildStarts[]
As YallamSongLeaderStarts, for the game child.
Referenced by scYallamShowSongGame().
Definition at lines 1024 and 1643 of file yallam.c.
YallamCirclesChildStarts
extern Uint32 YallamCirclesChildStarts[]
Uint32 YallamCirclesChildStarts[]
As YallamSongLeaderStarts, for the circles child.
Referenced by scYallamShowSongGame().
Definition at lines 1025 and 1655 of file yallam.c.
MsgIfYouWant
extern Uint8 MsgIfYouWant[]
The moon song's words, sung verse by verse.
Referenced by scYallamSingMoonSong().
Definition at line 1165 of file yallam.c.
MsgIfYouWantTo
extern Uint8 MsgIfYouWantTo[]
The sun song's words, sung verse by verse.
Referenced by scYallamSingSunSong().
Definition at line 1249 of file yallam.c.
YallamStandingLogLowered
extern Sint32 YallamStandingLogLowered[]
Sint32 YallamStandingLogLowered[]
The standing log, shrunk and sunk.
References scYallamHideShadow() and Sint32.
Referenced by YallamPlacements.
Definition at lines 1478 and 1498 of file yallam.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 1668 of file yallam.c.