Skip to Content
The Alchemy Project

src/scene/shared/vault_nearby.c

Vault, before and after the thieves are caught: the two villagers who walk about together (ACTOR_BOY_ROUND_THE_WELL and ACTOR_GIRL_ROUND_THE_WELL, as both scenes name them).

Included by vault.c and vault_revisit.c.

Enumerations

NameDescription
enumanonymous enum { VILLAGER_IS_BOY, VILLAGER_TALKED_TO }The bits of a child round the well's villagerFlags.

Functions

NameDescription
static UNREAD_RESULTscVaultUpdateWalkingVillager (ACTOR *actor)The update function of the two children round the well, by their villagerFlags' VILLAGER_IS_BOY and VILLAGER_TALKED_TO.

Description

Vault, before and after the thieves are caught: the two villagers who walk about together (ACTOR_BOY_ROUND_THE_WELL and ACTOR_GIRL_ROUND_THE_WELL, as both scenes name them).

Enumerations in detail

anonymous enum

enum { VILLAGER_IS_BOY, VILLAGER_TALKED_TO }

The bits of a child round the well's villagerFlags.

EnumeratorValueDescription
VILLAGER_IS_BOY1Set for ACTOR_BOY_ROUND_THE_WELL, whose partner is ACTOR_GIRL_ROUND_THE_WELL; clear for the girl.
VILLAGER_TALKED_TO2Set while the party talks to it, so that it stops whichever way it faces.

Definition at line 6 of file vault_nearby.c.

Functions in detail

scVaultUpdateWalkingVillager

static UNREAD_RESULT scVaultUpdateWalkingVillager(ACTOR *actor)

The update function of the two children round the well, by their villagerFlags' VILLAGER_IS_BOY and VILLAGER_TALKED_TO. A villager stops when close to and facing its partner, and otherwise when the leader is within STOP_RANGE in front of it. While a talk is pending (FIELD_STATE's talk) or Mind Read is on the range is TALK_STOP_RANGE, and a villager being talked to stops whichever way it faces.

References fdActorGetById(), scVaultStopIfFacingNear(), Sint32 and state.

Referenced by scInit().

Definition at line 20 of file vault_nearby.c.