14 const u8 *targetPosition =
17 if (FixedPoint_Distance(targetPosition, actorPosition) < range ||
20 *(
const s32 *)targetPosition -
21 *(
const s32 *)actorPosition);
24 u32 forward = angle & 0xf000;
26 if (forward == facing || right == facing || left == facing || force != 0) {
void Object_SetMode(struct FieldActor *object, s32 animation)
Field objects and actors, and the scene transition styles.
s32 ArcTan2(s32 x, s32 y)
Returns the angle of the vector (x, y), in 1/65536 turns, measured from the y axis: 0 along +y,...
s32 Vault_StopIfFacingNear(struct FieldActor *actor, struct FieldActor *target, s32 range, s32 force)
Stops the actor (paused, mode 1) when the target is nearer than range pixels and lies ahead of it,...
#define offsetof(type, member)
A field actor: a person or thing on the field with a position, motion toward a target,...
u8 paused
nonzero skips its script and motion, not its update
union FieldCoordinate z
16.16 fixed-point pixels
The integer types, TRUE, UNUSED and the fixed-address macros.
s32 fixed
16.16 fixed-point pixels