23 delta = (
s16)(angle - old);
29 if (delta < -0x1000) {
32 obj->
facing = (old + delta);
FacingObject, the view of an object that turns to face a target.
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,...
static s32 Scene_TurnTowardTarget(struct ScriptInterpreter *interpreter)
An object script call: an actor with a facing target turns towards it, at most a sixteenth of a turn ...
The field object script interpreter and the operands its commands read.
A field object seen as one that turns toward its facing target: its facing, its ground position and t...
s32 positionZ
16.16 fixed-point pixels
s32 positionX
16.16 fixed-point pixels
u8 facingFlags
The steering flags (SW_STEERING); bit 0, turning toward its velocity, is cleared while it turns towar...
struct FacingObject * facingTarget
The linked object (work value 0x25), or null.
The prefix that command handlers read from a field object's 0x70-byte slot.
The integer types, TRUE, UNUSED and the fixed-address macros.