Skip to Content
The Alchemy Project

src/scene/shared/position_distance.c

The distance between two actors, for the scenes where someone reacts to who is near: the Mercury and Venus Lighthouse aeries, Tolbi, Vault, Venus Lighthouse, Xian and every scene with pushed_actor.c.

Included by mercury_lighthouse_aerie.c, pushed_actor.c, tolbi.c, vault.c, vault_revisit.c, venus_lighthouse.c, venus_lighthouse_aerie.c and xian.c.

Macros

NameDescription
#definefdActorDistance (first, second)The distance in whole pixels between two actors, in all three axes.

Functions

NameDescription
static Sint32scPosDistance (const Sint32 *first, const Sint32 *second)The distance in whole pixels between two positions, each given by its x and read on through the y and z that follow it, as an actor holds them.

Description

The distance between two actors, for the scenes where someone reacts to who is near: the Mercury and Venus Lighthouse aeries, Tolbi, Vault, Venus Lighthouse, Xian and every scene with pushed_actor.c.

Macros in detail

fdActorDistance

#define fdActorDistance(first, second)

The distance in whole pixels between two actors, in all three axes.

Referenced by scActorFindNearestFloatingPlatform(), scTolbiKidStopForTarget(), scVaultStopIfFacingNear() and scXianStopCarrierBeforeLeader().

Definition at line 18 of file position_distance.c.

Functions in detail

scPosDistance

static Sint32 scPosDistance(const Sint32 *first, const Sint32 *second)

The distance in whole pixels between two positions, each given by its x and read on through the y and z that follow it, as an actor holds them. UB: an actor's x, y and z are separate members, read here as an array.

References Sint32 and sySquartIWRAM().

Definition at line 8 of file position_distance.c.