src/scene/bilibin.c
Bilibin, the Bilibin Treasury and the Bilibin Barricade, three scenes that share one overlay; the getters pick each scene's tables by MainRoutineStateWork.next. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "scene/pushed_actor.h"#include "graphics/graphics.h"#include "text/msg_ids.h"#include "shared/actor_facing.c"#include "shared/actor_find_at_metatile.c"#include "shared/pushed_actor_direction_steps.c"
Structures
| Name | Description | |
|---|---|---|
struct | BILIBIN_RIPPLE_TIMER | Counts ticks between the ripples, one every 30 ticks. |
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_BILIBIN_TREE_EXAMINED FLAG_AREA_TEMP(0x01) | The party has looked once at the tree at Bilibin's entrance, so a second look says it looks like a living person. |
#define | FLAG_BILIBIN_KEEPING_MCCOY_WAITING FLAG_AREA_TEMP(0x04) | Set on arriving in Bilibin while McCoy's guards have let the party in and it has not yet entered the palace. |
#define | CRATES_LANE_METATILES 10 | The metatiles round the crate's place, as BilibinCratesPushMetatiles lists them. |
Enumerations
| Name | Description | |
|---|---|---|
enum | BILIBIN_ACTOR_ID { ACTOR_IVY, ACTOR_TREE_MAN, ACTOR_YOUNG_MAN_WELCOME, ACTOR_VI … } | Actors of Bilibin, numbering its actor placements from ACTOR_FIRST_PLACED. |
enum | BILIBIN_BARRICADE_ACTOR_ID { ACTOR_BARRICADE_CRATES, ACTOR_BOTTOM_TREE, ACTOR_MIDDLE_TREE … } | Actors of the Bilibin Barricade (BilibinBarricade), numbering its actor placements from ACTOR_FIRST_PLACED. |
enum | BILIBIN_TREASURY_ACTOR_ID { ACTOR_TREASURY_STATUE, ACTOR_GUST } | Actors of the Bilibin Treasury (BilibinTreasury), numbering its actor placements from ACTOR_FIRST_PLACED. |
enum | BILIBIN_METATILE_BEHAVIOR { METATILE_BEHAVIOR_BILIBIN_WELL, METATILE_BEHAVIOR_BILIBIN_HE … } | Metatile behaviors the three maps' cues answer besides the exits and the doors, whose metatile behaviors are their exits' numbers. |
enum | BILIBIN_SPARE_METATILE { SPARE_METATILE_ROW, VILLAGE_HOLE_METATILE_COLUMN, VILLAGE_WA … } | Spare metatiles in row 0 of each map, whose behaviors are copied where a statue or the crates leave or land. |
enum | anonymous enum { TREASURY_WAY_COLUMN, TREASURY_WAY_ROW } | The metatile the village statue first stands on, over the way down to the Bilibin Treasury. |
enum | anonymous enum { TREASURY_WALKWAY_COLUMN, TREASURY_ALCOVE_ROW, TREASURY_FOOT_ … } | The Treasury statue's two resting places on the walkway's column. |
Functions
| Name | Description | |
|---|---|---|
static void | scBilibinSetUpVillage (void) | Before the curse is lifted the man at the entrance is a tree, and after it he stands there a man. |
static void | scBilibinUpdateVillageStatueMetatiles (void) | Move on the golden statue in front of Bilibin's weapon and armor shop slides it a metatile. |
static void | scBilibinSetUpBarricade (void) | Before the curse is lifted the Gang of Three stand as trees by the river, and after it as children. |
static void | scBilibinUpdateCratesMetatiles (void) | Move on the stack of two crates at the left end of the Bilibin Barricade drags it out of the wall of crates, opening a gap through the barricade to the road to Kolima. |
static void | scBilibinSetUpTreasury (void) | The Treasury opens with an interlaced wipe, and its statue's metatiles are set for where it stands. |
static void | scBilibinUpdateRiverRipples (void) | While Isaac wades in the river at the Bilibin Barricade, west of the fallen tree, a ripple spreads from his feet every 30 ticks. |
static void | scBilibinSpawnRipple (ACTOR *actor) | Spawns a semi-transparent ripple (SPRITE_RIPPLE's spreading rings) at the wader, which releases itself after 30 ticks. |
static void | scBilibinUpdateTreasuryStatueMetatiles (void) | Move on the golden statue in the Treasury slides it up or down the walkway between the two pools, where Gust waits on the ledge to the east. |
const SCENE_ENTRANCE * | scGetEntrances (void) | The six rooms share one entrance table. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | Only the Bilibin Treasury has exit regions. |
const Uint32 * | scGetExits (void) | Returns the packed exits shared by the three scenes. |
static void | scBilibinGustJoins (void) | Talking to Gust in the Bilibin Treasury makes Gust, a Jupiter Djinni, join the party. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Selects the actors of Bilibin, the Bilibin Barricade or the Bilibin Treasury. |
static void | scBilibinInspectWell (void) | Searching the well in Bilibin, the leader peers in, and its bottom cannot be seen. |
const CUE * | scGetCues (void) | The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen. |
static void | scBilibinReadOffLimitsSign (void) | Searching the sign at the Bilibin Barricade: "This area is off-limits to all those without a permit. |
static void | scBilibinReadWarehouseSign (void) | Searching the sign in the Bilibin Treasury: "McCoy's Hidden Warehouse / Do Not Enter!" |
static void | scBilibinInspectHumanShapedTree (void) | The Gang of Three's trees at the Bilibin Barricade look like people. |
static void | scBilibinExamineTreeMan (void) | The tree at Bilibin's entrance almost looks like a man and, looked at again, like a living person. |
static void | scBilibinAskAboutEntranceTree (void) | A burly man asks about the tree at Bilibin's entrance. |
static void | scBilibinAskAboutSoutheastRoute (void) | An old man asks whether the party has tried heading southeast. |
static void | scBilibinAskAboutBeingATree (void) | The man who was the tree at the entrance talks about it. |
static void | scBilibinAskAboutCurseBreakers (void) | A small boy asks whether the party broke the curse. |
static void | scBilibinAskAboutImil (void) | A strongman asks whether the party has been to Imil. |
static void | scBilibinOpenDoorAndLeave (void) | Walking up to a door in Bilibin opens it, and Isaac walks in: the inn (metatile (23, 22)), the houses east (12, 20), west (6, 21) and north (10, 13), the item shop (4, 13), the weapon and armor shop (18, 11) or the Sanctum's double door (24..25, 10). |
static void | scBilibinPullJillFromRiver (void) | Move on Jill's tree, adrift in the river at the Bilibin Barricade, lets Isaac pull her ashore. |
static void | scBilibinHopAcross (void) | Walking on into a gap from one of a few ledges, Isaac hops across it: in the Treasury east or west across the pools from the statue's empty alcove, or south off the foot of the walkway; at the Bilibin Barricade north from metatile (14, 10), or west from metatile (8, 17) beside the crates. |
static void | scBilibinJillGivesHardNut (void) | Jill and her friends thank the leader with a Hard Nut. |
Sint32 | scInit (void) | Sets up the scene being entered, Bilibin, the Bilibin Barricade or the Bilibin Treasury. |
static void | scBilibinPushStatueOrCrates (void) | Pushing a statue in Bilibin or the Bilibin Treasury, or the crates at the Bilibin Barricade, slides it one metatile ahead with the leader behind it, if the metatile is free. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | BilibinFaceLeaderScript [] | |
extern SCENE_ENTRANCE | BilibinEntrancesOther [] | Unused: the entrances for a scene other than the three, which never loads this overlay. |
extern SCENE_ENTRANCE | BilibinEntrances [] | |
extern SCENE_ENTRANCE | BilibinBarricadeEntrances [] | |
extern SCENE_ENTRANCE | BilibinTreasuryEntrances [] | |
extern Sint16 | BilibinTreasuryRegions [] | |
extern Uint32 | BilibinExits [] | |
extern ACTOR_PLACE | BilibinActorPlacementsOther [] | |
extern ACTOR_PLACE | BilibinActorPlacements [] | |
extern ACTOR_PLACE | BilibinBarricadeActorPlacements [] | |
extern ACTOR_PLACE | BilibinTreasuryActorPlacements [] | |
extern CUE | BilibinCuesOther [] | |
extern CUE | BilibinCues [] | |
extern CUE | BilibinBarricadeCues [] | |
extern CUE | BilibinTreasuryCues [] | |
extern Uint16 * | BilibinDoorSteps [] | |
extern Sint16 | BilibinDoorMetatiles [][2] | Where each door's opening is drawn on the map grid, in the order of BilibinDoorSteps. |
extern Uint8 | BilibinCratesPushMetatiles [] | The ten metatiles round the crates' place at the Bilibin Barricade that push them, as column and row. |
extern Sint32 | BilibinRippleScript [] | |
BILIBIN_RIPPLE_TIMER | BilibinRippleTimer | |
Uint16 | BilibinSanctumDoorSteps [] | How each of Bilibin's doors is drawn opening, two steps of map edits; BilibinDoorSteps lists them in the order of the exits from BILIBIN_INN. |
Uint16 | BilibinItemShopDoorSteps [] | |
Uint16 | BilibinWeaponAndArmorShopDoorSteps [] | |
Uint16 | BilibinHouseEastDoorSteps [] | |
Uint16 | BilibinInnDoorSteps [] | |
Uint16 | BilibinHouseWestDoorSteps [] | |
Uint16 | BilibinHouseNorthDoorSteps [] |
Description
Bilibin, the Bilibin Treasury and the Bilibin Barricade, three scenes that
share one overlay; the getters pick each scene's tables by
MainRoutineStateWork.next.
Bilibin is the town past Goma Cave, whose chief, Lord McCoy, has closed the
road to Kolima. Almost everything here turns on FLAG_KOLIMA_CURSE_LIFTED, set
in Kolima Forest when the party heals Tret: until then a man turned into a
tree stands at the entrance (Mind Read hears Help me... Somebody...), and
each villager has a line and a thought for either time. Seven doors open as
the party walks into them: the inn, three houses, the item shop, the weapon
and armor shop, and the Sanctum's double door.
Two ways lead into the Treasury, McCoy's Hidden Warehouse by its sign,
where Gust waits: the cave mouth at the town's west edge, behind ivy that
Whirlwind blows away, and a hole under the golden statue in front of the
weapon and armor shop, which Move or a push slides aside. Inside, a second
golden statue slides along a walkway between two pools.
The Bilibin Barricade is the road east to Kolima, shut by McCoy's wall of crates; the stack at its left end slides out and opens the way. By the river stand three trees, one on another's shoulders: the Gang of Three, children turned into trees by the curse. Once Saturos is beaten at Mercury Lighthouse the travelers from Imil have pushed them over to cross, and Jill's tree drifts in the river until Isaac pulls her ashore with Move. With the curse lifted they are children again, and Jill, if she was saved, gives Isaac a Hard Nut.
Macros in detail
FLAG_BILIBIN_TREE_EXAMINED
#define FLAG_BILIBIN_TREE_EXAMINED FLAG_AREA_TEMP(0x01)
The party has looked once at the tree at Bilibin's entrance, so a second look says it looks like a living person.
Referenced by scBilibinExamineTreeMan().
Definition at line 185 of file bilibin.c.
FLAG_BILIBIN_KEEPING_MCCOY_WAITING
#define FLAG_BILIBIN_KEEPING_MCCOY_WAITING FLAG_AREA_TEMP(0x04)
Set on arriving in Bilibin while McCoy's guards have let the party in and it
has not yet entered the palace. Its only reader is the east guard at the
palace door, in McCoy's Palace Grounds; those are another area
(AREA_MCCOYS_PALACE), so walking there clears every area flag first, and he
never scolds the party for keeping McCoy waiting.
Referenced by scBilibinSetUpVillage().
Definition at line 191 of file bilibin.c.
CRATES_LANE_METATILES
#define CRATES_LANE_METATILES 10
The metatiles round the crate's place, as BilibinCratesPushMetatiles lists
them.
Referenced by scBilibinUpdateCratesMetatiles().
Definition at line 951 of file bilibin.c.
Enumerations in detail
BILIBIN_ACTOR_ID
enum BILIBIN_ACTOR_ID
Actors of Bilibin, numbering its actor placements from ACTOR_FIRST_PLACED.
The ten villagers are named by what they say before the curse is lifted.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_IVY | ACTOR_FIRST_PLACED | The bush of ivy over the cave mouth at the west edge, the way into the Treasury, drawn half as tall again. Whirlwind blows it away. |
ACTOR_TREE_MAN | The man turned into a tree at the village entrance, drawn as a tree. | |
ACTOR_YOUNG_MAN_WELCOME | A young man with brown hair. | |
ACTOR_VILLAGER_GROUP_TO_IMIL | A woman with fair hair. | |
ACTOR_VILLAGER_ASKS_ABOUT_TREE | A burly grey-haired man (scBilibinAskAboutEntranceTree). | |
ACTOR_VILLAGER_MCCOY_FRIGHTENED | A woman in a green dress. | |
ACTOR_OLD_MAN_ASKS_ABOUT_SOUTHEAST | An old man with a cane (scBilibinAskAboutSoutheastRoute). | |
ACTOR_OLD_WOMAN_ROAD_BLOCKED | An old woman. | |
ACTOR_BOY_SCARED_OF_ENTRANCE | A small boy. | |
ACTOR_GIRL_RED_SKY | A little girl. | |
ACTOR_STRONGMAN_IMIL_TOWER | A strongman, stocky and muscular. | |
ACTOR_VILLAGER_STRANGE_CREATURES | A man with a pickaxe. | |
ACTOR_VILLAGE_STATUE | The golden statue in front of the weapon and armor shop, over the hole into the Treasury. It slides a metatile under Move or a push. | |
ACTOR_FORMER_TREE_MAN | The same man once the curse is lifted, a stocky, muscular man with black hair. |
Definition at line 96 of file bilibin.c.
BILIBIN_BARRICADE_ACTOR_ID
enum BILIBIN_BARRICADE_ACTOR_ID
Actors of the Bilibin Barricade (BilibinBarricade), numbering its actor
placements from ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_BARRICADE_CRATES | ACTOR_FIRST_PLACED | The stack of two crates at the barricade's left end, which slides a metatile under Move or a push. |
ACTOR_BOTTOM_TREE | The bottom of the three trees. | |
ACTOR_MIDDLE_TREE | The tree 32 pixels up, which the travelers from Imil push down onto its side by the river. | |
ACTOR_JILL_TREE | Jill as a tree, the top of the three. | |
ACTOR_GANG_MEMBER_EAST | Jill's two friends, once the | |
ACTOR_GANG_MEMBER_WEST | curse is lifted, east and west of her. They are two boys with brown hair. With her they were the "Gang of Three". | |
ACTOR_JILL | Jill herself, once the curse is lifted, drawn as the woman with long fair hair the villages use (SPRITE_WOMAN_WITH_FAIR_HAIR), though the text calls the three children. | |
ACTOR_INVISIBLE_AT_ORIGIN | Unused: an actor drawn with the world map's forest cover (SPRITE_WORLD_MAP_FOREST_COVER), placed at the map's origin. No code or cue addresses it. | |
ACTOR_FALLEN_TREE_STAND_IN | The invisible actor (SPRITE_BLANK) that stands where the middle tree lies pushed down and answers for it. |
Definition at line 127 of file bilibin.c.
BILIBIN_TREASURY_ACTOR_ID
enum BILIBIN_TREASURY_ACTOR_ID
Actors of the Bilibin Treasury (BilibinTreasury), numbering its actor
placements from ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_TREASURY_STATUE | ACTOR_FIRST_PLACED | The golden statue at the top of the walkway between the pools, which slides up and down it under Move or a push. |
ACTOR_GUST | Gust, a Jupiter Djinni, placed until he has joined. |
Definition at line 163 of file bilibin.c.
BILIBIN_METATILE_BEHAVIOR
enum BILIBIN_METATILE_BEHAVIOR
Metatile behaviors the three maps' cues answer besides the exits and the doors, whose metatile behaviors are their exits' numbers.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_BILIBIN_WELL | 90 | Bilibin's well, metatiles (20..21, 13..14). |
METATILE_BEHAVIOR_BILIBIN_HERB_JAR | 100 | The jar at metatile (22, 10), with a Herb in it. |
METATILE_BEHAVIOR_BILIBIN_COINS_JAR | 101 | The jar at metatile (9, 19), with 5 coins in it. |
METATILE_BEHAVIOR_BILIBIN_STATUE_SQUARE | 20 | The metatiles round the village statue's dotted square, (15..17, 12..14), where walking into the statue pushes it. |
METATILE_BEHAVIOR_BILIBIN_BARRICADE_HOP_NORTH | 9 | At the barricade, |
METATILE_BEHAVIOR_BILIBIN_BARRICADE_BESIDE_CRATES | 10 | metatile (14, 10), from which Isaac hops north. At the barricade, metatile (8, 17) beside the crates: Isaac hops west from it or pushes the crates south. |
METATILE_BEHAVIOR_BILIBIN_BARRICADE_SIGN | 11 | The barricade's sign, metatile (5, 22). |
METATILE_BEHAVIOR_BILIBIN_BARRICADE_CRATES_PUSH | 12 | The metatiles round the crates' place, where walking into them pushes them. |
METATILE_BEHAVIOR_BILIBIN_BARRICADE_BESIDE_GANG | 13 | Beside the Gang of Three, metatiles (13, 10..12) to their west and (18, 10..12) to their east. |
METATILE_BEHAVIOR_BILIBIN_BARRICADE_DOOR | 30 | The barricade's door, metatile (10, 17), locked until the curse is lifted. |
METATILE_BEHAVIOR_BILIBIN_TREASURY_SIGN | 10 | The Treasury's sign, metatile (16, 14). |
METATILE_BEHAVIOR_BILIBIN_TREASURY_ALCOVE | 11 | The statue's alcove at the top of the walkway, metatile (14, 6), when empty: Isaac hops east or west from it across the pools, or pushes the statue south. |
METATILE_BEHAVIOR_BILIBIN_TREASURY_WALKWAY_FOOT | 12 | The walkway's foot, metatile (14, 9), when empty: Isaac pushes the statue north from it, or hops south off the walkway. |
METATILE_BEHAVIOR_BILIBIN_TREASURY_WALKWAY | 13 | The walkway between them, metatiles (14, 7) and (14, 8). |
Definition at line 195 of file bilibin.c.
BILIBIN_SPARE_METATILE
enum BILIBIN_SPARE_METATILE
Spare metatiles in row 0 of each map, whose behaviors are copied where a statue or the crates leave or land.
| Enumerator | Value | Description |
|---|---|---|
SPARE_METATILE_ROW | 0 | |
VILLAGE_HOLE_METATILE_COLUMN | 0 | Bilibin's: the exit down into the |
VILLAGE_WALL_METATILE_COLUMN | 1 | Treasury |
TREASURY_ALCOVE_METATILE_COLUMN | 0 | the empty alcove's |
TREASURY_FOOT_METATILE_COLUMN | 1 | the empty walkway foot's |
TREASURY_WALL_METATILE_COLUMN | 2 | |
BARRICADE_WALL_METATILE_COLUMN | 0 | |
BARRICADE_PUSH_METATILE_COLUMN | 1 | METATILE_BEHAVIOR_BILIBIN_BARRICADE_CRATES_PUSH |
Definition at line 262 of file bilibin.c.
anonymous enum
enum { TREASURY_WAY_COLUMN, TREASURY_WAY_ROW }
The metatile the village statue first stands on, over the way down to the Bilibin Treasury.
| Enumerator | Value | Description |
|---|---|---|
TREASURY_WAY_COLUMN | 16 | |
TREASURY_WAY_ROW | 13 |
Definition at line 798 of file bilibin.c.
anonymous enum
enum { TREASURY_WALKWAY_COLUMN, TREASURY_ALCOVE_ROW, TREASURY_FOOT_ROW }
The Treasury statue's two resting places on the walkway's column.
| Enumerator | Value | Description |
|---|---|---|
TREASURY_WALKWAY_COLUMN | 14 | |
TREASURY_ALCOVE_ROW | 6 | |
TREASURY_FOOT_ROW | 9 |
Definition at line 1115 of file bilibin.c.
Functions in detail
scBilibinSetUpVillage
static void scBilibinSetUpVillage(void)
Before the curse is lifted the man at the entrance is a tree, and after it he stands there a man. The ivy over the cave mouth grows back each visit, and the village statue's metatiles are set for where it stands.
References fdActorFaceDirection(), fdActorGet(), fdActorSetSpriteFlags(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork and scBilibinUpdateVillageStatueMetatiles().
Referenced by scInit().
Definition at lines 59 and 751 of file bilibin.c.
scBilibinUpdateVillageStatueMetatiles
static void scBilibinUpdateVillageStatueMetatiles(void)
Move on the golden statue in front of Bilibin's weapon and armor shop slides it a metatile. Moved off metatile (16, 13), it uncovers the hole into the Treasury; moved back on, it covers it again.
The same work follows every push and every arrival in Bilibin. The metatiles of the statue's dotted square, (15..17, 12..14), are made ground that pushes the statue again, the statue's own metatile is walled off, and the hole's metatile is given its exit unless the statue stands on it. If the statue lands on the hole while Isaac is standing on it, he starts with a "!" and hops clear, to the north or the east.
References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorMoveToAndWait(), fdActorShowEmote(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart() and Sint32.
Referenced by BilibinCues, scBilibinPushStatueOrCrates() and scBilibinSetUpVillage().
Definition at lines 70 and 804 of file bilibin.c.
scBilibinSetUpBarricade
static void scBilibinSetUpBarricade(void)
Before the curse is lifted the Gang of Three stand as trees by the river, and after it as children. The crates' metatiles are set for where they stand.
References fdActorFaceDirection(), fdActorGet(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), gmFlagGet() and scBilibinUpdateCratesMetatiles().
Referenced by scInit().
Definition at lines 71 and 867 of file bilibin.c.
scBilibinUpdateCratesMetatiles
static void scBilibinUpdateCratesMetatiles(void)
Move on the stack of two crates at the left end of the Bilibin Barricade drags it out of the wall of crates, opening a gap through the barricade to the road to Kolima.
The same work follows every push and every arrival at the barricade: the ten
metatiles round the crate's place, listed in BilibinCratesPushMetatiles, are
made ground that pushes the crate, and the crate's own metatile is walled
off.
References BilibinCratesPushMetatiles, fdActorGet(), fdMapGridCopyMetatileAttributes() and Sint32.
Referenced by BilibinBarricadeCues, scBilibinPushStatueOrCrates() and scBilibinSetUpBarricade().
Definition at lines 80 and 953 of file bilibin.c.
scBilibinSetUpTreasury
static void scBilibinSetUpTreasury(void)
The Treasury opens with an interlaced wipe, and its statue's metatiles are set for where it stands. Coming in by either of its two ladders (from the lower floor, or down the hole under the village statue), Isaac starts 16 pixels up the ladder, with the view already on him.
References fdActorGet(), fdCameraMoveWithinMapBounds(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), gmFlagGet(), MainRoutineStateWork, scBilibinUpdateTreasuryStatueMetatiles() and sySynch().
Referenced by scInit().
Definition at lines 81 and 986 of file bilibin.c.
scBilibinUpdateRiverRipples
static void scBilibinUpdateRiverRipples(void)
While Isaac wades in the river at the Bilibin Barricade, west of the fallen tree, a ripple spreads from his feet every 30 ticks. It runs every tick.
References BilibinRippleTimer, fdActorGet(), MainRoutineStateWork and scBilibinSpawnRipple().
Referenced by scInit().
Definition at lines 82 and 1067 of file bilibin.c.
scBilibinSpawnRipple
static void scBilibinSpawnRipple(ACTOR *actor)
Spawns a semi-transparent ripple (SPRITE_RIPPLE's spreading rings) at the
wader, which releases itself after 30 ticks.
References BilibinRippleScript, fdActorStartScript(), fdSpriteStartAnimation() and scFieldActorCreate().
Referenced by scBilibinUpdateRiverRipples().
Definition at lines 83 and 1090 of file bilibin.c.
scBilibinUpdateTreasuryStatueMetatiles
static void scBilibinUpdateTreasuryStatueMetatiles(void)
Move on the golden statue in the Treasury slides it up or down the walkway between the two pools, where Gust waits on the ledge to the east.
The statue rests either in its alcove at the top, metatile (14, 6), or at the walkway's foot, metatile (14, 9). The same work follows every push and every arrival: the metatile the statue stands on is walled off, the alcove when empty lets Isaac hop east or west across the pools, and the foot when empty lets him push the statue back up or hop south off the walkway.
References fdActorGet() and fdMapGridCopyMetatileAttributes().
Referenced by BilibinTreasuryCues, scBilibinPushStatueOrCrates() and scBilibinSetUpTreasury().
Definition at lines 92 and 1122 of file bilibin.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References BilibinBarricadeEntrances, BilibinEntrances, BilibinEntrancesOther, BilibinTreasuryEntrances and MainRoutineStateWork.
Definition at line 276 of file bilibin.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Only the Bilibin Treasury has exit regions.
References BilibinTreasuryRegions and MainRoutineStateWork.
Definition at line 296 of file bilibin.c.
scGetExits
const Uint32 *scGetExits(void)
Returns the packed exits shared by the three scenes.
References BilibinExits.
Definition at line 306 of file bilibin.c.
scBilibinGustJoins
static void scBilibinGustJoins(void)
Talking to Gust in the Bilibin Treasury makes Gust, a Jupiter Djinni, join the party.
References fdDjinnJoinParty().
Referenced by BilibinTreasuryCues.
Definition at line 313 of file bilibin.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Selects the actors of Bilibin, the Bilibin Barricade or the Bilibin Treasury.
References BilibinActorPlacements, BilibinActorPlacementsOther, BilibinBarricadeActorPlacements, BilibinTreasuryActorPlacements and MainRoutineStateWork.
Definition at line 319 of file bilibin.c.
scBilibinInspectWell
static void scBilibinInspectWell(void)
Searching the well in Bilibin, the leader peers in, and its bottom cannot be seen.
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by BilibinCues.
Definition at line 340 of file bilibin.c.
scGetCues
const CUE *scGetCues(void)
References BilibinBarricadeCues, BilibinCues, BilibinCuesOther, BilibinTreasuryCues and MainRoutineStateWork.
Definition at line 348 of file bilibin.c.
scBilibinReadOffLimitsSign
static void scBilibinReadOffLimitsSign(void)
Searching the sign at the Bilibin Barricade: "This area is off-limits to all those without a permit. —Lord McCoy"
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by BilibinBarricadeCues.
Definition at line 369 of file bilibin.c.
scBilibinReadWarehouseSign
static void scBilibinReadWarehouseSign(void)
Searching the sign in the Bilibin Treasury: "McCoy's Hidden Warehouse / Do Not Enter!"
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by BilibinTreasuryCues.
Definition at line 378 of file bilibin.c.
scBilibinInspectHumanShapedTree
static void scBilibinInspectHumanShapedTree(void)
The Gang of Three's trees at the Bilibin Barricade look like people.
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by BilibinBarricadeCues.
Definition at line 386 of file bilibin.c.
scBilibinExamineTreeMan
static void scBilibinExamineTreeMan(void)
The tree at Bilibin's entrance almost looks like a man and, looked at again, like a living person.
References fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagSet().
Referenced by BilibinCues.
Definition at line 395 of file bilibin.c.
scBilibinAskAboutEntranceTree
static void scBilibinAskAboutEntranceTree(void)
A burly man asks about the tree at Bilibin's entrance.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by BilibinCues.
Definition at line 409 of file bilibin.c.
scBilibinAskAboutSoutheastRoute
static void scBilibinAskAboutSoutheastRoute(void)
An old man asks whether the party has tried heading southeast.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by BilibinCues.
Definition at line 421 of file bilibin.c.
scBilibinAskAboutBeingATree
static void scBilibinAskAboutBeingATree(void)
The man who was the tree at the entrance talks about it.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by BilibinCues.
Definition at line 433 of file bilibin.c.
scBilibinAskAboutCurseBreakers
static void scBilibinAskAboutCurseBreakers(void)
A small boy asks whether the party broke the curse.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by BilibinCues.
Definition at line 445 of file bilibin.c.
scBilibinAskAboutImil
static void scBilibinAskAboutImil(void)
A strongman asks whether the party has been to Imil.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by BilibinCues.
Definition at line 457 of file bilibin.c.
scBilibinOpenDoorAndLeave
static void scBilibinOpenDoorAndLeave(void)
Walking up to a door in Bilibin opens it, and Isaac walks in: the inn (metatile (23, 22)), the houses east (12, 20), west (6, 21) and north (10, 13), the item shop (4, 13), the weapon and armor shop (18, 11) or the Sanctum's double door (24..25, 10).
Everyone in town stops where they are while the door opens. The Sanctum's door opens with a thump instead of the sound of the others, and the screen fades as Isaac walks through.
References BilibinDoorMetatiles, BilibinDoorSteps, fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetSpritePriority(), fdMapGridPlayMapEdit(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), Sint32, state, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by BilibinCues.
Definition at line 476 of file bilibin.c.
scBilibinPullJillFromRiver
static void scBilibinPullJillFromRiver(void)
Move on Jill's tree, adrift in the river at the Bilibin Barricade, lets Isaac pull her ashore. Once Move has brought her one metatile east, into metatile column 6, he hauls her out in three tugs, walks back up the bank, and her thought comes through: she thanks him for saving her from being washed downstream.
References fdActorFaceDirection(), fdActorGet(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetSpritePriority(), fdActorWalkToAndWait(), fdPsynergyStartMindReadWave(), fdPsynergyStopMindReadWave(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet() and sySynch().
Referenced by BilibinBarricadeCues.
Definition at line 545 of file bilibin.c.
scBilibinHopAcross
static void scBilibinHopAcross(void)
Walking on into a gap from one of a few ledges, Isaac hops across it: in the Treasury east or west across the pools from the statue's empty alcove, or south off the foot of the walkway; at the Bilibin Barricade north from metatile (14, 10), or west from metatile (8, 17) beside the crates.
References fdTryJumpForward().
Referenced by BilibinBarricadeCues and BilibinTreasuryCues.
Definition at line 610 of file bilibin.c.
scBilibinJillGivesHardNut
static void scBilibinJillGivesHardNut(void)
Jill and her friends thank the leader with a Hard Nut.
References BilibinFaceLeaderScript, fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorWalkToAndWait(), fdCameraWaitForMove(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet(), gmItemShowFound(), gmPartyGiveItem(), mnFieldMessageShow() and scFieldActorWatchAndStartScript().
Referenced by BilibinBarricadeCues.
Definition at line 616 of file bilibin.c.
scInit
Sint32 scInit(void)
Sets up the scene being entered, Bilibin, the Bilibin Barricade or the Bilibin Treasury.
References MainRoutineStateWork, scBilibinSetUpBarricade(), scBilibinSetUpTreasury(), scBilibinSetUpVillage(), scBilibinUpdateRiverRipples(), Sint32 and sySetTickEvent().
Definition at line 729 of file bilibin.c.
scBilibinPushStatueOrCrates
static void scBilibinPushStatueOrCrates(void)
Pushing a statue in Bilibin or the Bilibin Treasury, or the crates at the Bilibin Barricade, slides it one metatile ahead with the leader behind it, if the metatile is free.
References fdActorGet(), fdActorSelectAnimation(), fdActorStepFrom(), fdActorWaitForMove(), MainRoutineStateWork, PushedActorDirectionSteps, scActorFindAtMetatile(), scBilibinUpdateCratesMetatiles(), scBilibinUpdateTreasuryStatueMetatiles(), scBilibinUpdateVillageStatueMetatiles(), scFieldActorCheckMovementCollision(), scFieldActorSetMoveTargetFX(), sySoundPlay() and sySynch().
Referenced by BilibinBarricadeCues, BilibinCues and BilibinTreasuryCues.
Definition at line 1015 of file bilibin.c.
Variables in detail
BilibinFaceLeaderScript
extern Sint32 BilibinFaceLeaderScript[]
Sint32 BilibinFaceLeaderScript[]
References scTurnTowardTarget() and Sint32.
Referenced by scBilibinJillGivesHardNut().
Definition at lines 39 and 1161 of file bilibin.c.
BilibinEntrancesOther
extern SCENE_ENTRANCE BilibinEntrancesOther[]
SCENE_ENTRANCE BilibinEntrancesOther[]
Unused: the entrances for a scene other than the three, which never loads
this overlay. Its one row has no SCENE_TABLE_END after it.
Referenced by scGetEntrances().
Definition at lines 40 and 1168 of file bilibin.c.
BilibinEntrances
extern SCENE_ENTRANCE BilibinEntrances[]
SCENE_ENTRANCE BilibinEntrances[]
Referenced by scGetEntrances().
Definition at lines 41 and 1180 of file bilibin.c.
BilibinBarricadeEntrances
extern SCENE_ENTRANCE BilibinBarricadeEntrances[]
SCENE_ENTRANCE BilibinBarricadeEntrances[]
Referenced by scGetEntrances().
Definition at lines 42 and 1283 of file bilibin.c.
BilibinTreasuryEntrances
extern SCENE_ENTRANCE BilibinTreasuryEntrances[]
SCENE_ENTRANCE BilibinTreasuryEntrances[]
Referenced by scGetEntrances().
Definition at lines 43 and 1310 of file bilibin.c.
BilibinTreasuryRegions
extern Sint16 BilibinTreasuryRegions[]
Sint16 BilibinTreasuryRegions[]
Referenced by scGetExitRegions().
Definition at lines 44 and 1352 of file bilibin.c.
BilibinExits
extern Uint32 BilibinExits[]
Uint32 BilibinExits[]
Referenced by scGetExits().
Definition at lines 45 and 1358 of file bilibin.c.
BilibinActorPlacementsOther
extern ACTOR_PLACE BilibinActorPlacementsOther[]
ACTOR_PLACE BilibinActorPlacementsOther[]
Referenced by scGetActorPlacements().
Definition at lines 46 and 1388 of file bilibin.c.
BilibinActorPlacements
extern ACTOR_PLACE BilibinActorPlacements[]
ACTOR_PLACE BilibinActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 47 and 1392 of file bilibin.c.
BilibinBarricadeActorPlacements
extern ACTOR_PLACE BilibinBarricadeActorPlacements[]
ACTOR_PLACE BilibinBarricadeActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 48 and 1424 of file bilibin.c.
BilibinTreasuryActorPlacements
extern ACTOR_PLACE BilibinTreasuryActorPlacements[]
ACTOR_PLACE BilibinTreasuryActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 49 and 1446 of file bilibin.c.
BilibinCuesOther
extern CUE BilibinCuesOther[]
CUE BilibinCuesOther[]
Referenced by scGetCues().
Definition at lines 50 and 1454 of file bilibin.c.
BilibinCues
extern CUE BilibinCues[]
CUE BilibinCues[]
References scBilibinAskAboutBeingATree(), scBilibinAskAboutCurseBreakers(), scBilibinAskAboutEntranceTree(), scBilibinAskAboutImil(), scBilibinAskAboutSoutheastRoute(), scBilibinExamineTreeMan(), scBilibinInspectWell(), scBilibinOpenDoorAndLeave(), scBilibinPushStatueOrCrates() and scBilibinUpdateVillageStatueMetatiles().
Referenced by scGetCues().
Definition at lines 51 and 1458 of file bilibin.c.
BilibinBarricadeCues
extern CUE BilibinBarricadeCues[]
CUE BilibinBarricadeCues[]
References scBilibinHopAcross(), scBilibinInspectHumanShapedTree(), scBilibinJillGivesHardNut(), scBilibinPullJillFromRiver(), scBilibinPushStatueOrCrates(), scBilibinReadOffLimitsSign() and scBilibinUpdateCratesMetatiles().
Referenced by scGetCues().
Definition at lines 52 and 1575 of file bilibin.c.
BilibinTreasuryCues
extern CUE BilibinTreasuryCues[]
CUE BilibinTreasuryCues[]
References scBilibinGustJoins(), scBilibinHopAcross(), scBilibinPushStatueOrCrates(), scBilibinReadWarehouseSign() and scBilibinUpdateTreasuryStatueMetatiles().
Referenced by scGetCues().
Definition at lines 53 and 1639 of file bilibin.c.
BilibinDoorSteps
extern Uint16 *BilibinDoorSteps[]
Uint16 *BilibinDoorSteps[]
References BilibinHouseEastDoorSteps, BilibinHouseNorthDoorSteps, BilibinHouseWestDoorSteps, BilibinInnDoorSteps, BilibinItemShopDoorSteps, BilibinSanctumDoorSteps and BilibinWeaponAndArmorShopDoorSteps.
Referenced by scBilibinOpenDoorAndLeave().
Definition at lines 54 and 1699 of file bilibin.c.
BilibinDoorMetatiles
extern Sint16 BilibinDoorMetatiles[][2]
Sint16 BilibinDoorMetatiles[][2]
Where each door's opening is drawn on the map grid, in the order of BilibinDoorSteps. The doors
are drawn on map layer 1, whose metatiles begin at the map's column 32: the inn's (54, 20) is
that layer's (22, 20), the door just above the ground metatile (23, 22) Isaac walks into.
Referenced by scBilibinOpenDoorAndLeave().
Definition at lines 55 and 1712 of file bilibin.c.
BilibinCratesPushMetatiles
extern Uint8 BilibinCratesPushMetatiles[]
Uint8 BilibinCratesPushMetatiles[]
The ten metatiles round the crates' place at the Bilibin Barricade that push them, as column and row.
Referenced by scBilibinUpdateCratesMetatiles().
Definition at lines 56 and 1718 of file bilibin.c.
BilibinRippleScript
extern Sint32 BilibinRippleScript[]
Sint32 BilibinRippleScript[]
References Sint32.
Referenced by scBilibinSpawnRipple().
Definition at lines 57 and 1726 of file bilibin.c.
BilibinRippleTimer
BILIBIN_RIPPLE_TIMER BilibinRippleTimer
Referenced by scBilibinUpdateRiverRipples().
Definition at line 179 of file bilibin.c.
BilibinSanctumDoorSteps
Uint16 BilibinSanctumDoorSteps[]
How each of Bilibin's doors is drawn opening, two steps of map edits; BilibinDoorSteps lists them
in the order of the exits from BILIBIN_INN.
Referenced by BilibinDoorSteps.
Definition at line 1664 of file bilibin.c.
BilibinItemShopDoorSteps
Uint16 BilibinItemShopDoorSteps[]
Referenced by BilibinDoorSteps.
Definition at line 1669 of file bilibin.c.
BilibinWeaponAndArmorShopDoorSteps
Uint16 BilibinWeaponAndArmorShopDoorSteps[]
Referenced by BilibinDoorSteps.
Definition at line 1674 of file bilibin.c.
BilibinHouseEastDoorSteps
Uint16 BilibinHouseEastDoorSteps[]
Referenced by BilibinDoorSteps.
Definition at line 1679 of file bilibin.c.
BilibinInnDoorSteps
Uint16 BilibinInnDoorSteps[]
Referenced by BilibinDoorSteps.
Definition at line 1684 of file bilibin.c.
BilibinHouseWestDoorSteps
Uint16 BilibinHouseWestDoorSteps[]
Referenced by BilibinDoorSteps.
Definition at line 1689 of file bilibin.c.
BilibinHouseNorthDoorSteps
Uint16 BilibinHouseNorthDoorSteps[]
Referenced by BilibinDoorSteps.
Definition at line 1694 of file bilibin.c.